@lovrabet/lovrabet-cli 2.3.1-beta.2 → 2.3.1-beta.4

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 (179) hide show
  1. package/README.md +53 -1
  2. package/lib/cli.js +1 -1
  3. package/lib/commands/api-doc/index.js +1 -1
  4. package/lib/commands/app/cache.js +1 -1
  5. package/lib/commands/app/definitions.js +1 -1
  6. package/lib/commands/app/eligibility.js +1 -1
  7. package/lib/commands/app/mock-loader.js +1 -1
  8. package/lib/commands/app/remote-source.js +1 -1
  9. package/lib/commands/app/shared.js +1 -1
  10. package/lib/commands/app-config/get.js +1 -1
  11. package/lib/commands/app-config/index.js +1 -1
  12. package/lib/commands/artifact/index.js +1 -1
  13. package/lib/commands/auth/device.js +1 -1
  14. package/lib/commands/auth/index.js +1 -1
  15. package/lib/commands/auth/prompt.js +1 -1
  16. package/lib/commands/bff/detail.js +1 -1
  17. package/lib/commands/bff/exec.js +1 -1
  18. package/lib/commands/bff/index.js +1 -1
  19. package/lib/commands/cli-skill/index.js +1 -1
  20. package/lib/commands/common/config-policy.js +1 -1
  21. package/lib/commands/common/constraints.js +1 -1
  22. package/lib/commands/common/flags.d.ts +2 -0
  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/init.d.ts +2 -0
  27. package/lib/commands/config/init.js +1 -1
  28. package/lib/commands/config/shared.js +1 -1
  29. package/lib/commands/data/index.js +1 -1
  30. package/lib/commands/dataset/detail.js +1 -1
  31. package/lib/commands/dataset/index.js +1 -1
  32. package/lib/commands/dataset/list.js +1 -1
  33. package/lib/commands/dataset/sdk-doc.js +1 -1
  34. package/lib/commands/doctor.js +1 -1
  35. package/lib/commands/file/index.js +1 -1
  36. package/lib/commands/init.js +1 -1
  37. package/lib/commands/kb/index.js +1 -1
  38. package/lib/commands/logs/index.js +1 -1
  39. package/lib/commands/notification/config-list.js +1 -1
  40. package/lib/commands/notification/index.js +1 -1
  41. package/lib/commands/notification/shared.js +1 -1
  42. package/lib/commands/ocr/index.js +1 -1
  43. package/lib/commands/permit/dataset-get.js +1 -1
  44. package/lib/commands/permit/dataset-set.js +1 -1
  45. package/lib/commands/permit/index.js +1 -1
  46. package/lib/commands/permit/page-get.js +1 -1
  47. package/lib/commands/permit/page-set.js +1 -1
  48. package/lib/commands/permit/role-menus-set.js +1 -1
  49. package/lib/commands/permit/role-menus.js +1 -1
  50. package/lib/commands/permit/shared.js +1 -1
  51. package/lib/commands/personal-bff/index.js +1 -1
  52. package/lib/commands/registry.js +1 -1
  53. package/lib/commands/role/create.js +1 -1
  54. package/lib/commands/role/delete.js +1 -1
  55. package/lib/commands/role/detail.js +1 -1
  56. package/lib/commands/role/index.js +1 -1
  57. package/lib/commands/role/list.js +1 -1
  58. package/lib/commands/role/shared.js +1 -1
  59. package/lib/commands/role/update.js +1 -1
  60. package/lib/commands/role/user-add.js +1 -1
  61. package/lib/commands/role/user-remove.js +1 -1
  62. package/lib/commands/schedule/index.js +1 -1
  63. package/lib/commands/schema.js +1 -1
  64. package/lib/commands/service/dynamic.js +1 -1
  65. package/lib/commands/service/function-name-adapter.js +1 -1
  66. package/lib/commands/service/index.js +1 -1
  67. package/lib/commands/service/registry.js +1 -1
  68. package/lib/commands/skill/commands/create.js +1 -1
  69. package/lib/commands/skill/commands/diagram.js +1 -1
  70. package/lib/commands/skill/commands/install.js +1 -1
  71. package/lib/commands/skill/commands/list.js +1 -1
  72. package/lib/commands/skill/commands/push.js +1 -1
  73. package/lib/commands/skill/commands/validate.js +1 -1
  74. package/lib/commands/skill/diagram.js +1 -1
  75. package/lib/commands/skill/flags.js +1 -1
  76. package/lib/commands/skill/index.js +1 -1
  77. package/lib/commands/skill/manifest-helpers.js +1 -1
  78. package/lib/commands/skill/push-execute.js +1 -1
  79. package/lib/commands/skill/push-flow-helpers.js +1 -1
  80. package/lib/commands/skill/push-retarget.js +1 -1
  81. package/lib/commands/skill/scopes.js +1 -1
  82. package/lib/commands/skill/summary.js +1 -1
  83. package/lib/commands/skill/templates.js +1 -1
  84. package/lib/commands/skill/validate.js +1 -1
  85. package/lib/commands/sql/detail.js +1 -1
  86. package/lib/commands/sql/exec.js +1 -1
  87. package/lib/commands/sql/index.js +1 -1
  88. package/lib/commands/update.js +1 -1
  89. package/lib/commands/user-account/bind.js +1 -1
  90. package/lib/commands/user-account/index.js +1 -1
  91. package/lib/commands/workspace/index.js +1 -1
  92. package/lib/config/domain-config.d.ts +33 -1
  93. package/lib/config/domain-config.js +1 -1
  94. package/lib/config/schema.d.ts +1 -1
  95. package/lib/config/schema.js +1 -1
  96. package/lib/constant/app.js +1 -1
  97. package/lib/constant/auth-mode.js +1 -1
  98. package/lib/constant/cli.js +1 -1
  99. package/lib/constant/defaults.js +1 -1
  100. package/lib/constant/distribution.js +1 -1
  101. package/lib/constant/domain.js +1 -1
  102. package/lib/constant/env.js +1 -1
  103. package/lib/constant/output.js +1 -1
  104. package/lib/constant/product.d.ts +0 -51
  105. package/lib/constant/product.js +1 -1
  106. package/lib/constant/region.d.ts +3 -5
  107. package/lib/constant/region.js +1 -1
  108. package/lib/constant/risk.js +1 -1
  109. package/lib/constant/url.js +1 -1
  110. package/lib/context.js +1 -1
  111. package/lib/core/api-client.js +1 -1
  112. package/lib/core/db-resolver.js +1 -1
  113. package/lib/core/kb-search-client.js +1 -1
  114. package/lib/core/sdk-client.js +1 -1
  115. package/lib/errors.js +1 -1
  116. package/lib/framework/build-all-flags.js +1 -1
  117. package/lib/framework/dryrun.js +1 -1
  118. package/lib/framework/flags.js +1 -1
  119. package/lib/framework/help.js +1 -1
  120. package/lib/framework/index.js +1 -1
  121. package/lib/framework/output.js +1 -1
  122. package/lib/framework/preparse.js +1 -1
  123. package/lib/framework/rate-limit.js +1 -1
  124. package/lib/framework/raw-flags.js +1 -1
  125. package/lib/framework/response.js +1 -1
  126. package/lib/framework/runner-confirmation.js +1 -1
  127. package/lib/framework/runner-error.js +1 -1
  128. package/lib/framework/runner.js +1 -1
  129. package/lib/framework/schema-export.js +1 -1
  130. package/lib/framework/service-order.js +1 -1
  131. package/lib/framework/types.js +1 -1
  132. package/lib/generated/build-info.d.ts +4 -4
  133. package/lib/generated/build-info.js +1 -1
  134. package/lib/generated/official-routing.d.ts +59 -0
  135. package/lib/generated/official-routing.js +1 -0
  136. package/lib/generated/routing-contract.d.ts +9 -0
  137. package/lib/generated/routing-contract.js +1 -0
  138. package/lib/help.js +1 -1
  139. package/lib/postinstall.js +1 -1
  140. package/lib/runtime/confirmation.js +1 -1
  141. package/lib/runtime/event.js +1 -1
  142. package/lib/runtime/index.js +1 -1
  143. package/lib/runtime/queue.js +1 -1
  144. package/lib/runtime/resolve.js +1 -1
  145. package/lib/skills/builtin-skill.js +1 -1
  146. package/lib/skills/npx-skills-add.js +1 -1
  147. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  148. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  149. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  150. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  151. package/lib/skills/runtime-skill-sync/links.js +1 -1
  152. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  153. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  154. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  155. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  156. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  157. package/lib/skills/runtime-skill-sync/push.js +1 -1
  158. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  159. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  160. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  161. package/lib/skills/runtime-skill-sync.js +1 -1
  162. package/lib/skills/skill-presence.js +1 -1
  163. package/lib/utils/access-key-redaction.js +1 -1
  164. package/lib/utils/apply-jq-filter.js +1 -1
  165. package/lib/utils/cli-version-check.js +1 -1
  166. package/lib/utils/cli-version-policy.js +1 -1
  167. package/lib/utils/logger.js +1 -1
  168. package/lib/utils/lossless-json.js +1 -1
  169. package/lib/utils/params.js +1 -1
  170. package/lib/utils/platform.js +1 -1
  171. package/lib/utils/update-notice.js +1 -1
  172. package/lib/utils/version.js +1 -1
  173. package/lib/utils/write-cli-side-channel.js +1 -1
  174. package/package.json +2 -1
  175. package/skills/lovrabet/SKILL.md +3 -3
  176. package/skills/lovrabet/guides/troubleshooting.md +3 -5
  177. package/skills/lovrabet/references/lovrabet-config-commands.md +35 -10
  178. package/skills/lovrabet/references/lovrabet-config.md +7 -19
  179. package/skills/lovrabet.manifest.json +3 -3
package/README.md CHANGED
@@ -78,6 +78,59 @@ lovrabet data filter --code <dataset-code> --params '{"currentPage":1,"pageSize"
78
78
  Use `--format pretty` for human-readable output and `--format json` or
79
79
  `--format compress` for scripts and agents.
80
80
 
81
+ ## Country/Region and Independent Deployment Routing
82
+
83
+ Configure an official node by country/region:
84
+
85
+ ```bash
86
+ lovrabet config init --region cn
87
+ lovrabet config init --region id
88
+ ```
89
+
90
+ For an independent deployment, both Lovrabet CLIs can import the same
91
+ versioned routing manifest:
92
+
93
+ ```bash
94
+ lovrabet config init --domain-config ./lovrabet-domains.json
95
+ ```
96
+
97
+ ```json
98
+ {
99
+ "protocol": "lovrabet-routing/v1",
100
+ "kind": "enterprise",
101
+ "cdn": {
102
+ "libraries": "https://cdnjs.cloudflare.com/ajax/libs",
103
+ "lovrabet": "https://g.lovrabet.com"
104
+ },
105
+ "domains": {
106
+ "userDomain": "https://user.customer.example.com",
107
+ "apiDomain": "https://api.customer.example.com",
108
+ "runtimeDomain": "https://runtime.customer.example.com",
109
+ "skillDomain": "https://skills.customer.example.com",
110
+ "kbDomain": {
111
+ "default": "https://kb-admin.customer.example.com",
112
+ "lovrabet-cli": "https://kb.customer.example.com"
113
+ },
114
+ "appDomain": "https://app.customer.example.com"
115
+ }
116
+ }
117
+ ```
118
+
119
+ A Domain can be a shared HTTPS origin string or a consumer-specific object.
120
+ Lovrabet CLI resolves `lovrabet-cli` first and then `default`; if neither
121
+ exists, the import fails instead of using another consumer's Domain. Official
122
+ `region` mode and explicit independent-deployment Domains are mutually
123
+ exclusive.
124
+
125
+ The shared manifest also requires `cdn.libraries` for third-party libraries and
126
+ `cdn.lovrabet` for Lovrabet-owned assets. Lovrabet CLI validates and preserves
127
+ these fields so the same file can be consumed by Rabetbase project generation.
128
+
129
+ Official routing is compiled into this package from the independent
130
+ `lovrabet-routing` repository. The CLI does not download that catalog at
131
+ runtime. Generated files under `src/generated/` are read-only snapshots with a
132
+ source digest and must be updated through the routing repository's generator.
133
+
81
134
  ## AI Agent Skill
82
135
 
83
136
  The Lovrabet CLI Built-in Skill ships inside the npm package and is installed
@@ -139,7 +192,6 @@ Important options:
139
192
 
140
193
  - `--app <name>`: select an app profile by name
141
194
  - `--appcode <code>`: override the target app code
142
- - `--env production|development|daily`: choose the target environment
143
195
  - `--format json|pretty|compress`: choose output format
144
196
  - `--jq <expr>`: filter JSON output
145
197
  - `--dry-run`: preview supported write operations
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- (function(_0x224d6a,_0x3ff998){const _0x194567=a0_0x3c01,_0x188499=_0x224d6a();while(!![]){try{const _0x52718c=parseInt(_0x194567(0x144))/0x1+parseInt(_0x194567(0x158))/0x2*(parseInt(_0x194567(0x15e))/0x3)+-parseInt(_0x194567(0x146))/0x4*(-parseInt(_0x194567(0x14e))/0x5)+-parseInt(_0x194567(0x142))/0x6*(parseInt(_0x194567(0x14a))/0x7)+parseInt(_0x194567(0x139))/0x8+-parseInt(_0x194567(0x15f))/0x9*(parseInt(_0x194567(0x140))/0xa)+-parseInt(_0x194567(0x157))/0xb;if(_0x52718c===_0x3ff998)break;else _0x188499['push'](_0x188499['shift']());}catch(_0x26ea4e){_0x188499['push'](_0x188499['shift']());}}}(a0_0x18cf,0x41c3d));import{jsx as a0_0x373d38}from'react/jsx-runtime';import a0_0xbea979 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,resolveRemovedCommand}from'./commands/registry.js';import{generateDynamicServiceHelp,resolveDynamicServiceCommand}from'./commands/service/dynamic.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';function a0_0x3c01(_0x4b8d6f,_0x404b61){_0x4b8d6f=_0x4b8d6f-0x139;const _0x18cfb2=a0_0x18cf();let _0x3c019b=_0x18cfb2[_0x4b8d6f];return _0x3c019b;}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_0xbea979(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()['catch'](handleError);function a0_0x18cf(){const _0x2c7dc5=['hint','Hint:\x20','error','flatMap','code','\x20->\x20--','1298704VLhssL','7656kKkEhC','message','slice','ERR_USE_AFTER_CLOSE','exitCode','corrected','417fcxxcv','1631241cDxhvI','exit','cancelled','args','stderr','\x0aCancelled.\x0a','2452344QKZFtT','[preparse]\x20','write','log','./framework/preparse.js','ERR_STREAM_DESTROYED','help','20QYjzvw','defaultCommand','282mUNoOg','input','89298QZduKn','original','76waqIRl',':\x20--','ExitPromptError','length','61229euElSm','flags','definition','unknownCommand','61345BJfqos','Unexpected\x20error:','handler'];a0_0x18cf=function(){return _0x2c7dc5;};return a0_0x18cf();}async function main(){try{await run();}catch(_0x28afc8){handleError(_0x28afc8);}}async function run(){const _0x19ceb9=a0_0x3c01;let _0x201cbf=cli[_0x19ceb9(0x143)][0x0],_0x596584=cli[_0x19ceb9(0x143)][0x1];const _0x4692fc=cli[_0x19ceb9(0x14b)];try{const {correctFlags:_0x2c2d83}=await import(_0x19ceb9(0x13d)),_0x55b44c=getAllDefinitions()[_0x19ceb9(0x154)](_0x1d448d=>_0x1d448d[_0x19ceb9(0x14b)]??[]),{flags:_0x2bf3ef,corrections:_0x11e908}=_0x2c2d83(_0x4692fc,_0x55b44c);if(_0x11e908[_0x19ceb9(0x149)]>0x0){for(const _0x409a8d of _0x11e908){process[_0x19ceb9(0x163)][_0x19ceb9(0x13b)](_0x19ceb9(0x13a)+_0x409a8d[_0x19ceb9(0x150)]+_0x19ceb9(0x147)+_0x409a8d[_0x19ceb9(0x145)]+_0x19ceb9(0x156)+_0x409a8d[_0x19ceb9(0x15d)]+'\x0a');}Object['assign'](_0x4692fc,_0x2bf3ef);}}catch{}if(!_0x201cbf){const {waitUntilExit:_0x309a9d}=render(a0_0x373d38(Help,{}));await _0x309a9d();return;}const _0x566843=resolveRemovedCommand(_0x201cbf,_0x596584);if(_0x566843)throw CliErrors['validation'](_0x566843[_0x19ceb9(0x159)],_0x566843[_0x19ceb9(0x151)]);if(!isKnownService(_0x201cbf)){const _0xc4c19f=resolveDynamicServiceCommand(cli[_0x19ceb9(0x143)],_0x4692fc);if(_0xc4c19f){if(_0x4692fc[_0x19ceb9(0x13f)]){console['log'](generateCommandHelp(_0xc4c19f[_0x19ceb9(0x14c)]));return;}Object['assign'](_0x4692fc,_0xc4c19f[_0x19ceb9(0x14b)]);const _0x24e0dd=buildConfigFromFlags(_0x4692fc);await initGlobalEnvironment(_0x24e0dd);const _0x2e87e3=createPipelineEnv(_0x24e0dd,_0x4692fc);_0x2e87e3[_0x19ceb9(0x162)]=_0xc4c19f[_0x19ceb9(0x162)],await runCommand(_0xc4c19f[_0x19ceb9(0x14c)],_0x2e87e3);return;}if(_0x4692fc[_0x19ceb9(0x13f)]){const _0xc04662=generateDynamicServiceHelp(_0x201cbf);if(_0xc04662){console[_0x19ceb9(0x13c)](_0xc04662);return;}}const {waitUntilExit:_0x1df14a}=render(a0_0x373d38(Help,{}));await _0x1df14a();return;}const _0x31e86f=getServiceEntry(_0x201cbf);if(!_0x596584){if(_0x4692fc['help']){console[_0x19ceb9(0x13c)](generateServiceHelp(_0x201cbf));return;}if(_0x31e86f[_0x19ceb9(0x141)])_0x596584=_0x31e86f[_0x19ceb9(0x141)];else{console[_0x19ceb9(0x13c)](generateServiceHelp(_0x201cbf));return;}}const _0x5654de=findDefinition(_0x201cbf,_0x596584);!_0x5654de&&(console[_0x19ceb9(0x13c)](generateServiceHelp(_0x201cbf)),handleError(CliErrors[_0x19ceb9(0x14d)](_0x201cbf+'\x20'+_0x596584)));if(_0x4692fc['help']){console['log'](generateCommandHelp(_0x5654de));return;}const _0xb43470=buildConfigFromFlags(_0x4692fc);await initGlobalEnvironment(_0xb43470);const _0x384f72=createPipelineEnv(_0xb43470,_0x4692fc);_0x384f72[_0x19ceb9(0x162)]=cli[_0x19ceb9(0x143)][_0x19ceb9(0x15a)](0x2),await runCommand(_0x5654de,_0x384f72);}function handleError(_0x36fd68){const _0x30a638=a0_0x3c01;if(_0x36fd68 instanceof CliError){_0x36fd68['code']===_0x30a638(0x161)&&(process[_0x30a638(0x163)]['write'](_0x30a638(0x164)),process[_0x30a638(0x160)](0x0));console[_0x30a638(0x153)]('Error:\x20'+_0x36fd68[_0x30a638(0x159)]);if(_0x36fd68['hint'])console[_0x30a638(0x153)](_0x30a638(0x152)+_0x36fd68[_0x30a638(0x151)]);process[_0x30a638(0x160)](_0x36fd68[_0x30a638(0x15c)]);}isUserCancellation(_0x36fd68)&&(process[_0x30a638(0x163)][_0x30a638(0x13b)]('\x0aCancelled.\x0a'),process['exit'](0x0)),console[_0x30a638(0x153)](_0x30a638(0x14f),_0x36fd68),process[_0x30a638(0x160)](0x1);}function isUserCancellation(_0x42efcf){const _0x4e8948=a0_0x3c01;if(!(_0x42efcf instanceof Error))return![];if(_0x42efcf['name']===_0x4e8948(0x148))return!![];if(_0x42efcf[_0x4e8948(0x155)]===_0x4e8948(0x15b))return!![];if(_0x42efcf[_0x4e8948(0x155)]===_0x4e8948(0x13e))return!![];return![];}
2
+ (function(_0x11b5a1,_0x4142ec){const _0x3ecaa6=a0_0x27d1,_0x44bf0d=_0x11b5a1();while(!![]){try{const _0x399e38=parseInt(_0x3ecaa6(0xaa))/0x1*(-parseInt(_0x3ecaa6(0x94))/0x2)+parseInt(_0x3ecaa6(0xa9))/0x3*(-parseInt(_0x3ecaa6(0x7e))/0x4)+parseInt(_0x3ecaa6(0x8f))/0x5*(-parseInt(_0x3ecaa6(0x8c))/0x6)+parseInt(_0x3ecaa6(0xa4))/0x7*(-parseInt(_0x3ecaa6(0x8d))/0x8)+parseInt(_0x3ecaa6(0x92))/0x9+-parseInt(_0x3ecaa6(0x96))/0xa+parseInt(_0x3ecaa6(0xa5))/0xb;if(_0x399e38===_0x4142ec)break;else _0x44bf0d['push'](_0x44bf0d['shift']());}catch(_0x284725){_0x44bf0d['push'](_0x44bf0d['shift']());}}}(a0_0x2f7c,0x911b4));import{jsx as a0_0x2ae525}from'react/jsx-runtime';import a0_0x37bb0e from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';function a0_0x27d1(_0x576bd5,_0x280527){_0x576bd5=_0x576bd5-0x7e;const _0x2f7c82=a0_0x2f7c();let _0x27d1aa=_0x2f7c82[_0x576bd5];return _0x27d1aa;}import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions,resolveRemovedCommand}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';function a0_0x2f7c(){const _0x4df6ee=['unknownCommand','ExitPromptError','Hint:\x20','771YUKMRo','43QSDTxX','12268uoaDWc','input','hint','exit','definition','ERR_STREAM_DESTROYED','cancelled','\x0aCancelled.\x0a','./framework/preparse.js','code','[preparse]\x20','original','flags','defaultCommand','2082qOsrSL','2162584WHYsgz','handler','4395hXrtDl','flatMap','config','7985934eopeWF','exitCode','35812pcWWDY','doctor','5874020TCbNeo','log','assign','stderr',':\x20--','write','message','ERR_USE_AFTER_CLOSE','Unexpected\x20error:','name','validation','length','help','args','7BKYusX','26707395MGGzUD'];a0_0x2f7c=function(){return _0x4df6ee;};return a0_0x2f7c();}const helpText=generateFullHelp(),cli=a0_0x37bb0e(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()['catch'](handleError);async function main(){try{await run();}catch(_0x559d45){handleError(_0x559d45);}}async function run(){const _0x1fe891=a0_0x27d1;let _0x1f443b=cli[_0x1fe891(0x7f)][0x0],_0x3704f2=cli[_0x1fe891(0x7f)][0x1];const _0x43f7b9=cli[_0x1fe891(0x8a)];try{const {correctFlags:_0x11be7a}=await import(_0x1fe891(0x86)),_0xd7ff6d=getAllDefinitions()[_0x1fe891(0x90)](_0x204e5c=>_0x204e5c[_0x1fe891(0x8a)]??[]),{flags:_0x39277f,corrections:_0xe9cfa8}=_0x11be7a(_0x43f7b9,_0xd7ff6d);if(_0xe9cfa8[_0x1fe891(0xa1)]>0x0){for(const _0x57cbb4 of _0xe9cfa8){process['stderr'][_0x1fe891(0x9b)](_0x1fe891(0x88)+_0x57cbb4[_0x1fe891(0x8e)]+_0x1fe891(0x9a)+_0x57cbb4[_0x1fe891(0x89)]+'\x20->\x20--'+_0x57cbb4['corrected']+'\x0a');}Object[_0x1fe891(0x98)](_0x43f7b9,_0x39277f);}}catch{}if(!_0x1f443b){const {waitUntilExit:_0x48a152}=render(a0_0x2ae525(Help,{}));await _0x48a152();return;}const _0x12827c=resolveRemovedCommand(_0x1f443b,_0x3704f2);if(_0x12827c)throw CliErrors[_0x1fe891(0xa0)](_0x12827c[_0x1fe891(0x9c)],_0x12827c[_0x1fe891(0x80)]);if(!isKnownService(_0x1f443b)){const _0x5c6fe1=resolveDynamicServiceCommand(cli[_0x1fe891(0x7f)],_0x43f7b9);if(_0x5c6fe1){if(_0x43f7b9[_0x1fe891(0xa2)]){console[_0x1fe891(0x97)](generateCommandHelp(_0x5c6fe1['definition']));return;}Object[_0x1fe891(0x98)](_0x43f7b9,_0x5c6fe1['flags']);const _0x18b1af=buildConfigFromFlags(_0x43f7b9);await initGlobalEnvironment(_0x18b1af);const _0x59900c=createPipelineEnv(_0x18b1af,_0x43f7b9);_0x59900c[_0x1fe891(0xa3)]=_0x5c6fe1[_0x1fe891(0xa3)],await runCommand(_0x5c6fe1[_0x1fe891(0x82)],_0x59900c);return;}if(_0x43f7b9[_0x1fe891(0xa2)]){const _0x22e543=generateDynamicServiceHelp(_0x1f443b);if(_0x22e543){console[_0x1fe891(0x97)](_0x22e543);return;}}const {waitUntilExit:_0x2285ba}=render(a0_0x2ae525(Help,{}));await _0x2285ba();return;}const _0x6b3ab0=getServiceEntry(_0x1f443b);if(!_0x3704f2){if(_0x43f7b9[_0x1fe891(0xa2)]){console[_0x1fe891(0x97)](generateServiceHelp(_0x1f443b));return;}if(_0x6b3ab0[_0x1fe891(0x8b)])_0x3704f2=_0x6b3ab0[_0x1fe891(0x8b)];else{console[_0x1fe891(0x97)](generateServiceHelp(_0x1f443b));return;}}const _0x146fd9=findDefinition(_0x1f443b,_0x3704f2);!_0x146fd9&&(console[_0x1fe891(0x97)](generateServiceHelp(_0x1f443b)),handleError(CliErrors[_0x1fe891(0xa6)](_0x1f443b+'\x20'+_0x3704f2)));if(_0x43f7b9[_0x1fe891(0xa2)]){console[_0x1fe891(0x97)](generateCommandHelp(_0x146fd9));return;}const _0x238c09=buildConfigFromFlags(_0x43f7b9);_0x1f443b!==_0x1fe891(0x91)&&_0x1f443b!==_0x1fe891(0x95)&&await initGlobalEnvironment(_0x238c09);const _0xeacff7=createPipelineEnv(_0x238c09,_0x43f7b9);_0xeacff7[_0x1fe891(0xa3)]=cli['input']['slice'](0x2),await runCommand(_0x146fd9,_0xeacff7);}function handleError(_0x568f5d){const _0x3dcf14=a0_0x27d1;if(_0x568f5d instanceof CliError){_0x568f5d[_0x3dcf14(0x87)]===_0x3dcf14(0x84)&&(process[_0x3dcf14(0x99)][_0x3dcf14(0x9b)](_0x3dcf14(0x85)),process[_0x3dcf14(0x81)](0x0));console['error']('Error:\x20'+_0x568f5d[_0x3dcf14(0x9c)]);if(_0x568f5d['hint'])console['error'](_0x3dcf14(0xa8)+_0x568f5d[_0x3dcf14(0x80)]);process[_0x3dcf14(0x81)](_0x568f5d[_0x3dcf14(0x93)]);}isUserCancellation(_0x568f5d)&&(process['stderr'][_0x3dcf14(0x9b)](_0x3dcf14(0x85)),process['exit'](0x0)),console['error'](_0x3dcf14(0x9e),_0x568f5d),process['exit'](0x1);}function isUserCancellation(_0x4bb569){const _0x22c33b=a0_0x27d1;if(!(_0x4bb569 instanceof Error))return![];if(_0x4bb569[_0x22c33b(0x9f)]===_0x22c33b(0xa7))return!![];if(_0x4bb569[_0x22c33b(0x87)]===_0x22c33b(0x9d))return!![];if(_0x4bb569[_0x22c33b(0x87)]===_0x22c33b(0x83))return!![];return![];}
@@ -1 +1 @@
1
- const a1_0x4588b6=a1_0x1ff0;(function(_0x25e222,_0xeb423f){const _0x33a8f7=a1_0x1ff0,_0x2a7a0e=_0x25e222();while(!![]){try{const _0x2a319b=parseInt(_0x33a8f7(0x20a))/0x1*(-parseInt(_0x33a8f7(0x1ac))/0x2)+parseInt(_0x33a8f7(0x1d8))/0x3*(parseInt(_0x33a8f7(0x1e1))/0x4)+-parseInt(_0x33a8f7(0x209))/0x5+parseInt(_0x33a8f7(0x201))/0x6*(parseInt(_0x33a8f7(0x1bf))/0x7)+parseInt(_0x33a8f7(0x1bc))/0x8+-parseInt(_0x33a8f7(0x1a9))/0x9+parseInt(_0x33a8f7(0x1a2))/0xa*(-parseInt(_0x33a8f7(0x1ce))/0xb);if(_0x2a319b===_0xeb423f)break;else _0x2a7a0e['push'](_0x2a7a0e['shift']());}catch(_0x50dce2){_0x2a7a0e['push'](_0x2a7a0e['shift']());}}}(a1_0x4337,0x70d98));function a1_0x4337(){const _0x10af78=['Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','summary','Execute\x20a\x20known\x20Personal\x20Backend\x20Function\x20script\x20through\x20its\x20runtime\x20execute\x20endpoint.','22bxgUBE','Use\x20when\x20the\x20target\x20Personal\x20BFF\x20script\x20id\x20is\x20confirmed\x20under\x20the\x20current\x20user\x20and\x20you\x20need\x20to\x20execute\x20that\x20personal\x20script\x20with\x20optional\x20JSON\x20params','method','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','read','Returns\x20script\x20business\x20payload','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','Get\x20dataset\x20detail','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','Exact\x20endpoint\x20function\x20name','9TDLLDc','operations\x20describes\x20runtime\x20APIs','List\x20datasets\x20with\x20pagination','result\x20rows\x20contain\x20aggregate\x20aliases','##\x20List\x20datasets','/api/{appCode}/{datasetCode}/aggregate','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','/api/runtime-bff/personal/{id}/execute','843000qXFblq','join','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','{\x22param\x22:\x22value\x22}','lovrabet\x20personal-bff\x20exec\x20--id\x20<id>\x20--params\x20\x27{}\x27','dataset_data_get_one','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','whenToUse','tableData\x20contains\x20records','paging\x20contains\x20pagination','dataset_list','/api/{appCode}/{datasetCode}/getOne','Use\x20when\x20you\x20need\x20to\x20insert\x20one\x20business\x20record\x20into\x20a\x20dataset','Execute\x20a\x20BF\x20endpoint\x20function','API\x20doc\x20code\x20not\x20found:\x20','Execute\x20Personal\x20Backend\x20Function','For\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged\x20and\x20increment\x20only\x20currentPage,\x20which\x20starts\x20at\x201.','lovrabet\x20bff\x20detail\x20--name\x20<functionName>','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','Filter\x20dataset\x20records','##\x20Get\x20BF\x20endpoint\x20function\x20contract\x0a\x0aInspect\x20one\x20known\x20endpoint\x20function\x20through\x20the\x20AK-authenticated\x20exact\x20detail\x20API.','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','title','Current\x20app\x20code','appCode','None','{\x22fieldName\x22:\x22value\x22}','toLowerCase','/api/{appCode}/{datasetCode}/create','includes','POST','1998YZbKQY','dataset','detail','Get\x20one\x20dataset\x20record','Use\x20when\x20the\x20target\x20sqlCode\x20exists\x20and\x20you\x20need\x20to\x20execute\x20that\x20custom\x20SQL','Personal\x20BFF\x20scripts\x20are\x20user-owned\x20and\x20scoped\x20per\x20app.','32-character\x20dataset\x20code','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','2403330TbYnxh','340303tHgwIF','Get\x20a\x20BF\x20endpoint\x20contract\x20by\x20app\x20and\x20function\x20name','Use\x20when\x20you\x20need\x20a\x20paginated\x20runtime\x20dataset\x20list\x20by\x20appCode\x20and\x20want\x20to\x20collect\x20available\x20datasetCode\x20values','Show\x20runtime\x20API\x20documentation\x20by\x20code','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','dataset_data_filter','keyword','datasetCode','where,\x20select,\x20orderBy,\x20currentPage,\x20and\x20pageSize\x20belong\x20inside\x20one\x20--params\x20JSON\x20object;\x20they\x20are\x20not\x20standalone\x20CLI\x20flags.','dataset_data_aggregate','code','/api/dataset/get-dataset-list-by-app-code','/api/dataset/getOneByCode?code={datasetCode}','Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20script\x20ID','Dataset\x20detail','/api/custom/executeSql','##\x20Filter\x20dataset\x20data','validation','str','length','4545770xlfOxj','Function\x20execution\x20may\x20have\x20business\x20side\x20effects;\x20inspect\x20detail\x20before\x20execution.','find','relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned','custom_sql','GET','Execute\x20custom\x20SQL','770706pvLWFg','Get\x20BF\x20endpoint\x20function\x20contract','API\x20doc\x20code,\x20for\x20example\x20dataset_list','2OGGvLU','dataset_data_create','Execute\x20BF\x20endpoint\x20function','fields/properties\x20describe\x20data\x20shape','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','List\x20datasets','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','##\x20Aggregate\x20dataset\x20data','where\x20filters\x20before\x20aggregation','string','category','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','Use\x20when\x20you\x20need\x20to\x20read\x20business\x20data\x20with\x20where,\x20orderBy,\x20pagination,\x20or\x20similar\x20filters','list','6354064aOPHtX','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','##\x20Dataset\x20detail','17899zOIEmx','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','trim','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','Endpoint\x20function\x20name','Verify\x20tableData\x20and\x20paging\x20before\x20treating\x20the\x20response\x20as\x20a\x20business\x20fact.','Personal\x20Backend\x20Function\x20script\x20ID,\x20for\x20example\x20123','Create\x20dataset\x20record','path','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','/client/bff/endpoint/{appCode}/{functionName}'];a1_0x4337=function(){return _0x10af78;};return a1_0x4337();}import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':'category','type':a1_0x4588b6(0x1b7),'description':a1_0x4588b6(0x1cb)},KEYWORD_FLAG={'name':a1_0x4588b6(0x210),'type':'string','description':'Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text'},DOC_CODE_FLAG={'name':'code','type':a1_0x4588b6(0x1b7),'required':!![],'description':a1_0x4588b6(0x1ab)},DOCS=[{'code':a1_0x4588b6(0x1ec),'category':'dataset','title':a1_0x4588b6(0x1b3),'method':a1_0x4588b6(0x200),'path':a1_0x4588b6(0x199),'summary':a1_0x4588b6(0x1da),'whenToUse':a1_0x4588b6(0x20c),'pathParams':[],'queryParams':[],'bodySchema':'{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','responseHighlights':['tableData\x20contains\x20dataset\x20id/code/name','paging.totalCount\x20gives\x20total\x20rows'],'examples':['lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress'],'notes':[a1_0x4588b6(0x1e3)],'markdown':[a1_0x4588b6(0x1dc),'','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.'][a1_0x4588b6(0x1e2)]('\x0a')},{'code':'dataset_detail','category':a1_0x4588b6(0x202),'title':a1_0x4588b6(0x19c),'method':a1_0x4588b6(0x1a7),'path':a1_0x4588b6(0x19a),'summary':a1_0x4588b6(0x1d5),'whenToUse':'Use\x20when\x20you\x20need\x20fields,\x20table\x20info,\x20relations,\x20or\x20operation\x20definitions\x20for\x20a\x20dataset\x20code','pathParams':[],'queryParams':[{'name':a1_0x4588b6(0x214),'description':a1_0x4588b6(0x207)}],'bodySchema':'None','responseHighlights':[a1_0x4588b6(0x1af),a1_0x4588b6(0x1a5),a1_0x4588b6(0x1d9)],'examples':[a1_0x4588b6(0x1c0)],'notes':[a1_0x4588b6(0x1d1)],'markdown':[a1_0x4588b6(0x1be),'',a1_0x4588b6(0x1f4)][a1_0x4588b6(0x1e2)]('\x0a')},{'code':a1_0x4588b6(0x20f),'category':'dataset','title':'Filter\x20dataset\x20data','method':a1_0x4588b6(0x200),'path':'/api/{appCode}/{datasetCode}/filter','summary':a1_0x4588b6(0x1f5),'whenToUse':a1_0x4588b6(0x1ba),'pathParams':[{'name':'appCode','description':a1_0x4588b6(0x1f9)},{'name':a1_0x4588b6(0x211),'description':a1_0x4588b6(0x207)}],'queryParams':[],'bodySchema':a1_0x4588b6(0x1df),'responseHighlights':[a1_0x4588b6(0x1ea),a1_0x4588b6(0x1eb)],'examples':['lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27'],'notes':[a1_0x4588b6(0x212),a1_0x4588b6(0x1f2),a1_0x4588b6(0x1c5),a1_0x4588b6(0x1b9)],'markdown':[a1_0x4588b6(0x19e),'',a1_0x4588b6(0x1b0)][a1_0x4588b6(0x1e2)]('\x0a')},{'code':a1_0x4588b6(0x213),'category':a1_0x4588b6(0x202),'title':'Aggregate\x20dataset\x20data','method':a1_0x4588b6(0x200),'path':a1_0x4588b6(0x1dd),'summary':'Aggregate\x20dataset\x20records','whenToUse':'Use\x20when\x20you\x20need\x20groupBy\x20plus\x20count,\x20sum,\x20avg,\x20max,\x20or\x20min\x20aggregates','pathParams':[{'name':a1_0x4588b6(0x1fa),'description':a1_0x4588b6(0x1f9)},{'name':a1_0x4588b6(0x211),'description':a1_0x4588b6(0x207)}],'queryParams':[],'bodySchema':a1_0x4588b6(0x1f7),'responseHighlights':[a1_0x4588b6(0x1db),a1_0x4588b6(0x1b6)],'examples':[a1_0x4588b6(0x1d4)],'notes':['Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.',a1_0x4588b6(0x1c2)],'markdown':[a1_0x4588b6(0x1b5),'',a1_0x4588b6(0x1e8)][a1_0x4588b6(0x1e2)]('\x0a')},{'code':a1_0x4588b6(0x1e7),'category':a1_0x4588b6(0x202),'title':'Get\x20one\x20dataset\x20record','method':a1_0x4588b6(0x200),'path':a1_0x4588b6(0x1ed),'summary':a1_0x4588b6(0x204),'whenToUse':'Use\x20when\x20you\x20already\x20know\x20the\x20record\x20id\x20and\x20need\x20one\x20business\x20row\x20from\x20a\x20dataset','pathParams':[{'name':a1_0x4588b6(0x1fa),'description':'Current\x20app\x20code'},{'name':a1_0x4588b6(0x211),'description':'32-character\x20dataset\x20code'}],'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_0x4588b6(0x1d6)],'markdown':a1_0x4588b6(0x1de)},{'code':a1_0x4588b6(0x1ad),'category':'dataset','title':a1_0x4588b6(0x1c7),'method':a1_0x4588b6(0x200),'path':a1_0x4588b6(0x1fe),'summary':'Create\x20a\x20dataset\x20record','whenToUse':a1_0x4588b6(0x1ee),'pathParams':[{'name':a1_0x4588b6(0x1fa),'description':a1_0x4588b6(0x1f9)},{'name':a1_0x4588b6(0x211),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x4588b6(0x1fc),'responseHighlights':[a1_0x4588b6(0x20e)],'examples':[a1_0x4588b6(0x1bd)],'notes':[a1_0x4588b6(0x1b4)],'markdown':a1_0x4588b6(0x1c3)},{'code':'bf_detail','category':'bf','title':a1_0x4588b6(0x1aa),'method':'GET','path':a1_0x4588b6(0x1ca),'summary':a1_0x4588b6(0x20b),'whenToUse':'Use\x20when\x20the\x20function\x20name\x20is\x20already\x20confirmed\x20and\x20you\x20need\x20that\x20ENDPOINT\x27s\x20runtime\x20metadata','pathParams':[{'name':a1_0x4588b6(0x1fa),'description':a1_0x4588b6(0x1f9)},{'name':'functionName','description':a1_0x4588b6(0x1d7)}],'queryParams':[],'bodySchema':a1_0x4588b6(0x1fb),'responseHighlights':['CLI\x20returns\x20appCode/functionName/description/version/gmtModified'],'examples':[a1_0x4588b6(0x1f3)],'notes':['This\x20is\x20an\x20exact\x20lookup\x20by\x20appCode\x20+\x20functionName.\x20The\x20CLI\x20does\x20not\x20enumerate\x20Backend\x20Function\x20definitions\x20or\x20expose\x20platform-only\x20fields.'],'markdown':a1_0x4588b6(0x1f6)},{'code':'bf_execute','category':'bf','title':a1_0x4588b6(0x1ae),'method':a1_0x4588b6(0x200),'path':'/api/endpoint/{appCode}/{functionName}','summary':a1_0x4588b6(0x1ef),'whenToUse':'Use\x20when\x20the\x20target\x20BF\x20functionName\x20is\x20confirmed\x20and\x20you\x20need\x20to\x20call\x20that\x20ENDPOINT','pathParams':[{'name':a1_0x4588b6(0x1fa),'description':'Current\x20app\x20code'},{'name':'functionName','description':a1_0x4588b6(0x1c4)}],'queryParams':[],'bodySchema':a1_0x4588b6(0x1e5),'responseHighlights':['Returns\x20script\x20business\x20payload'],'examples':['lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27'],'notes':[a1_0x4588b6(0x1e4)],'markdown':a1_0x4588b6(0x208)},{'code':'personal_bf_execute','category':'bf','title':a1_0x4588b6(0x1f1),'method':a1_0x4588b6(0x200),'path':a1_0x4588b6(0x1e0),'summary':a1_0x4588b6(0x19b),'whenToUse':a1_0x4588b6(0x1cf),'pathParams':[{'name':'id','description':a1_0x4588b6(0x1c6)}],'queryParams':[{'name':'appCode','description':a1_0x4588b6(0x1f9)}],'bodySchema':a1_0x4588b6(0x1e5),'responseHighlights':[a1_0x4588b6(0x1d3)],'examples':[a1_0x4588b6(0x1e6)],'notes':[a1_0x4588b6(0x206),a1_0x4588b6(0x1a3)],'markdown':['##\x20Execute\x20Personal\x20Backend\x20Function','',a1_0x4588b6(0x1cd)][a1_0x4588b6(0x1e2)]('\x0a')},{'code':'custom_sql_execute','category':a1_0x4588b6(0x1a6),'title':'Execute\x20custom\x20SQL','method':a1_0x4588b6(0x200),'path':a1_0x4588b6(0x19d),'summary':a1_0x4588b6(0x1a8),'whenToUse':a1_0x4588b6(0x205),'pathParams':[],'queryParams':[],'bodySchema':'{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','responseHighlights':['Returns\x20SQL\x20execution\x20payload'],'examples':[a1_0x4588b6(0x1c9)],'notes':[a1_0x4588b6(0x1b2)],'markdown':a1_0x4588b6(0x1b1)}];function entrySummary(_0x17d121){const _0xbdee41=a1_0x4588b6;return{'code':_0x17d121[_0xbdee41(0x214)],'category':_0x17d121[_0xbdee41(0x1b8)],'method':_0x17d121[_0xbdee41(0x1d0)],'path':_0x17d121[_0xbdee41(0x1c8)],'summary':_0x17d121[_0xbdee41(0x1cc)],'whenToUse':_0x17d121[_0xbdee41(0x1e9)]};}export function listApiDocEntries(_0x5beb81={}){const _0x52a74f=a1_0x4588b6,_0x351eff=String(_0x5beb81['category']||'')[_0x52a74f(0x1c1)](),_0x3fd01e=String(_0x5beb81[_0x52a74f(0x210)]||'')[_0x52a74f(0x1c1)]()[_0x52a74f(0x1fd)]();return DOCS['filter'](_0x460380=>{const _0xb743f6=_0x52a74f;if(_0x351eff&&_0x460380[_0xb743f6(0x1b8)]!==_0x351eff)return![];if(!_0x3fd01e)return!![];return[_0x460380[_0xb743f6(0x214)],_0x460380[_0xb743f6(0x1b8)],_0x460380[_0xb743f6(0x1d0)],_0x460380['path'],_0x460380[_0xb743f6(0x1cc)],_0x460380[_0xb743f6(0x1e9)],_0x460380[_0xb743f6(0x1f8)]]['join']('\x20')['toLowerCase']()[_0xb743f6(0x1ff)](_0x3fd01e);})['map'](entrySummary);}function a1_0x1ff0(_0x55bc81,_0x1058bf){_0x55bc81=_0x55bc81-0x199;const _0x433720=a1_0x4337();let _0x1ff0d4=_0x433720[_0x55bc81];return _0x1ff0d4;}export function getApiDocDetail(_0x591176){const _0x44478a=a1_0x4588b6,_0x178097=DOCS[_0x44478a(0x1a4)](_0x4a7bf8=>_0x4a7bf8[_0x44478a(0x214)]===_0x591176);if(!_0x178097)throw CliErrors[_0x44478a(0x19f)](_0x44478a(0x1f0)+_0x591176);return{..._0x178097};}const apiDocList={'service':'api-doc','command':a1_0x4588b6(0x1bb),'description':'List\x20available\x20runtime\x20API\x20documentation\x20entries','risk':a1_0x4588b6(0x1d2),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x50e6a1){const _0x3eaf6f=a1_0x4588b6,_0x16ce55=listApiDocEntries({'category':_0x50e6a1[_0x3eaf6f(0x1a0)](_0x3eaf6f(0x1b8)),'keyword':_0x50e6a1[_0x3eaf6f(0x1a0)]('keyword')});return{'ok':!![],'data':{'total':_0x16ce55[_0x3eaf6f(0x1a1)],'items':_0x16ce55}};}},apiDocDetail={'service':'api-doc','command':a1_0x4588b6(0x203),'description':a1_0x4588b6(0x20d),'risk':a1_0x4588b6(0x1d2),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x504133){const _0xece09f=a1_0x4588b6;return{'ok':!![],'data':getApiDocDetail(_0x504133[_0xece09f(0x1a0)](_0xece09f(0x214)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
1
+ const a1_0x2d8212=a1_0x21de;(function(_0x3adc7e,_0x4757b2){const _0x26f3fb=a1_0x21de,_0x2234ef=_0x3adc7e();while(!![]){try{const _0x9461f3=parseInt(_0x26f3fb(0x26a))/0x1+-parseInt(_0x26f3fb(0x232))/0x2+parseInt(_0x26f3fb(0x217))/0x3*(-parseInt(_0x26f3fb(0x227))/0x4)+-parseInt(_0x26f3fb(0x268))/0x5+parseInt(_0x26f3fb(0x21a))/0x6*(-parseInt(_0x26f3fb(0x226))/0x7)+parseInt(_0x26f3fb(0x248))/0x8*(-parseInt(_0x26f3fb(0x26c))/0x9)+parseInt(_0x26f3fb(0x1ff))/0xa;if(_0x9461f3===_0x4757b2)break;else _0x2234ef['push'](_0x2234ef['shift']());}catch(_0x38ed6d){_0x2234ef['push'](_0x2234ef['shift']());}}}(a1_0x3027,0xbd707));function a1_0x21de(_0x4cadf4,_0x32b142){_0x4cadf4=_0x4cadf4-0x1f2;const _0x3027e4=a1_0x3027();let _0x21deff=_0x3027e4[_0x4cadf4];return _0x21deff;}function a1_0x3027(){const _0xa6a25a=['32-character\x20dataset\x20code','Use\x20when\x20you\x20need\x20to\x20insert\x20one\x20business\x20record\x20into\x20a\x20dataset','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','lovrabet\x20personal-bff\x20exec\x20--id\x20<id>\x20--params\x20\x27{}\x27','Execute\x20a\x20BF\x20endpoint\x20function','1614cZQOzz','Aggregate\x20dataset\x20records','Filter\x20dataset\x20data','174TxCUYX','paging\x20contains\x20pagination','dataset','CLI\x20returns\x20appCode/functionName/description/version/gmtModified','Personal\x20BFF\x20scripts\x20are\x20user-owned\x20and\x20scoped\x20per\x20app.','Execute\x20Personal\x20Backend\x20Function','functionName','##\x20Get\x20BF\x20endpoint\x20function\x20contract\x0a\x0aInspect\x20one\x20known\x20endpoint\x20function\x20through\x20the\x20AK-authenticated\x20exact\x20detail\x20API.','Execute\x20custom\x20SQL','Returns\x20SQL\x20execution\x20payload','api-doc','method','365253OXSWVE','2332NrvvGW','tableData\x20contains\x20dataset\x20id/code/name','Use\x20when\x20the\x20function\x20name\x20is\x20already\x20confirmed\x20and\x20you\x20need\x20that\x20ENDPOINT\x27s\x20runtime\x20metadata','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','operations\x20describes\x20runtime\x20APIs','Execute\x20a\x20known\x20Personal\x20Backend\x20Function\x20script\x20through\x20its\x20runtime\x20execute\x20endpoint.','Use\x20when\x20you\x20need\x20fields,\x20table\x20info,\x20relations,\x20or\x20operation\x20definitions\x20for\x20a\x20dataset\x20code','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','/api/runtime-bff/personal/{id}/execute','Show\x20runtime\x20API\x20documentation\x20by\x20code','List\x20available\x20runtime\x20API\x20documentation\x20entries','2456238RXJaaV','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','/api/{appCode}/{datasetCode}/create','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','API\x20doc\x20code,\x20for\x20example\x20dataset_list','##\x20Filter\x20dataset\x20data','where\x20filters\x20before\x20aggregation','Personal\x20Backend\x20Function\x20script\x20ID,\x20for\x20example\x20123','Current\x20app\x20code','Use\x20when\x20you\x20need\x20a\x20paginated\x20runtime\x20dataset\x20list\x20by\x20appCode\x20and\x20want\x20to\x20collect\x20available\x20datasetCode\x20values','read','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','Endpoint\x20function\x20name','string','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','##\x20List\x20datasets','where,\x20select,\x20orderBy,\x20currentPage,\x20and\x20pageSize\x20belong\x20inside\x20one\x20--params\x20JSON\x20object;\x20they\x20are\x20not\x20standalone\x20CLI\x20flags.','1616VnNkkQ','Get\x20dataset\x20detail','POST','This\x20is\x20an\x20exact\x20lookup\x20by\x20appCode\x20+\x20functionName.\x20The\x20CLI\x20does\x20not\x20enumerate\x20Backend\x20Function\x20definitions\x20or\x20expose\x20platform-only\x20fields.','Get\x20BF\x20endpoint\x20function\x20contract','None','{\x22fieldName\x22:\x22value\x22}','Get\x20a\x20BF\x20endpoint\x20contract\x20by\x20app\x20and\x20function\x20name','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','Execute\x20BF\x20endpoint\x20function','appCode','Use\x20when\x20you\x20need\x20to\x20read\x20business\x20data\x20with\x20where,\x20orderBy,\x20pagination,\x20or\x20similar\x20filters','/api/{appCode}/{datasetCode}/getOne','Create\x20dataset\x20record','paging.totalCount\x20gives\x20total\x20rows','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','##\x20Execute\x20Personal\x20Backend\x20Function','Create\x20a\x20dataset\x20record','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','trim','Filter\x20dataset\x20records','Use\x20when\x20you\x20already\x20know\x20the\x20record\x20id\x20and\x20need\x20one\x20business\x20row\x20from\x20a\x20dataset','datasetCode','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','filter','Aggregate\x20dataset\x20data','Use\x20when\x20the\x20target\x20sqlCode\x20exists\x20and\x20you\x20need\x20to\x20execute\x20that\x20custom\x20SQL','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','join','list','whenToUse','title','3494660PhcwwG','fields/properties\x20describe\x20data\x20shape','1023826XKnWaa','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','43920VrLaPr','##\x20Dataset\x20detail','str','path','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','code','dataset_data_get_one','length','Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20script\x20ID','Use\x20when\x20the\x20target\x20Personal\x20BFF\x20script\x20id\x20is\x20confirmed\x20under\x20the\x20current\x20user\x20and\x20you\x20need\x20to\x20execute\x20that\x20personal\x20script\x20with\x20optional\x20JSON\x20params','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','{\x22id\x22:123}','44917730tbLWmi','validation','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','GET','Function\x20execution\x20may\x20have\x20business\x20side\x20effects;\x20inspect\x20detail\x20before\x20execution.','##\x20Aggregate\x20dataset\x20data','result\x20rows\x20contain\x20aggregate\x20aliases','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','dataset_data_aggregate','relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned','category','Returns\x20script\x20business\x20payload','dataset_data_filter','List\x20datasets','/client/bff/endpoint/{appCode}/{functionName}','Exact\x20endpoint\x20function\x20name','Use\x20when\x20the\x20target\x20BF\x20functionName\x20is\x20confirmed\x20and\x20you\x20need\x20to\x20call\x20that\x20ENDPOINT','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','keyword'];a1_0x3027=function(){return _0xa6a25a;};return a1_0x3027();}import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':'category','type':a1_0x2d8212(0x243),'description':a1_0x2d8212(0x245)},KEYWORD_FLAG={'name':a1_0x2d8212(0x211),'type':a1_0x2d8212(0x243),'description':'Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text'},DOC_CODE_FLAG={'name':a1_0x2d8212(0x1f7),'type':a1_0x2d8212(0x243),'required':!![],'description':a1_0x2d8212(0x23a)},DOCS=[{'code':'dataset_list','category':a1_0x2d8212(0x21c),'title':a1_0x2d8212(0x20c),'method':a1_0x2d8212(0x24a),'path':'/api/dataset/get-dataset-list-by-app-code','summary':'List\x20datasets\x20with\x20pagination','whenToUse':a1_0x2d8212(0x23f),'pathParams':[],'queryParams':[],'bodySchema':'{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','responseHighlights':[a1_0x2d8212(0x228),a1_0x2d8212(0x256)],'examples':[a1_0x2d8212(0x206)],'notes':[a1_0x2d8212(0x22a)],'markdown':[a1_0x2d8212(0x246),'',a1_0x2d8212(0x263)][a1_0x2d8212(0x264)]('\x0a')},{'code':'dataset_detail','category':a1_0x2d8212(0x21c),'title':'Dataset\x20detail','method':'GET','path':'/api/dataset/getOneByCode?code={datasetCode}','summary':a1_0x2d8212(0x249),'whenToUse':a1_0x2d8212(0x22d),'pathParams':[],'queryParams':[{'name':a1_0x2d8212(0x1f7),'description':'32-character\x20dataset\x20code'}],'bodySchema':a1_0x2d8212(0x24d),'responseHighlights':[a1_0x2d8212(0x269),a1_0x2d8212(0x208),a1_0x2d8212(0x22b)],'examples':[a1_0x2d8212(0x214)],'notes':[a1_0x2d8212(0x201)],'markdown':[a1_0x2d8212(0x1f2),'',a1_0x2d8212(0x237)][a1_0x2d8212(0x264)]('\x0a')},{'code':a1_0x2d8212(0x20b),'category':a1_0x2d8212(0x21c),'title':a1_0x2d8212(0x219),'method':a1_0x2d8212(0x24a),'path':'/api/{appCode}/{datasetCode}/filter','summary':a1_0x2d8212(0x25c),'whenToUse':a1_0x2d8212(0x253),'pathParams':[{'name':a1_0x2d8212(0x252),'description':a1_0x2d8212(0x23e)},{'name':a1_0x2d8212(0x25e),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x2d8212(0x22e),'responseHighlights':['tableData\x20contains\x20records',a1_0x2d8212(0x21b)],'examples':['lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27',a1_0x2d8212(0x235)],'notes':[a1_0x2d8212(0x247),'For\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged\x20and\x20increment\x20only\x20currentPage,\x20which\x20starts\x20at\x201.','Verify\x20tableData\x20and\x20paging\x20before\x20treating\x20the\x20response\x20as\x20a\x20business\x20fact.',a1_0x2d8212(0x1f5)],'markdown':[a1_0x2d8212(0x23b),'','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.'][a1_0x2d8212(0x264)]('\x0a')},{'code':a1_0x2d8212(0x207),'category':a1_0x2d8212(0x21c),'title':a1_0x2d8212(0x261),'method':a1_0x2d8212(0x24a),'path':'/api/{appCode}/{datasetCode}/aggregate','summary':a1_0x2d8212(0x218),'whenToUse':'Use\x20when\x20you\x20need\x20groupBy\x20plus\x20count,\x20sum,\x20avg,\x20max,\x20or\x20min\x20aggregates','pathParams':[{'name':a1_0x2d8212(0x252),'description':a1_0x2d8212(0x23e)},{'name':'datasetCode','description':a1_0x2d8212(0x212)}],'queryParams':[],'bodySchema':a1_0x2d8212(0x244),'responseHighlights':[a1_0x2d8212(0x205),a1_0x2d8212(0x23c)],'examples':[a1_0x2d8212(0x25f)],'notes':[a1_0x2d8212(0x233),a1_0x2d8212(0x236)],'markdown':[a1_0x2d8212(0x204),'',a1_0x2d8212(0x257)][a1_0x2d8212(0x264)]('\x0a')},{'code':a1_0x2d8212(0x1f8),'category':a1_0x2d8212(0x21c),'title':'Get\x20one\x20dataset\x20record','method':a1_0x2d8212(0x24a),'path':a1_0x2d8212(0x254),'summary':'Get\x20one\x20dataset\x20record','whenToUse':a1_0x2d8212(0x25d),'pathParams':[{'name':a1_0x2d8212(0x252),'description':a1_0x2d8212(0x23e)},{'name':'datasetCode','description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x2d8212(0x1fe),'responseHighlights':['Returns\x20one\x20matching\x20business\x20record'],'examples':[a1_0x2d8212(0x1fd)],'notes':[a1_0x2d8212(0x239)],'markdown':a1_0x2d8212(0x241)},{'code':'dataset_data_create','category':a1_0x2d8212(0x21c),'title':a1_0x2d8212(0x255),'method':a1_0x2d8212(0x24a),'path':a1_0x2d8212(0x234),'summary':a1_0x2d8212(0x259),'whenToUse':a1_0x2d8212(0x213),'pathParams':[{'name':'appCode','description':a1_0x2d8212(0x23e)},{'name':'datasetCode','description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x2d8212(0x24e),'responseHighlights':[a1_0x2d8212(0x210)],'examples':[a1_0x2d8212(0x25a)],'notes':['This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.'],'markdown':'##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.'},{'code':'bf_detail','category':'bf','title':a1_0x2d8212(0x24c),'method':a1_0x2d8212(0x202),'path':a1_0x2d8212(0x20d),'summary':a1_0x2d8212(0x24f),'whenToUse':a1_0x2d8212(0x229),'pathParams':[{'name':a1_0x2d8212(0x252),'description':a1_0x2d8212(0x23e)},{'name':a1_0x2d8212(0x220),'description':a1_0x2d8212(0x20e)}],'queryParams':[],'bodySchema':a1_0x2d8212(0x24d),'responseHighlights':[a1_0x2d8212(0x21d)],'examples':['lovrabet\x20bff\x20detail\x20--name\x20<functionName>'],'notes':[a1_0x2d8212(0x24b)],'markdown':a1_0x2d8212(0x221)},{'code':'bf_execute','category':'bf','title':a1_0x2d8212(0x251),'method':a1_0x2d8212(0x24a),'path':'/api/endpoint/{appCode}/{functionName}','summary':a1_0x2d8212(0x216),'whenToUse':a1_0x2d8212(0x20f),'pathParams':[{'name':'appCode','description':a1_0x2d8212(0x23e)},{'name':a1_0x2d8212(0x220),'description':a1_0x2d8212(0x242)}],'queryParams':[],'bodySchema':'{\x22param\x22:\x22value\x22}','responseHighlights':[a1_0x2d8212(0x20a)],'examples':['lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27'],'notes':[a1_0x2d8212(0x1f6)],'markdown':a1_0x2d8212(0x238)},{'code':'personal_bf_execute','category':'bf','title':a1_0x2d8212(0x21f),'method':a1_0x2d8212(0x24a),'path':a1_0x2d8212(0x22f),'summary':a1_0x2d8212(0x1fa),'whenToUse':a1_0x2d8212(0x1fb),'pathParams':[{'name':'id','description':a1_0x2d8212(0x23d)}],'queryParams':[{'name':a1_0x2d8212(0x252),'description':a1_0x2d8212(0x23e)}],'bodySchema':'{\x22param\x22:\x22value\x22}','responseHighlights':[a1_0x2d8212(0x20a)],'examples':[a1_0x2d8212(0x215)],'notes':[a1_0x2d8212(0x21e),a1_0x2d8212(0x203)],'markdown':[a1_0x2d8212(0x258),'',a1_0x2d8212(0x22c)][a1_0x2d8212(0x264)]('\x0a')},{'code':'custom_sql_execute','category':'custom_sql','title':a1_0x2d8212(0x222),'method':a1_0x2d8212(0x24a),'path':'/api/custom/executeSql','summary':a1_0x2d8212(0x222),'whenToUse':a1_0x2d8212(0x262),'pathParams':[],'queryParams':[],'bodySchema':'{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','responseHighlights':[a1_0x2d8212(0x223)],'examples':[a1_0x2d8212(0x1fc)],'notes':[a1_0x2d8212(0x26b)],'markdown':a1_0x2d8212(0x250)}];function entrySummary(_0x39b063){const _0xcf6bb4=a1_0x2d8212;return{'code':_0x39b063[_0xcf6bb4(0x1f7)],'category':_0x39b063[_0xcf6bb4(0x209)],'method':_0x39b063['method'],'path':_0x39b063[_0xcf6bb4(0x1f4)],'summary':_0x39b063['summary'],'whenToUse':_0x39b063['whenToUse']};}export function listApiDocEntries(_0x2f251f={}){const _0x274c8f=a1_0x2d8212,_0x4e3515=String(_0x2f251f[_0x274c8f(0x209)]||'')['trim'](),_0x809364=String(_0x2f251f[_0x274c8f(0x211)]||'')[_0x274c8f(0x25b)]()['toLowerCase']();return DOCS[_0x274c8f(0x260)](_0x4e31ff=>{const _0x245847=_0x274c8f;if(_0x4e3515&&_0x4e31ff[_0x245847(0x209)]!==_0x4e3515)return![];if(!_0x809364)return!![];return[_0x4e31ff[_0x245847(0x1f7)],_0x4e31ff[_0x245847(0x209)],_0x4e31ff[_0x245847(0x225)],_0x4e31ff[_0x245847(0x1f4)],_0x4e31ff['summary'],_0x4e31ff[_0x245847(0x266)],_0x4e31ff[_0x245847(0x267)]][_0x245847(0x264)]('\x20')['toLowerCase']()['includes'](_0x809364);})['map'](entrySummary);}export function getApiDocDetail(_0x305abb){const _0x370ac6=a1_0x2d8212,_0x5b2534=DOCS['find'](_0x2f5719=>_0x2f5719['code']===_0x305abb);if(!_0x5b2534)throw CliErrors[_0x370ac6(0x200)]('API\x20doc\x20code\x20not\x20found:\x20'+_0x305abb);return{..._0x5b2534};}const apiDocList={'service':a1_0x2d8212(0x224),'command':a1_0x2d8212(0x265),'description':a1_0x2d8212(0x231),'risk':a1_0x2d8212(0x240),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x3f2f92){const _0x2415c0=a1_0x2d8212,_0x5ed285=listApiDocEntries({'category':_0x3f2f92[_0x2415c0(0x1f3)](_0x2415c0(0x209)),'keyword':_0x3f2f92[_0x2415c0(0x1f3)](_0x2415c0(0x211))});return{'ok':!![],'data':{'total':_0x5ed285[_0x2415c0(0x1f9)],'items':_0x5ed285}};}},apiDocDetail={'service':a1_0x2d8212(0x224),'command':'detail','description':a1_0x2d8212(0x230),'risk':a1_0x2d8212(0x240),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x1b744a){const _0x4be440=a1_0x2d8212;return{'ok':!![],'data':getApiDocDetail(_0x1b744a[_0x4be440(0x1f3)]('code'))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
@@ -1 +1 @@
1
- (function(_0x33cce3,_0x508942){const _0x5f2105=a2_0x3ab7,_0xfefe15=_0x33cce3();while(!![]){try{const _0xbb36ef=-parseInt(_0x5f2105(0x128))/0x1+parseInt(_0x5f2105(0x13a))/0x2*(parseInt(_0x5f2105(0x134))/0x3)+-parseInt(_0x5f2105(0x12b))/0x4+-parseInt(_0x5f2105(0x13b))/0x5*(-parseInt(_0x5f2105(0x129))/0x6)+-parseInt(_0x5f2105(0x126))/0x7*(-parseInt(_0x5f2105(0x122))/0x8)+parseInt(_0x5f2105(0x132))/0x9*(parseInt(_0x5f2105(0x121))/0xa)+-parseInt(_0x5f2105(0x135))/0xb;if(_0xbb36ef===_0x508942)break;else _0xfefe15['push'](_0xfefe15['shift']());}catch(_0x2ede67){_0xfefe15['push'](_0xfefe15['shift']());}}}(a2_0x5f2a,0xe2199));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';function a2_0x3ab7(_0x2a19bb,_0x2d53ce){_0x2a19bb=_0x2a19bb-0x120;const _0x5f2af4=a2_0x5f2a();let _0x3ab702=_0x5f2af4[_0x2a19bb];return _0x3ab702;}export function fingerprintAccessKey(_0x3b3711){const _0x4eccf5=a2_0x3ab7,_0x300234=_0x3b3711[_0x4eccf5(0x12a)](),_0x29a04a=_0x300234['slice'](-0x6)||_0x4eccf5(0x125),_0xd9d058=createHash(_0x4eccf5(0x133))[_0x4eccf5(0x137)](_0x300234)[_0x4eccf5(0x120)](_0x4eccf5(0x139))[_0x4eccf5(0x138)](0x0,0xc);return'ak_'+_0x29a04a+'_'+_0xd9d058;}function a2_0x5f2a(){const _0x4b50f2=['821133XTKuPY','sha256','3XZfaYJ','17875737hbuYCr','isArray','update','slice','hex','2199466yGRMqo','590cCdbav','my-apps.json','EXDEV','appName','items','digest','30hisEjo','8CrrnNX','cache','code','unknown','11897431DNxmBz','stringify','164560FBSrlX','36228CvpCrm','trim','4279316ohgubx','homeDirName','EPERM','parse','EACCES','find','utf8'];a2_0x5f2a=function(){return _0x4b50f2;};return a2_0x5f2a();}export function getAppCacheFilePath(_0x29ee83,_0x33a303){const _0x4c1843=a2_0x3ab7;return resolve(homedir(),PRODUCT_CONFIG[_0x4c1843(0x12c)],_0x4c1843(0x123),_0x29ee83,fingerprintAccessKey(_0x33a303),_0x4c1843(0x13c));}export function readCachedAppList(_0x415236,_0xd13d5f){const _0x5005b2=a2_0x3ab7;if(!_0xd13d5f?.['trim']())return null;const _0x5a6eca=getAppCacheFilePath(_0x415236,_0xd13d5f);if(!existsSync(_0x5a6eca))return null;try{const _0x29aaa4=readFileSync(_0x5a6eca,_0x5005b2(0x131));if(!_0x29aaa4['trim']())return null;const _0x4cae10=JSON[_0x5005b2(0x12e)](_0x29aaa4);if(!Array[_0x5005b2(0x136)](_0x4cae10[_0x5005b2(0x13f)]))return null;return _0x4cae10;}catch{return null;}}export function writeCachedAppList(_0xf8de31,_0x15b28f,_0x41dbe9){const _0x18767d=a2_0x3ab7,_0xf363c8=getAppCacheFilePath(_0xf8de31,_0x15b28f),_0x4628f8=dirname(_0xf363c8);!existsSync(_0x4628f8)&&mkdirSync(_0x4628f8,{'recursive':!![]});const _0x3ea4eb=_0xf363c8+'.tmp';try{writeFileSync(_0x3ea4eb,JSON[_0x18767d(0x127)](_0x41dbe9,null,0x2)+'\x0a',{'encoding':_0x18767d(0x131),'mode':0x180});try{renameSync(_0x3ea4eb,_0xf363c8);}catch(_0x59214e){if(_0x59214e[_0x18767d(0x124)]===_0x18767d(0x12d)||_0x59214e[_0x18767d(0x124)]===_0x18767d(0x13d)||_0x59214e[_0x18767d(0x124)]===_0x18767d(0x12f)){writeFileSync(_0xf363c8,JSON[_0x18767d(0x127)](_0x41dbe9,null,0x2)+'\x0a',{'encoding':_0x18767d(0x131)});try{unlinkSync(_0x3ea4eb);}catch{}}else throw _0x59214e;}}catch(_0x110f9b){try{unlinkSync(_0x3ea4eb);}catch{}throw _0x110f9b;}return _0xf363c8;}export function resolveCachedAppCode(_0xca1ebd,_0x543b27,_0x289cc1){const _0x4fd055=a2_0x3ab7;if(!_0xca1ebd)return undefined;const _0x425df1=readCachedAppList(_0x543b27,_0x289cc1),_0x4822f9=_0x425df1?.[_0x4fd055(0x13f)][_0x4fd055(0x130)](_0x173e70=>_0x173e70[_0x4fd055(0x13e)]===_0xca1ebd&&isRuntimeAccessibleApp(_0x173e70));return _0x4822f9?.['appCode']?.[_0x4fd055(0x12a)]()||undefined;}
1
+ (function(_0x4edc7c,_0x46eb6b){const _0x30cc31=a2_0x5285,_0x31a960=_0x4edc7c();while(!![]){try{const _0x10e370=-parseInt(_0x30cc31(0x1e7))/0x1+-parseInt(_0x30cc31(0x1e9))/0x2+-parseInt(_0x30cc31(0x1e5))/0x3+-parseInt(_0x30cc31(0x1e0))/0x4+-parseInt(_0x30cc31(0x1ed))/0x5+-parseInt(_0x30cc31(0x1e4))/0x6+parseInt(_0x30cc31(0x1df))/0x7;if(_0x10e370===_0x46eb6b)break;else _0x31a960['push'](_0x31a960['shift']());}catch(_0x4d949d){_0x31a960['push'](_0x31a960['shift']());}}}(a2_0x4b91,0xf28ff));import{createHash}from'node:crypto';function a2_0x5285(_0x5a9fcc,_0x449199){_0x5a9fcc=_0x5a9fcc-0x1dc;const _0x4b913b=a2_0x4b91();let _0x528550=_0x4b913b[_0x5a9fcc];return _0x528550;}function a2_0x4b91(){const _0x2291af=['.tmp','isArray','my-apps.json','stringify','56137956eDKBNG','7434124HuKOQZ','digest','EXDEV','EPERM','6734286urSKAG','346686EzcTcf','code','1270817rpqJET','slice','3575726qCHSeE','appName','homeDirName','cache','4355095MNOIBH','appCode','parse','hex','items','trim','utf8'];a2_0x4b91=function(){return _0x2291af;};return a2_0x4b91();}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(_0x58064f){const _0xd2bce1=a2_0x5285,_0x47944b=_0x58064f[_0xd2bce1(0x1f2)](),_0x513bfb=_0x47944b[_0xd2bce1(0x1e8)](-0x6)||'unknown',_0x505e5e=createHash('sha256')['update'](_0x47944b)[_0xd2bce1(0x1e1)](_0xd2bce1(0x1f0))[_0xd2bce1(0x1e8)](0x0,0xc);return'ak_'+_0x513bfb+'_'+_0x505e5e;}export function getAppCacheFilePath(_0x429c2e,_0x69234){const _0x40b99f=a2_0x5285;return resolve(homedir(),PRODUCT_CONFIG[_0x40b99f(0x1eb)],_0x40b99f(0x1ec),_0x429c2e,fingerprintAccessKey(_0x69234),_0x40b99f(0x1dd));}export function readCachedAppList(_0x3df319,_0x228bc5){const _0x2894c9=a2_0x5285;if(!_0x228bc5?.[_0x2894c9(0x1f2)]())return null;const _0x5c5192=getAppCacheFilePath(_0x3df319,_0x228bc5);if(!existsSync(_0x5c5192))return null;try{const _0x54c8e6=readFileSync(_0x5c5192,'utf8');if(!_0x54c8e6[_0x2894c9(0x1f2)]())return null;const _0x2c61ca=JSON[_0x2894c9(0x1ef)](_0x54c8e6);if(!Array[_0x2894c9(0x1dc)](_0x2c61ca[_0x2894c9(0x1f1)]))return null;return _0x2c61ca;}catch{return null;}}export function writeCachedAppList(_0x2e37e9,_0x433983,_0x25e468){const _0x5f4332=a2_0x5285,_0xf38bbd=getAppCacheFilePath(_0x2e37e9,_0x433983),_0x5d50ab=dirname(_0xf38bbd);!existsSync(_0x5d50ab)&&mkdirSync(_0x5d50ab,{'recursive':!![]});const _0x22a0ba=_0xf38bbd+_0x5f4332(0x1f4);try{writeFileSync(_0x22a0ba,JSON[_0x5f4332(0x1de)](_0x25e468,null,0x2)+'\x0a',{'encoding':_0x5f4332(0x1f3),'mode':0x180});try{renameSync(_0x22a0ba,_0xf38bbd);}catch(_0x4d5622){if(_0x4d5622[_0x5f4332(0x1e6)]===_0x5f4332(0x1e3)||_0x4d5622[_0x5f4332(0x1e6)]===_0x5f4332(0x1e2)||_0x4d5622[_0x5f4332(0x1e6)]==='EACCES'){writeFileSync(_0xf38bbd,JSON[_0x5f4332(0x1de)](_0x25e468,null,0x2)+'\x0a',{'encoding':_0x5f4332(0x1f3)});try{unlinkSync(_0x22a0ba);}catch{}}else throw _0x4d5622;}}catch(_0x53ecd5){try{unlinkSync(_0x22a0ba);}catch{}throw _0x53ecd5;}return _0xf38bbd;}export function resolveCachedAppCode(_0x3c631d,_0x149241,_0x11d2ce){const _0x5eb020=a2_0x5285;if(!_0x3c631d)return undefined;const _0x43b71f=readCachedAppList(_0x149241,_0x11d2ce),_0x2f1356=_0x43b71f?.[_0x5eb020(0x1f1)]['find'](_0x54a895=>_0x54a895[_0x5eb020(0x1ea)]===_0x3c631d&&isRuntimeAccessibleApp(_0x54a895));return _0x2f1356?.[_0x5eb020(0x1ee)]?.['trim']()||undefined;}
@@ -1 +1 @@
1
- const a3_0x5612e6=a3_0x341a;(function(_0x4a658d,_0x21c0aa){const _0x346875=a3_0x341a,_0x4dff90=_0x4a658d();while(!![]){try{const _0x312b03=-parseInt(_0x346875(0x10c))/0x1+-parseInt(_0x346875(0xe4))/0x2*(parseInt(_0x346875(0xd9))/0x3)+parseInt(_0x346875(0xfc))/0x4*(parseInt(_0x346875(0x103))/0x5)+parseInt(_0x346875(0xe0))/0x6+-parseInt(_0x346875(0xf8))/0x7+parseInt(_0x346875(0x107))/0x8*(parseInt(_0x346875(0x105))/0x9)+parseInt(_0x346875(0xff))/0xa*(-parseInt(_0x346875(0xd4))/0xb);if(_0x312b03===_0x21c0aa)break;else _0x4dff90['push'](_0x4dff90['shift']());}catch(_0x5eb307){_0x4dff90['push'](_0x4dff90['shift']());}}}(a3_0x2ff1,0xaf3b4));import{appImportFlagDefs,runAppImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';function a3_0x2ff1(){const _0x237f4a=['5121492UxvRYC','Include\x20unpublished\x20apps\x20for\x20diagnostics','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','config','62UbWdvV','nonInteractive','envName','fetchedAt','isCurrent','write','list','map','Reads\x20the\x20given\x20.rabetbase.json\x20and\x20imports\x20a\x20usable\x20default\x20app\x20into\x20local\x20.lovrabet.json.\x20Matching\x20keys\x20may\x20be\x20updated.','production','string','\x20cached\x20app(s)\x20for\x20env=\x22','source','no-cache','mergedCli','globalPath','No\x20apps\x20found\x20on\x20the\x20platform.','appPublishStatus','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','bool','7527506cDjbSu','env','pull','../../context.js','4jcZhKt','items','Loaded\x20','10MxJRIx','i18nInfo','entries','accessKey','6483025GTUVNi','include-unpublished','3989691uGTHWp','enableI18n','24gtoWtN','read','../../commands/app/remote-source.js','name','boolean','279133BqXqan','filter','Filter\x20by\x20environment\x20(default:\x20current\x20env)','remote','length','2534774WnNALd','appOwnerName','projectPath','cachePath','app','113943JIKYtT','Read\x20from\x20local\x20cache\x20only','appcode','local','appName','str','cache'];a3_0x2ff1=function(){return _0x237f4a;};return a3_0x2ff1();}import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';function collectFlags(_0x5650eb,_0x448c59){const _0x302362=a3_0x341a,_0x203be0={};for(const _0x34b449 of _0x448c59){const _0x4c10b7=_0x34b449['type']==='boolean'?_0x5650eb[_0x302362(0xf7)](_0x34b449[_0x302362(0x10a)]):_0x5650eb[_0x302362(0xde)](_0x34b449[_0x302362(0x10a)]);if(_0x4c10b7!==''&&_0x4c10b7!==![])_0x203be0[_0x34b449[_0x302362(0x10a)]]=_0x4c10b7;}if(_0x5650eb[_0x302362(0xe5)])_0x203be0[_0x302362(0xe5)]=!![];return _0x203be0;}function a3_0x341a(_0x1c1307,_0x100818){_0x1c1307=_0x1c1307-0xd3;const _0x2ff114=a3_0x2ff1();let _0x341aa6=_0x2ff114[_0x1c1307];return _0x341aa6;}function normalizeLanguages(_0x31cc99){const _0x137553=a3_0x341a;if(!Array['isArray'](_0x31cc99))return[];return _0x31cc99[_0x137553(0x10d)](_0x3cc5b3=>typeof _0x3cc5b3===_0x137553(0xee))[_0x137553(0xeb)](_0x219d7c=>_0x219d7c['trim']())[_0x137553(0x10d)](Boolean);}function buildRemoteAppI18nFields(_0x567bbe){const _0x2a33bd=a3_0x341a,_0x4b8fbd=normalizeLanguages(_0x567bbe[_0x2a33bd(0x100)]?.['langs']);return{'enableI18n':typeof _0x567bbe[_0x2a33bd(0x106)]==='boolean'?_0x567bbe[_0x2a33bd(0x106)]:null,'languages':_0x4b8fbd,'i18nInfo':_0x567bbe['i18nInfo']?{..._0x567bbe[_0x2a33bd(0x100)],'langs':_0x4b8fbd['length']?_0x4b8fbd:null}:null};}const listDef={'service':a3_0x5612e6(0xd8),'command':a3_0x5612e6(0xea),'description':a3_0x5612e6(0xe2),'risk':a3_0x5612e6(0x108),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':'env','type':a3_0x5612e6(0xee),'description':a3_0x5612e6(0x10e),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x5612e6(0xdc),'type':a3_0x5612e6(0x10b),'description':'Read\x20app\x20list\x20from\x20local\x20cache\x20only','default':![]},{'name':a3_0x5612e6(0xf1),'type':'boolean','description':a3_0x5612e6(0xf6),'default':![]},{'name':a3_0x5612e6(0x104),'type':a3_0x5612e6(0x10b),'description':a3_0x5612e6(0xe1),'default':![]}],async 'execute'(_0x23e334){const _0x181a8b=a3_0x5612e6,_0xf2d7f9=_0x23e334[_0x181a8b(0xde)](_0x181a8b(0xf9))||_0x23e334[_0x181a8b(0xe6)]||getEnv()||_0x181a8b(0xed),_0x7b4412=_0x23e334[_0x181a8b(0xf7)](_0x181a8b(0xdc)),_0xc3c92a=_0x23e334[_0x181a8b(0xf7)](_0x181a8b(0xf1)),_0x153c6a=_0x23e334[_0x181a8b(0xf7)](_0x181a8b(0x104)),{readRawConfigWithLayers:_0x1c6358,resolveDefaultAppSource:_0x1d05ab,getLocalAppAliases:_0x1872e5}=await import(_0x181a8b(0xfb)),{getRemoteAppList:_0x210921}=await import(_0x181a8b(0x109)),{config:_0x343937,layers:_0xe8bec2}=_0x1c6358(),_0x531740=_0x1d05ab(_0xe8bec2),{defaultApp:_0x16b6e6}=_0x343937,_0x168c32=await _0x210921({'env':_0xf2d7f9,'accessKey':_0x23e334[_0x181a8b(0x102)],'localOnly':_0x7b4412,'noCache':_0xc3c92a}),_0x44f2f8=_0x153c6a?_0x168c32[_0x181a8b(0xfd)]:filterRuntimeAccessibleApps(_0x168c32[_0x181a8b(0xfd)]),_0x9a8faf=_0x168c32[_0x181a8b(0xfd)][_0x181a8b(0xd3)]-_0x44f2f8[_0x181a8b(0xd3)],_0x54e92b=_0x44f2f8[_0x181a8b(0xeb)](_0x2b2a74=>{const _0x52b214=_0x181a8b;return{'name':_0x2b2a74[_0x52b214(0xdd)],'appcode':_0x2b2a74['appCode'],'named':!![],'definedIn':_0x52b214(0x10f),'isDefault':_0x2b2a74[_0x52b214(0xdd)]===_0x16b6e6,...buildAppProfileListFields(_0xf2d7f9),...buildRemoteAppI18nFields(_0x2b2a74),'source':_0x168c32[_0x52b214(0xf0)],'owner':_0x2b2a74[_0x52b214(0xd5)]??null,'status':_0x2b2a74[_0x52b214(0xf5)]??null,'cachedAt':_0x168c32[_0x52b214(0xe7)]};}),_0x360ef1=_0x1872e5(_0x343937);let _0x55147f=0x0;for(const [_0x13821,_0x4b08b2]of Object[_0x181a8b(0x101)](_0x360ef1)){const _0x522324=typeof _0x4b08b2[_0x181a8b(0xdb)]===_0x181a8b(0xee)?_0x4b08b2[_0x181a8b(0xdb)]['trim']():'';if(!_0x522324)continue;const _0x3a21a4=findAppByCode(_0x168c32[_0x181a8b(0xfd)],_0x522324);if(!_0x153c6a&&_0x3a21a4&&!isRuntimeAccessibleApp(_0x3a21a4))continue;_0x55147f+=0x1,_0x54e92b['push']({'name':_0x13821,'appcode':_0x522324,'named':!![],'definedIn':'local','isDefault':_0x13821===_0x16b6e6,...buildAppProfileListFields(_0xf2d7f9),'source':_0x181a8b(0xe3),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x54e92b,_0x23e334[_0x181a8b(0xf2)]);const _0x4a7141=_0x54e92b['find'](_0x14a4fc=>_0x14a4fc[_0x181a8b(0xe8)]===!![]),_0x54917c=_0x16b6e6??_0x4a7141?.[_0x181a8b(0x10a)]??null,_0x4a610b={'env':_0xf2d7f9,'source':_0x168c32['source'],'fetchedAt':_0x168c32[_0x181a8b(0xe7)],'cachePath':_0x168c32[_0x181a8b(0xd7)],'globalPath':_0xe8bec2[_0x181a8b(0xf3)]??null,'projectPath':_0xe8bec2[_0x181a8b(0xd6)]??null,'defaultApp':_0x54917c,'defaultAppSource':_0x16b6e6!=null?_0x531740:null,'localAliasCount':_0x55147f,'remoteTotal':_0x168c32[_0x181a8b(0xfd)]['length'],'hiddenUnpublishedCount':_0x9a8faf,'includeUnpublished':_0x153c6a};if(_0x54e92b[_0x181a8b(0xd3)]===0x0)return{'ok':!![],'data':{'items':_0x54e92b,'meta':_0x4a610b},'message':_0x168c32[_0x181a8b(0xf0)]===_0x181a8b(0xdf)?'No\x20cached\x20apps\x20found.':_0x181a8b(0xf4)};return{'ok':!![],'data':{'items':_0x54e92b,'meta':_0x4a610b}};}},pullDef={'service':a3_0x5612e6(0xd8),'command':a3_0x5612e6(0xfa),'description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':a3_0x5612e6(0xe9),'confirmationDescription':'Reads\x20the\x20apps\x20available\x20to\x20the\x20current\x20account\x20and\x20overwrites\x20the\x20local\x20app\x20cache\x20for\x20that\x20environment.\x20Platform\x20apps\x20are\x20not\x20modified.','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x5612e6(0xf9),'type':a3_0x5612e6(0xee),'description':'Target\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x5612e6(0xdc),'type':a3_0x5612e6(0x10b),'description':a3_0x5612e6(0xda),'default':![]},{'name':a3_0x5612e6(0xf1),'type':a3_0x5612e6(0x10b),'description':a3_0x5612e6(0xf6),'default':![]}],async 'execute'(_0x413ac8){const _0x402c2c=a3_0x5612e6,_0x12832e=_0x413ac8[_0x402c2c(0xde)]('env')||_0x413ac8[_0x402c2c(0xe6)]||getEnv()||_0x402c2c(0xed),_0x475ace=_0x413ac8['bool'](_0x402c2c(0xdc)),_0x38629b=_0x413ac8[_0x402c2c(0xf7)](_0x402c2c(0xf1)),{getRemoteAppList:_0x189604}=await import(_0x402c2c(0x109)),_0x42a54a=await _0x189604({'env':_0x12832e,'accessKey':_0x413ac8[_0x402c2c(0x102)],'localOnly':_0x475ace,'noCache':_0x38629b});return{'ok':!![],'data':{'total':_0x42a54a['items'][_0x402c2c(0xd3)],'env':_0x12832e,'source':_0x42a54a['source'],'fetchedAt':_0x42a54a['fetchedAt'],'cachePath':_0x42a54a[_0x402c2c(0xd7)]},'message':_0x42a54a[_0x402c2c(0xf0)]===_0x402c2c(0xdf)?_0x402c2c(0xfe)+_0x42a54a[_0x402c2c(0xfd)]['length']+_0x402c2c(0xef)+_0x12832e+'\x22.':'Refreshed\x20app\x20cache\x20with\x20'+_0x42a54a[_0x402c2c(0xfd)][_0x402c2c(0xd3)]+'\x20app(s)\x20for\x20env=\x22'+_0x12832e+'\x22.'};}},importDef={'service':a3_0x5612e6(0xd8),'command':'import','description':'Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','risk':a3_0x5612e6(0xe9),'confirmationDescription':a3_0x5612e6(0xec),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':appImportFlagDefs,async 'execute'(_0x5a43b7){return await runAppImport(collectFlags(_0x5a43b7,appImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[listDef,pullDef,importDef];
1
+ const a3_0x4416d0=a3_0x2e16;function a3_0x2e16(_0x5927bb,_0x7c423b){_0x5927bb=_0x5927bb-0x195;const _0x50c17f=a3_0x50c1();let _0x2e164c=_0x50c17f[_0x5927bb];return _0x2e164c;}(function(_0x508f1a,_0x2ec55e){const _0x24be66=a3_0x2e16,_0x213a37=_0x508f1a();while(!![]){try{const _0x57bf7d=parseInt(_0x24be66(0x1af))/0x1*(parseInt(_0x24be66(0x19d))/0x2)+-parseInt(_0x24be66(0x1b3))/0x3+-parseInt(_0x24be66(0x1b0))/0x4*(parseInt(_0x24be66(0x1b1))/0x5)+parseInt(_0x24be66(0x1ab))/0x6+parseInt(_0x24be66(0x1a5))/0x7*(parseInt(_0x24be66(0x1d2))/0x8)+parseInt(_0x24be66(0x1c4))/0x9*(-parseInt(_0x24be66(0x1c5))/0xa)+parseInt(_0x24be66(0x1c8))/0xb;if(_0x57bf7d===_0x2ec55e)break;else _0x213a37['push'](_0x213a37['shift']());}catch(_0x9a6f76){_0x213a37['push'](_0x213a37['shift']());}}}(a3_0x50c1,0x29388));import{appImportFlagDefs,runAppImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';import{enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';function collectFlags(_0x45f226,_0x59d19a){const _0x420bdb=a3_0x2e16,_0x13c2c3={};for(const _0x4fde20 of _0x59d19a){const _0x509fd4=_0x4fde20[_0x420bdb(0x1cd)]===_0x420bdb(0x1b4)?_0x45f226['bool'](_0x4fde20[_0x420bdb(0x1d6)]):_0x45f226['str'](_0x4fde20[_0x420bdb(0x1d6)]);if(_0x509fd4!==''&&_0x509fd4!==![])_0x13c2c3[_0x4fde20[_0x420bdb(0x1d6)]]=_0x509fd4;}if(_0x45f226[_0x420bdb(0x1c9)])_0x13c2c3[_0x420bdb(0x1c9)]=!![];return _0x13c2c3;}function normalizeLanguages(_0x2438bb){const _0x56c7d1=a3_0x2e16;if(!Array[_0x56c7d1(0x1be)](_0x2438bb))return[];return _0x2438bb['filter'](_0x5e8a91=>typeof _0x5e8a91===_0x56c7d1(0x19e))[_0x56c7d1(0x1c3)](_0x398738=>_0x398738[_0x56c7d1(0x1ad)]())[_0x56c7d1(0x1bd)](Boolean);}function a3_0x50c1(){const _0x37fc8a=['pull','length','fetchedAt','include-unpublished','filter','isArray','appcode','appOwnerName','appPublishStatus','enableI18n','map','18OcJzjd','1096120uFqDEd','Include\x20unpublished\x20apps\x20for\x20diagnostics','mergedCli','2918399gHTngf','nonInteractive','\x20app(s)\x20for\x20env=\x22','env','No\x20cached\x20apps\x20found.','type','str','find','Read\x20app\x20list\x20from\x20local\x20cache\x20only','../../context.js','8FJLZtU','appName','Loaded\x20','i18nInfo','name','projectPath','No\x20apps\x20found\x20on\x20the\x20platform.','Refreshed\x20app\x20cache\x20with\x20','read','local','langs','accessKey','bool','production','cachePath','2wokjim','string','remote','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','import','app','no-cache','2123779aAjqXr','write','items','Reads\x20the\x20apps\x20available\x20to\x20the\x20current\x20account\x20and\x20overwrites\x20the\x20local\x20app\x20cache\x20for\x20that\x20environment.\x20Platform\x20apps\x20are\x20not\x20modified.','source','Reads\x20the\x20given\x20.rabetbase.json\x20and\x20imports\x20a\x20usable\x20default\x20app\x20into\x20local\x20.lovrabet.json.\x20Matching\x20keys\x20may\x20be\x20updated.','173418IjbaJP','list','trim','envName','20419BqNyFq','29600euwhyF','125jYiBEY','../../commands/app/remote-source.js','134892NbQfpP','boolean','isCurrent','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','config','push'];a3_0x50c1=function(){return _0x37fc8a;};return a3_0x50c1();}function buildRemoteAppI18nFields(_0x850c3e){const _0x55a93d=a3_0x2e16,_0x55a023=normalizeLanguages(_0x850c3e[_0x55a93d(0x1d5)]?.[_0x55a93d(0x198)]);return{'enableI18n':typeof _0x850c3e['enableI18n']===_0x55a93d(0x1b4)?_0x850c3e[_0x55a93d(0x1c2)]:null,'languages':_0x55a023,'i18nInfo':_0x850c3e[_0x55a93d(0x1d5)]?{..._0x850c3e['i18nInfo'],'langs':_0x55a023[_0x55a93d(0x1ba)]?_0x55a023:null}:null};}const listDef={'service':'app','command':a3_0x4416d0(0x1ac),'description':a3_0x4416d0(0x1b6),'risk':a3_0x4416d0(0x196),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x4416d0(0x1cb),'type':a3_0x4416d0(0x19e),'description':'Filter\x20by\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x4416d0(0x197),'type':'boolean','description':a3_0x4416d0(0x1d0),'default':![]},{'name':a3_0x4416d0(0x1a4),'type':a3_0x4416d0(0x1b4),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]},{'name':a3_0x4416d0(0x1bc),'type':a3_0x4416d0(0x1b4),'description':a3_0x4416d0(0x1c6),'default':![]}],async 'execute'(_0x2a84ba){const _0x17c6d9=a3_0x4416d0,_0x5d83da=_0x2a84ba[_0x17c6d9(0x1ce)](_0x17c6d9(0x1cb))||_0x2a84ba[_0x17c6d9(0x1ae)]||getEnv()||_0x17c6d9(0x19b),_0x5efaae=_0x2a84ba[_0x17c6d9(0x19a)](_0x17c6d9(0x197)),_0x335b3c=_0x2a84ba[_0x17c6d9(0x19a)](_0x17c6d9(0x1a4)),_0x2707d9=_0x2a84ba[_0x17c6d9(0x19a)](_0x17c6d9(0x1bc)),{readRawConfigWithLayers:_0x252db2,resolveDefaultAppSource:_0x3caaad,getLocalAppAliases:_0x9dac26}=await import(_0x17c6d9(0x1d1)),{getRemoteAppList:_0x31e334}=await import(_0x17c6d9(0x1b2)),{config:_0x18e854,layers:_0x3dcf0d}=_0x252db2(),_0x20e17f=_0x3caaad(_0x3dcf0d),{defaultApp:_0x2ba91f}=_0x18e854,_0x4f84b8=await _0x31e334({'env':_0x5d83da,'accessKey':_0x2a84ba['accessKey'],'localOnly':_0x5efaae,'noCache':_0x335b3c}),_0x359c9f=_0x2707d9?_0x4f84b8[_0x17c6d9(0x1a7)]:filterRuntimeAccessibleApps(_0x4f84b8['items']),_0x5471db=_0x4f84b8[_0x17c6d9(0x1a7)]['length']-_0x359c9f[_0x17c6d9(0x1ba)],_0x20cde2=_0x359c9f['map'](_0x4ae1cf=>{const _0x1cf764=_0x17c6d9;return{'name':_0x4ae1cf['appName'],'appcode':_0x4ae1cf['appCode'],'named':!![],'definedIn':_0x1cf764(0x19f),'isDefault':_0x4ae1cf[_0x1cf764(0x1d3)]===_0x2ba91f,...buildAppProfileListFields(_0x5d83da),...buildRemoteAppI18nFields(_0x4ae1cf),'source':_0x4f84b8[_0x1cf764(0x1a9)],'owner':_0x4ae1cf[_0x1cf764(0x1c0)]??null,'status':_0x4ae1cf[_0x1cf764(0x1c1)]??null,'cachedAt':_0x4f84b8[_0x1cf764(0x1bb)]};}),_0x57949c=_0x9dac26(_0x18e854);let _0x1eb731=0x0;for(const [_0x234ebf,_0x481100]of Object['entries'](_0x57949c)){const _0x25d749=typeof _0x481100[_0x17c6d9(0x1bf)]===_0x17c6d9(0x19e)?_0x481100[_0x17c6d9(0x1bf)]['trim']():'';if(!_0x25d749)continue;const _0x46e5bd=findAppByCode(_0x4f84b8[_0x17c6d9(0x1a7)],_0x25d749);if(!_0x2707d9&&_0x46e5bd&&!isRuntimeAccessibleApp(_0x46e5bd))continue;_0x1eb731+=0x1,_0x20cde2[_0x17c6d9(0x1b8)]({'name':_0x234ebf,'appcode':_0x25d749,'named':!![],'definedIn':_0x17c6d9(0x197),'isDefault':_0x234ebf===_0x2ba91f,...buildAppProfileListFields(_0x5d83da),'source':_0x17c6d9(0x1b7),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x20cde2,_0x2a84ba[_0x17c6d9(0x1c7)]);const _0xd73ebc=_0x20cde2[_0x17c6d9(0x1cf)](_0x38e992=>_0x38e992[_0x17c6d9(0x1b5)]===!![]),_0x2a93a2=_0x2ba91f??_0xd73ebc?.[_0x17c6d9(0x1d6)]??null,_0x41c213={'env':_0x5d83da,'source':_0x4f84b8[_0x17c6d9(0x1a9)],'fetchedAt':_0x4f84b8['fetchedAt'],'cachePath':_0x4f84b8[_0x17c6d9(0x19c)],'globalPath':_0x3dcf0d['globalPath']??null,'projectPath':_0x3dcf0d[_0x17c6d9(0x1d7)]??null,'defaultApp':_0x2a93a2,'defaultAppSource':_0x2ba91f!=null?_0x20e17f:null,'localAliasCount':_0x1eb731,'remoteTotal':_0x4f84b8[_0x17c6d9(0x1a7)]['length'],'hiddenUnpublishedCount':_0x5471db,'includeUnpublished':_0x2707d9};if(_0x20cde2[_0x17c6d9(0x1ba)]===0x0)return{'ok':!![],'data':{'items':_0x20cde2,'meta':_0x41c213},'message':_0x4f84b8['source']==='cache'?_0x17c6d9(0x1cc):_0x17c6d9(0x1d8)};return{'ok':!![],'data':{'items':_0x20cde2,'meta':_0x41c213}};}},pullDef={'service':'app','command':a3_0x4416d0(0x1b9),'description':a3_0x4416d0(0x1a1),'risk':a3_0x4416d0(0x1a6),'confirmationDescription':a3_0x4416d0(0x1a8),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'env','type':a3_0x4416d0(0x19e),'description':'Target\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a3_0x4416d0(0x1b4),'description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':'no-cache','type':a3_0x4416d0(0x1b4),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0x5ba971){const _0x5d63b9=a3_0x4416d0,_0x9bbb61=_0x5ba971['str'](_0x5d63b9(0x1cb))||_0x5ba971[_0x5d63b9(0x1ae)]||getEnv()||_0x5d63b9(0x19b),_0x74a548=_0x5ba971[_0x5d63b9(0x19a)](_0x5d63b9(0x197)),_0x141a75=_0x5ba971['bool']('no-cache'),{getRemoteAppList:_0x2d2cf3}=await import(_0x5d63b9(0x1b2)),_0x4a8b9f=await _0x2d2cf3({'env':_0x9bbb61,'accessKey':_0x5ba971[_0x5d63b9(0x199)],'localOnly':_0x74a548,'noCache':_0x141a75});return{'ok':!![],'data':{'total':_0x4a8b9f['items']['length'],'env':_0x9bbb61,'source':_0x4a8b9f[_0x5d63b9(0x1a9)],'fetchedAt':_0x4a8b9f['fetchedAt'],'cachePath':_0x4a8b9f[_0x5d63b9(0x19c)]},'message':_0x4a8b9f['source']==='cache'?_0x5d63b9(0x1d4)+_0x4a8b9f[_0x5d63b9(0x1a7)][_0x5d63b9(0x1ba)]+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x9bbb61+'\x22.':_0x5d63b9(0x195)+_0x4a8b9f[_0x5d63b9(0x1a7)][_0x5d63b9(0x1ba)]+_0x5d63b9(0x1ca)+_0x9bbb61+'\x22.'};}},importDef={'service':a3_0x4416d0(0x1a3),'command':a3_0x4416d0(0x1a2),'description':a3_0x4416d0(0x1a0),'risk':a3_0x4416d0(0x1a6),'confirmationDescription':a3_0x4416d0(0x1aa),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':appImportFlagDefs,async 'execute'(_0x524c05){return await runAppImport(collectFlags(_0x524c05,appImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[listDef,pullDef,importDef];
@@ -1 +1 @@
1
- function a4_0x2efe(_0x5ca669,_0x22d1cd){_0x5ca669=_0x5ca669-0x168;const _0x3dcf60=a4_0x3dcf();let _0x2efe13=_0x3dcf60[_0x5ca669];return _0x2efe13;}(function(_0x3c9657,_0xbeeda9){const _0x116d77=a4_0x2efe,_0x2a9918=_0x3c9657();while(!![]){try{const _0x435cec=-parseInt(_0x116d77(0x172))/0x1+-parseInt(_0x116d77(0x169))/0x2+-parseInt(_0x116d77(0x173))/0x3*(-parseInt(_0x116d77(0x171))/0x4)+-parseInt(_0x116d77(0x170))/0x5*(-parseInt(_0x116d77(0x177))/0x6)+parseInt(_0x116d77(0x176))/0x7+parseInt(_0x116d77(0x17c))/0x8*(parseInt(_0x116d77(0x17d))/0x9)+-parseInt(_0x116d77(0x174))/0xa;if(_0x435cec===_0xbeeda9)break;else _0x2a9918['push'](_0x2a9918['shift']());}catch(_0x5c15a8){_0x2a9918['push'](_0x2a9918['shift']());}}}(a4_0x3dcf,0x774bd));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(_0x514e07){const _0x1e4182=a4_0x2efe;if(typeof _0x514e07!==_0x1e4182(0x16a))return null;const _0x3b493f=_0x514e07[_0x1e4182(0x17a)]();return _0x3b493f?_0x3b493f[_0x1e4182(0x17b)]():null;}export function isRuntimeAccessibleApp(_0x1043e0){const _0x1a30ee=a4_0x2efe;return normalizeAppPublishStatus(_0x1043e0[_0x1a30ee(0x178)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x36adb6){const _0xf14af6=a4_0x2efe;return _0x36adb6[_0xf14af6(0x16f)](isRuntimeAccessibleApp);}export function findAppByName(_0x1d7865,_0x20323f){const _0x317671=a4_0x2efe;return _0x1d7865[_0x317671(0x16b)](_0x706a06=>_0x706a06[_0x317671(0x16e)]===_0x20323f);}export function findAppByCode(_0x551bca,_0x2ae385){const _0x3eb343=a4_0x2efe,_0x318779=_0x2ae385['trim']();if(!_0x318779)return undefined;return _0x551bca[_0x3eb343(0x16b)](_0x4743cd=>_0x4743cd[_0x3eb343(0x179)]?.[_0x3eb343(0x17a)]()===_0x318779);}function a4_0x3dcf(){const _0x19db3a=['appPublishStatus','appCode','trim','toUpperCase','24BmyCSs','183015ehgDvZ','.\x20Publish\x20the\x20app\x20before\x20using\x20','209810vHZbss','string','find','App\x20','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','appName','filter','5OdSpUv','20620avukbz','27821AsUUsv','150MZpUkw','216050rVyxFJ','validation','2184259ixnMWT','73056sZqZuv'];a4_0x3dcf=function(){return _0x19db3a;};return a4_0x3dcf();}export function runtimeInaccessibleAppError(_0x4dd4d6,_0x44688e){const _0x1750a5=a4_0x2efe,_0x2029dd=normalizeAppPublishStatus(_0x4dd4d6[_0x1750a5(0x178)])??'UNKNOWN';return CliErrors[_0x1750a5(0x175)](_0x1750a5(0x16c)+_0x44688e+_0x1750a5(0x16d),'Current\x20status:\x20'+_0x2029dd+_0x1750a5(0x168)+CLI_BIN_NAME+'\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.');}
1
+ (function(_0x179f1f,_0x5b5191){const _0x6b3610=a4_0x4bc2,_0xda47e8=_0x179f1f();while(!![]){try{const _0xe69807=parseInt(_0x6b3610(0x1b4))/0x1*(parseInt(_0x6b3610(0x1b3))/0x2)+-parseInt(_0x6b3610(0x1ad))/0x3+-parseInt(_0x6b3610(0x1ae))/0x4+-parseInt(_0x6b3610(0x1a0))/0x5*(-parseInt(_0x6b3610(0x1aa))/0x6)+parseInt(_0x6b3610(0x1ac))/0x7*(-parseInt(_0x6b3610(0x1b6))/0x8)+parseInt(_0x6b3610(0x1a7))/0x9+parseInt(_0x6b3610(0x1a8))/0xa*(parseInt(_0x6b3610(0x1b2))/0xb);if(_0xe69807===_0x5b5191)break;else _0xda47e8['push'](_0xda47e8['shift']());}catch(_0x5243f0){_0xda47e8['push'](_0xda47e8['shift']());}}}(a4_0x2f7d,0x95ac5));import{CLI_BIN_NAME}from'../../constant/cli.js';import{RUNTIME_ACCESSIBLE_APP_STATUS}from'../../constant/app.js';import{CliErrors}from'../../errors.js';function a4_0x2f7d(){const _0x2b3c48=['find','string','toUpperCase','8899UkjMxj','8354mNGqCs','85kmCRwO','UNKNOWN','8DGEoZs','appName','5AOSdWK','Current\x20status:\x20','filter','.\x20Publish\x20the\x20app\x20before\x20using\x20','trim','appPublishStatus','App\x20','6523461HCcjTZ','18310YursIQ','validation','681300wjcRQG','appCode','2576091tCcami','3111789JQCoBi','2625464LsmJdi'];a4_0x2f7d=function(){return _0x2b3c48;};return a4_0x2f7d();}function a4_0x4bc2(_0x205e96,_0xc36c1a){_0x205e96=_0x205e96-0x19f;const _0x2f7dec=a4_0x2f7d();let _0x4bc2af=_0x2f7dec[_0x205e96];return _0x4bc2af;}export function normalizeAppPublishStatus(_0x3cb092){const _0x497345=a4_0x4bc2;if(typeof _0x3cb092!==_0x497345(0x1b0))return null;const _0xba39e4=_0x3cb092['trim']();return _0xba39e4?_0xba39e4[_0x497345(0x1b1)]():null;}export function isRuntimeAccessibleApp(_0x18c721){const _0x41bd18=a4_0x4bc2;return normalizeAppPublishStatus(_0x18c721[_0x41bd18(0x1a5)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x2ff5a2){const _0x54e142=a4_0x4bc2;return _0x2ff5a2[_0x54e142(0x1a2)](isRuntimeAccessibleApp);}export function findAppByName(_0x3e32bf,_0x194ca7){const _0x1df123=a4_0x4bc2;return _0x3e32bf['find'](_0x3025bd=>_0x3025bd[_0x1df123(0x19f)]===_0x194ca7);}export function findAppByCode(_0x3d0210,_0x1001b2){const _0xe90da=a4_0x4bc2,_0xb8571f=_0x1001b2[_0xe90da(0x1a4)]();if(!_0xb8571f)return undefined;return _0x3d0210[_0xe90da(0x1af)](_0x1ec5f4=>_0x1ec5f4[_0xe90da(0x1ab)]?.[_0xe90da(0x1a4)]()===_0xb8571f);}export function runtimeInaccessibleAppError(_0x1abac1,_0x3cd27b){const _0x24b9c9=a4_0x4bc2,_0x460fc3=normalizeAppPublishStatus(_0x1abac1[_0x24b9c9(0x1a5)])??_0x24b9c9(0x1b5);return CliErrors[_0x24b9c9(0x1a9)](_0x24b9c9(0x1a6)+_0x3cd27b+'\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.',_0x24b9c9(0x1a1)+_0x460fc3+_0x24b9c9(0x1a3)+CLI_BIN_NAME+'\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.');}
@@ -1 +1 @@
1
- (function(_0x2ac9a4,_0x56f81f){const _0x2a4bfd=a5_0x4a94,_0x21ab3b=_0x2ac9a4();while(!![]){try{const _0x55736f=parseInt(_0x2a4bfd(0x117))/0x1+-parseInt(_0x2a4bfd(0x11a))/0x2+parseInt(_0x2a4bfd(0x110))/0x3*(-parseInt(_0x2a4bfd(0x111))/0x4)+parseInt(_0x2a4bfd(0x119))/0x5*(parseInt(_0x2a4bfd(0x116))/0x6)+parseInt(_0x2a4bfd(0x10b))/0x7+-parseInt(_0x2a4bfd(0x10c))/0x8*(parseInt(_0x2a4bfd(0x10a))/0x9)+parseInt(_0x2a4bfd(0x112))/0xa;if(_0x55736f===_0x56f81f)break;else _0x21ab3b['push'](_0x21ab3b['shift']());}catch(_0x5932c0){_0x21ab3b['push'](_0x21ab3b['shift']());}}}(a5_0x286a,0x1d22d));import{fileURLToPath}from'url';import{dirname,join}from'path';function a5_0x286a(){const _0x2f3861=['errorMsg','data','334128zwwVZf','182623EwNhqx','../../../mock/app-list.json','10jxFhpg','222000UtBhCq','673749oJELEh','383131TBumRF','8LwSZUY','utf-8','success','errorCode','26886VsUWRR','76SovOoB','1267480fwOzJh','Mock\x20API\x20error:\x20'];a5_0x286a=function(){return _0x2f3861;};return a5_0x286a();}import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x4db678=a5_0x4a94,_0x2aecc7=join(__dirname,_0x4db678(0x118)),_0x113033=readFileSync(_0x2aecc7,_0x4db678(0x10d));return JSON['parse'](_0x113033);}let _cached=null;function a5_0x4a94(_0x207990,_0xf80f7e){_0x207990=_0x207990-0x10a;const _0x286a1d=a5_0x286a();let _0x4a9497=_0x286a1d[_0x207990];return _0x4a9497;}export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x92286=a5_0x4a94,_0x1ea101=getMockAppList();if(!_0x1ea101[_0x92286(0x10e)])throw new Error(_0x92286(0x113)+_0x1ea101[_0x92286(0x114)]+'\x20('+_0x1ea101[_0x92286(0x10f)]+')');return _0x1ea101[_0x92286(0x115)]['tableData'];}
1
+ function a5_0x4d9a(){const _0x5a6f58=['450542XGffvy','errorMsg','utf-8','121LRutyV','data','success','1932992tyddIE','tableData','3695220YMVAPm','5745152fsuZdP','334461vbqacQ','errorCode','2479780kbwaBj','123576IUzGZM','15iinahb','235rKagKc','35FgKPaA'];a5_0x4d9a=function(){return _0x5a6f58;};return a5_0x4d9a();}function a5_0xbb4a(_0xd62e4e,_0x50a297){_0xd62e4e=_0xd62e4e-0x71;const _0x4d9a6c=a5_0x4d9a();let _0xbb4a81=_0x4d9a6c[_0xd62e4e];return _0xbb4a81;}(function(_0xbc8778,_0x3e83ae){const _0x35b9cf=a5_0xbb4a,_0x5796ce=_0xbc8778();while(!![]){try{const _0x19c5eb=parseInt(_0x35b9cf(0x72))/0x1+-parseInt(_0x35b9cf(0x79))/0x2*(-parseInt(_0x35b9cf(0x76))/0x3)+parseInt(_0x35b9cf(0x71))/0x4+-parseInt(_0x35b9cf(0x77))/0x5*(parseInt(_0x35b9cf(0x75))/0x6)+-parseInt(_0x35b9cf(0x78))/0x7*(-parseInt(_0x35b9cf(0x7f))/0x8)+parseInt(_0x35b9cf(0x81))/0x9+parseInt(_0x35b9cf(0x74))/0xa*(-parseInt(_0x35b9cf(0x7c))/0xb);if(_0x19c5eb===_0x3e83ae)break;else _0x5796ce['push'](_0x5796ce['shift']());}catch(_0x1d3b46){_0x5796ce['push'](_0x5796ce['shift']());}}}(a5_0x4d9a,0xc8342));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 _0xa43632=a5_0xbb4a,_0x5a69ee=join(__dirname,'../../../mock/app-list.json'),_0x4156e7=readFileSync(_0x5a69ee,_0xa43632(0x7b));return JSON['parse'](_0x4156e7);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x2a4a1f=a5_0xbb4a,_0x410033=getMockAppList();if(!_0x410033[_0x2a4a1f(0x7e)])throw new Error('Mock\x20API\x20error:\x20'+_0x410033[_0x2a4a1f(0x7a)]+'\x20('+_0x410033[_0x2a4a1f(0x73)]+')');return _0x410033[_0x2a4a1f(0x7d)][_0x2a4a1f(0x80)];}
@@ -1 +1 @@
1
- function a6_0x5004(){const _0x765866=['117650gaFIWQ','toISOString','fetchedAt','8940946EebGFd','cache','367240CRZnfH','8vBEGiP','mock','remote','trim','12651759zWYeOQ','toLowerCase','52204920TxuXVP','324dpfSnq','items','25958DkDsQL','36aacXrg','2824716fyRWnt'];a6_0x5004=function(){return _0x765866;};return a6_0x5004();}(function(_0x465c0a,_0x4213d7){const _0x189288=a6_0x1961,_0x847de4=_0x465c0a();while(!![]){try{const _0x39afe8=-parseInt(_0x189288(0xc1))/0x1+-parseInt(_0x189288(0xbe))/0x2*(parseInt(_0x189288(0xbc))/0x3)+-parseInt(_0x189288(0xc0))/0x4+-parseInt(_0x189288(0xc6))/0x5*(-parseInt(_0x189288(0xbf))/0x6)+-parseInt(_0x189288(0xc4))/0x7+parseInt(_0x189288(0xc7))/0x8*(-parseInt(_0x189288(0xb9))/0x9)+parseInt(_0x189288(0xbb))/0xa;if(_0x39afe8===_0x4213d7)break;else _0x847de4['push'](_0x847de4['shift']());}catch(_0x4c9ef9){_0x847de4['push'](_0x847de4['shift']());}}}(a6_0x5004,0xb7bce));function a6_0x1961(_0x5788fa,_0x5c5780){_0x5788fa=_0x5788fa-0xb8;const _0x50041f=a6_0x5004();let _0x19617e=_0x50041f[_0x5788fa];return _0x19617e;}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 _0x351b4c=a6_0x1961,_0x481b41=(productEnv('APP_LIST_SOURCE')||'')['trim']()[_0x351b4c(0xba)]();return _0x481b41===_0x351b4c(0xc8);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0xbc5cdb){const _0x28e058=a6_0x1961,{env:_0x3eab4b,accessKey:_0x318931,localOnly:localOnly=![],noCache:noCache=![]}=_0xbc5cdb,_0x2b6b38=readCachedAppList(_0x3eab4b,_0x318931),_0x54fff1=_0x318931?.[_0x28e058(0xb8)]()?getAppCacheFilePath(_0x3eab4b,_0x318931):null;if(localOnly)return{'items':_0x2b6b38?.[_0x28e058(0xbd)]??[],'source':'cache','fetchedAt':_0x2b6b38?.[_0x28e058(0xc3)]??null,'cachePath':_0x54fff1};try{const _0x91018b=await getRemoteAppItems(),_0x47e4e2=shouldUseMockRemoteApps()?_0x28e058(0xc8):_0x28e058(0xc9),_0x5e2c72=new Date()[_0x28e058(0xc2)](),_0x3d9498=_0x318931?.['trim']()?writeCachedAppList(_0x3eab4b,_0x318931,{'env':_0x3eab4b,'fetchedAt':_0x5e2c72,'source':_0x47e4e2,'items':_0x91018b}):null;return{'items':_0x91018b,'source':_0x47e4e2,'fetchedAt':_0x5e2c72,'cachePath':_0x3d9498};}catch(_0x4abfa3){if(!noCache&&_0x2b6b38)return{'items':_0x2b6b38[_0x28e058(0xbd)],'source':_0x28e058(0xc5),'fetchedAt':_0x2b6b38[_0x28e058(0xc3)],'cachePath':_0x54fff1};throw _0x4abfa3;}}
1
+ (function(_0x154dca,_0x43fc97){const _0x3575e3=a6_0x4d0a,_0x2fbdd4=_0x154dca();while(!![]){try{const _0x76bb66=parseInt(_0x3575e3(0xc0))/0x1*(parseInt(_0x3575e3(0xb3))/0x2)+parseInt(_0x3575e3(0xb6))/0x3+parseInt(_0x3575e3(0xb5))/0x4+parseInt(_0x3575e3(0xb2))/0x5+parseInt(_0x3575e3(0xb7))/0x6*(parseInt(_0x3575e3(0xbc))/0x7)+-parseInt(_0x3575e3(0xba))/0x8+-parseInt(_0x3575e3(0xbe))/0x9*(parseInt(_0x3575e3(0xc1))/0xa);if(_0x76bb66===_0x43fc97)break;else _0x2fbdd4['push'](_0x2fbdd4['shift']());}catch(_0x512c97){_0x2fbdd4['push'](_0x2fbdd4['shift']());}}}(a6_0x1bde,0xcedce));import{getMyApps}from'../../core/api-client.js';function a6_0x4d0a(_0x103c37,_0x2f1bd6){_0x103c37=_0x103c37-0xb2;const _0x1bde66=a6_0x1bde();let _0x4d0a17=_0x1bde66[_0x103c37];return _0x4d0a17;}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 _0x54f702=a6_0x4d0a,_0x201ffc=(productEnv('APP_LIST_SOURCE')||'')[_0x54f702(0xb8)]()[_0x54f702(0xc2)]();return _0x201ffc==='mock';}function a6_0x1bde(){const _0x105fd2=['29935LlCJnr','99800OKLzCi','toLowerCase','toISOString','7418640AeozZi','82maYsCP','fetchedAt','4392928ibbcSj','2714526qPzezS','90702CodAcA','trim','cache','161064biXBNY','items','266jGHZER','mock','3987ffbYDS','remote'];a6_0x1bde=function(){return _0x105fd2;};return a6_0x1bde();}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x4a9564){const _0x980d5b=a6_0x4d0a,{env:_0x3497dd,accessKey:_0x2a2646,localOnly:localOnly=![],noCache:noCache=![]}=_0x4a9564,_0x11aacc=readCachedAppList(_0x3497dd,_0x2a2646),_0x20e092=_0x2a2646?.['trim']()?getAppCacheFilePath(_0x3497dd,_0x2a2646):null;if(localOnly)return{'items':_0x11aacc?.['items']??[],'source':_0x980d5b(0xb9),'fetchedAt':_0x11aacc?.[_0x980d5b(0xb4)]??null,'cachePath':_0x20e092};try{const _0x24476a=await getRemoteAppItems(),_0x599128=shouldUseMockRemoteApps()?_0x980d5b(0xbd):_0x980d5b(0xbf),_0x550e19=new Date()[_0x980d5b(0xc3)](),_0x4655e3=_0x2a2646?.['trim']()?writeCachedAppList(_0x3497dd,_0x2a2646,{'env':_0x3497dd,'fetchedAt':_0x550e19,'source':_0x599128,'items':_0x24476a}):null;return{'items':_0x24476a,'source':_0x599128,'fetchedAt':_0x550e19,'cachePath':_0x4655e3};}catch(_0x481648){if(!noCache&&_0x11aacc)return{'items':_0x11aacc[_0x980d5b(0xbb)],'source':'cache','fetchedAt':_0x11aacc[_0x980d5b(0xb4)],'cachePath':_0x20e092};throw _0x481648;}}
@@ -1 +1 @@
1
- (function(_0x220ef6,_0x4b837b){const _0x3531e5=a7_0x35a2,_0x1054c1=_0x220ef6();while(!![]){try{const _0x485cdc=-parseInt(_0x3531e5(0x1e4))/0x1+-parseInt(_0x3531e5(0x1dd))/0x2+-parseInt(_0x3531e5(0x1e5))/0x3+parseInt(_0x3531e5(0x1ed))/0x4+-parseInt(_0x3531e5(0x1eb))/0x5*(-parseInt(_0x3531e5(0x1f0))/0x6)+-parseInt(_0x3531e5(0x1e9))/0x7+-parseInt(_0x3531e5(0x1ec))/0x8*(-parseInt(_0x3531e5(0x1e2))/0x9);if(_0x485cdc===_0x4b837b)break;else _0x1054c1['push'](_0x1054c1['shift']());}catch(_0x4e1ab5){_0x1054c1['push'](_0x1054c1['shift']());}}}(a7_0x17c4,0xbb003));function a7_0x17c4(){const _0x52fc08=['appcode','defaultApp','36JXjLLk','1095172vLYxdt','trim','appCode','name','isCurrent','2294460cCrErh','local','1213367hVrXMv','2182938xKrQQP','definedIn','currentApp','find','1138200ONCXNV','named','1247930hpdeBO','40IUuqmp','2579752XVhvaV'];a7_0x17c4=function(){return _0x52fc08;};return a7_0x17c4();}function a7_0x35a2(_0x2a96ae,_0x3b6bdf){_0x2a96ae=_0x2a96ae-0x1dd;const _0x17c484=a7_0x17c4();let _0x35a228=_0x17c484[_0x2a96ae];return _0x35a228;}export function enrichAppListItemsWithMergedSelection(_0x3be145,_0x5b38cf){const _0xf2791a=a7_0x35a2;if(!_0x5b38cf)return;const _0x384510=!!(_0x5b38cf['currentApp']??_0x5b38cf[_0xf2791a(0x1ef)]);for(const _0x342a82 of _0x3be145){_0x342a82[_0xf2791a(0x1e1)]=![];}const _0x54eb6c=_0x5b38cf[_0xf2791a(0x1df)]!=null?String(_0x5b38cf[_0xf2791a(0x1df)])[_0xf2791a(0x1de)]():'';if(_0x384510){const _0x4c3559=_0x5b38cf[_0xf2791a(0x1e7)]??_0x5b38cf['defaultApp'];if(_0x4c3559){const _0x3065df=_0x3be145[_0xf2791a(0x1e8)](_0x5afb81=>_0x5afb81['named']===!![]&&_0x5afb81[_0xf2791a(0x1e0)]===_0x4c3559&&_0x5afb81[_0xf2791a(0x1e6)]===_0xf2791a(0x1e3)),_0x58d49e=_0x3065df??_0x3be145[_0xf2791a(0x1e8)](_0x59f66f=>_0x59f66f[_0xf2791a(0x1ea)]===!![]&&_0x59f66f[_0xf2791a(0x1e0)]===_0x4c3559);if(_0x58d49e){const _0x237afd=String(_0x58d49e[_0xf2791a(0x1ee)]??'')[_0xf2791a(0x1de)]();if(!_0x54eb6c||_0x237afd===_0x54eb6c){_0x58d49e['isCurrent']=!![];return;}}}if(_0x54eb6c){const _0x16ca60=_0x3be145['find'](_0x2717aa=>String(_0x2717aa[_0xf2791a(0x1ee)]??'')[_0xf2791a(0x1de)]()===_0x54eb6c);_0x16ca60&&(_0x16ca60[_0xf2791a(0x1e1)]=!![]);}return;}if(!_0x54eb6c)return;for(const _0x3cae7c of _0x3be145){String(_0x3cae7c[_0xf2791a(0x1ee)]??'')[_0xf2791a(0x1de)]()===_0x54eb6c&&(_0x3cae7c[_0xf2791a(0x1e1)]=!![]);}}
1
+ function a7_0x7033(_0x436b35,_0x3f299c){_0x436b35=_0x436b35-0x1b7;const _0xdfe3c9=a7_0xdfe3();let _0x7033ec=_0xdfe3c9[_0x436b35];return _0x7033ec;}(function(_0x38509b,_0x7b05c0){const _0x190bcb=a7_0x7033,_0xc65636=_0x38509b();while(!![]){try{const _0xe38fc9=parseInt(_0x190bcb(0x1bf))/0x1+parseInt(_0x190bcb(0x1b7))/0x2+-parseInt(_0x190bcb(0x1ca))/0x3+parseInt(_0x190bcb(0x1bc))/0x4+-parseInt(_0x190bcb(0x1bd))/0x5*(parseInt(_0x190bcb(0x1b9))/0x6)+-parseInt(_0x190bcb(0x1ba))/0x7*(-parseInt(_0x190bcb(0x1c3))/0x8)+-parseInt(_0x190bcb(0x1c6))/0x9*(parseInt(_0x190bcb(0x1cb))/0xa);if(_0xe38fc9===_0x7b05c0)break;else _0xc65636['push'](_0xc65636['shift']());}catch(_0x47ebe7){_0xc65636['push'](_0xc65636['shift']());}}}(a7_0xdfe3,0x77355));function a7_0xdfe3(){const _0x15c115=['appcode','named','1449966DIVHci','64760enjHrj','1232716fYwhCq','local','299418IXSWJD','42077sXyjpJ','trim','1068364DBOfBR','55yXKFko','find','291008QCpyoZ','currentApp','isCurrent','definedIn','1288jxwbdc','name','defaultApp','864FRDyhd','appCode'];a7_0xdfe3=function(){return _0x15c115;};return a7_0xdfe3();}export function enrichAppListItemsWithMergedSelection(_0x2e73d0,_0x28b8b5){const _0x5b9aca=a7_0x7033;if(!_0x28b8b5)return;const _0x36f86e=!!(_0x28b8b5['currentApp']??_0x28b8b5[_0x5b9aca(0x1c5)]);for(const _0x3ab7ce of _0x2e73d0){_0x3ab7ce[_0x5b9aca(0x1c1)]=![];}const _0x1d45e3=_0x28b8b5[_0x5b9aca(0x1c7)]!=null?String(_0x28b8b5[_0x5b9aca(0x1c7)])[_0x5b9aca(0x1bb)]():'';if(_0x36f86e){const _0x5ac211=_0x28b8b5[_0x5b9aca(0x1c0)]??_0x28b8b5[_0x5b9aca(0x1c5)];if(_0x5ac211){const _0x20c750=_0x2e73d0[_0x5b9aca(0x1be)](_0x3fc029=>_0x3fc029[_0x5b9aca(0x1c9)]===!![]&&_0x3fc029[_0x5b9aca(0x1c4)]===_0x5ac211&&_0x3fc029[_0x5b9aca(0x1c2)]===_0x5b9aca(0x1b8)),_0x52d522=_0x20c750??_0x2e73d0[_0x5b9aca(0x1be)](_0x185145=>_0x185145['named']===!![]&&_0x185145[_0x5b9aca(0x1c4)]===_0x5ac211);if(_0x52d522){const _0x1b765e=String(_0x52d522['appcode']??'')[_0x5b9aca(0x1bb)]();if(!_0x1d45e3||_0x1b765e===_0x1d45e3){_0x52d522[_0x5b9aca(0x1c1)]=!![];return;}}}if(_0x1d45e3){const _0x549471=_0x2e73d0[_0x5b9aca(0x1be)](_0x57463e=>String(_0x57463e['appcode']??'')[_0x5b9aca(0x1bb)]()===_0x1d45e3);_0x549471&&(_0x549471[_0x5b9aca(0x1c1)]=!![]);}return;}if(!_0x1d45e3)return;for(const _0x930cc0 of _0x2e73d0){String(_0x930cc0[_0x5b9aca(0x1c8)]??'')[_0x5b9aca(0x1bb)]()===_0x1d45e3&&(_0x930cc0[_0x5b9aca(0x1c1)]=!![]);}}
@@ -1 +1 @@
1
- const a8_0x2a9605=a8_0x29f0;(function(_0x1763c1,_0x1c35e6){const _0x5ca847=a8_0x29f0,_0x611fdc=_0x1763c1();while(!![]){try{const _0x282fac=-parseInt(_0x5ca847(0x1f6))/0x1+parseInt(_0x5ca847(0x1ee))/0x2*(parseInt(_0x5ca847(0x1f0))/0x3)+parseInt(_0x5ca847(0x1fe))/0x4*(parseInt(_0x5ca847(0x1f1))/0x5)+parseInt(_0x5ca847(0x1ff))/0x6+-parseInt(_0x5ca847(0x1ea))/0x7*(-parseInt(_0x5ca847(0x1f5))/0x8)+-parseInt(_0x5ca847(0x1f8))/0x9*(-parseInt(_0x5ca847(0x1f9))/0xa)+parseInt(_0x5ca847(0x1e8))/0xb*(-parseInt(_0x5ca847(0x1fd))/0xc);if(_0x282fac===_0x1c35e6)break;else _0x611fdc['push'](_0x611fdc['shift']());}catch(_0x49c544){_0x611fdc['push'](_0x611fdc['shift']());}}}(a8_0x2e8f,0x7516a));import{getRuntimeAppConfigByKey}from'../../core/api-client.js';function a8_0x2e8f(){const _0x164444=['749480QTfQPy','1115898vMHChg','Get\x20one\x20runtime\x20app-config\x20value\x20by\x20key','\x20app-config\x20get\x20<key>','12382172CasNuU','validation','7hFbFbq','args','appCode','apiError','3740rpbHQg','Missing\x20app-config\x20key.','183WWpScZ','15RxucVH','Usage:\x20','app-config','key','5009016JSIqBs','348945nCtoGr','get','4193109bSNIrg','10jePlQo',',\x20appCode=','Check\x20that\x20the\x20key\x20exists,\x20the\x20current\x20AccessKey\x20has\x20permission,\x20and\x20the\x20runtime\x20app-config\x20endpoint\x20is\x20available.','App\x20config\x20key','12euFfVa'];a8_0x2e8f=function(){return _0x164444;};return a8_0x2e8f();}function a8_0x29f0(_0x557ec6,_0x41473b){_0x557ec6=_0x557ec6-0x1e8;const _0x2e8ffa=a8_0x2e8f();let _0x29f0d6=_0x2e8ffa[_0x557ec6];return _0x29f0d6;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const appConfigGet={'service':a8_0x2a9605(0x1f3),'command':a8_0x2a9605(0x1f7),'description':a8_0x2a9605(0x200),'risk':'read','args':[{'name':a8_0x2a9605(0x1f4),'description':a8_0x2a9605(0x1fc),'required':!![]}],'flags':[],async 'execute'(_0x5df719){const _0x41f448=a8_0x2a9605,_0x3b84b1=_0x5df719[_0x41f448(0x1eb)][0x0]?.['trim']();if(!_0x3b84b1)throw CliErrors[_0x41f448(0x1e9)](_0x41f448(0x1ef),_0x41f448(0x1f2)+CLI_BIN_NAME+_0x41f448(0x201));try{const _0x546c64=await getRuntimeAppConfigByKey(_0x5df719['appCode'],_0x3b84b1);return{'ok':!![],'data':_0x546c64};}catch{throw CliErrors[_0x41f448(0x1ed)]('Unable\x20to\x20get\x20app-config\x20value:\x20key='+_0x3b84b1+_0x41f448(0x1fa)+_0x5df719[_0x41f448(0x1ec)],_0x41f448(0x1fb));}}};
1
+ const a8_0x58942a=a8_0x55c8;function a8_0x280c(){const _0x5c633b=['1170drapzb','args','app-config','validation',',\x20appCode=','1846616lDVjAp','84cvaQLW','1380jXikqD','1117TbXhiG','get','14935zexLNP','apiError','Unable\x20to\x20get\x20app-config\x20value:\x20key=','8590030KZzgjr','trim','Get\x20one\x20runtime\x20app-config\x20value\x20by\x20key','\x20app-config\x20get\x20<key>','3421116BxTvnL','appCode','key','Check\x20that\x20the\x20key\x20exists,\x20the\x20current\x20AccessKey\x20has\x20permission,\x20and\x20the\x20runtime\x20app-config\x20endpoint\x20is\x20available.','27927WYOBUI','3OQMdIi','11CdCJjC','Missing\x20app-config\x20key.','1272505wJHTvh','App\x20config\x20key','7JWWMqC'];a8_0x280c=function(){return _0x5c633b;};return a8_0x280c();}(function(_0x3a6713,_0x305e50){const _0x670f29=a8_0x55c8,_0x20d4cc=_0x3a6713();while(!![]){try{const _0x495456=parseInt(_0x670f29(0xe9))/0x1*(-parseInt(_0x670f29(0xe1))/0x2)+parseInt(_0x670f29(0xf7))/0x3*(-parseInt(_0x670f29(0xf2))/0x4)+-parseInt(_0x670f29(0xeb))/0x5*(-parseInt(_0x670f29(0xe8))/0x6)+parseInt(_0x670f29(0xfc))/0x7*(-parseInt(_0x670f29(0xe6))/0x8)+parseInt(_0x670f29(0xf6))/0x9+-parseInt(_0x670f29(0xee))/0xa*(-parseInt(_0x670f29(0xf8))/0xb)+-parseInt(_0x670f29(0xe7))/0xc*(-parseInt(_0x670f29(0xfa))/0xd);if(_0x495456===_0x305e50)break;else _0x20d4cc['push'](_0x20d4cc['shift']());}catch(_0x1ec4bb){_0x20d4cc['push'](_0x20d4cc['shift']());}}}(a8_0x280c,0x78ca8));import{getRuntimeAppConfigByKey}from'../../core/api-client.js';function a8_0x55c8(_0x358926,_0x40425b){_0x358926=_0x358926-0xe1;const _0x280c16=a8_0x280c();let _0x55c806=_0x280c16[_0x358926];return _0x55c806;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const appConfigGet={'service':a8_0x58942a(0xe3),'command':a8_0x58942a(0xea),'description':a8_0x58942a(0xf0),'risk':'read','args':[{'name':a8_0x58942a(0xf4),'description':a8_0x58942a(0xfb),'required':!![]}],'flags':[],async 'execute'(_0x136c65){const _0x39a71c=a8_0x58942a,_0x2dfd9c=_0x136c65[_0x39a71c(0xe2)][0x0]?.[_0x39a71c(0xef)]();if(!_0x2dfd9c)throw CliErrors[_0x39a71c(0xe4)](_0x39a71c(0xf9),'Usage:\x20'+CLI_BIN_NAME+_0x39a71c(0xf1));try{const _0x2d2b7d=await getRuntimeAppConfigByKey(_0x136c65['appCode'],_0x2dfd9c);return{'ok':!![],'data':_0x2d2b7d};}catch{throw CliErrors[_0x39a71c(0xec)](_0x39a71c(0xed)+_0x2dfd9c+_0x39a71c(0xe5)+_0x136c65[_0x39a71c(0xf3)],_0x39a71c(0xf5));}}};
@@ -1 +1 @@
1
- (function(_0x385f63,_0x57a494){const _0x484ca4=a9_0x2212,_0x14d08c=_0x385f63();while(!![]){try{const _0x2b6a64=parseInt(_0x484ca4(0x18d))/0x1*(-parseInt(_0x484ca4(0x191))/0x2)+-parseInt(_0x484ca4(0x196))/0x3*(parseInt(_0x484ca4(0x192))/0x4)+-parseInt(_0x484ca4(0x198))/0x5*(-parseInt(_0x484ca4(0x195))/0x6)+parseInt(_0x484ca4(0x197))/0x7+-parseInt(_0x484ca4(0x190))/0x8*(parseInt(_0x484ca4(0x193))/0x9)+-parseInt(_0x484ca4(0x18f))/0xa*(parseInt(_0x484ca4(0x194))/0xb)+-parseInt(_0x484ca4(0x18e))/0xc*(-parseInt(_0x484ca4(0x199))/0xd);if(_0x2b6a64===_0x57a494)break;else _0x14d08c['push'](_0x14d08c['shift']());}catch(_0x1c0f6f){_0x14d08c['push'](_0x14d08c['shift']());}}}(a9_0x5666,0xe3481));function a9_0x2212(_0x502181,_0x321d11){_0x502181=_0x502181-0x18d;const _0x5666c3=a9_0x5666();let _0x2212bf=_0x5666c3[_0x502181];return _0x2212bf;}import{appConfigGet}from'../../commands/app-config/get.js';function a9_0x5666(){const _0x4c6ca7=['11134WVxyiN','316444rlOBkj','430173PADFPa','127006mlFQAR','294nIVTCa','60GMBKkv','3902430WGJOrT','107435WFmrZT','91fhEmgg','53SgcAGw','3384276uxFVYu','10NLXpch','128mlCeQZ'];a9_0x5666=function(){return _0x4c6ca7;};return a9_0x5666();}export const appConfigDefinitions=[appConfigGet];
1
+ function a9_0x4b28(){const _0x511207=['2132754WoCqfu','611110ZAlNXk','102nKxBiF','26360HOYgdp','2867172TXVpBG','5151344IpTENz','128255rNTbWD','236270OhwUpx','18zeGeoT'];a9_0x4b28=function(){return _0x511207;};return a9_0x4b28();}function a9_0x1d81(_0x3bb244,_0x4c1ca7){_0x3bb244=_0x3bb244-0x132;const _0x4b2816=a9_0x4b28();let _0x1d81f4=_0x4b2816[_0x3bb244];return _0x1d81f4;}(function(_0x43b327,_0x2326ee){const _0x309170=a9_0x1d81,_0x3e62d4=_0x43b327();while(!![]){try{const _0x16a23f=parseInt(_0x309170(0x133))/0x1+-parseInt(_0x309170(0x139))/0x2+parseInt(_0x309170(0x132))/0x3+-parseInt(_0x309170(0x137))/0x4+parseInt(_0x309170(0x138))/0x5*(parseInt(_0x309170(0x134))/0x6)+parseInt(_0x309170(0x136))/0x7+parseInt(_0x309170(0x135))/0x8*(parseInt(_0x309170(0x13a))/0x9);if(_0x16a23f===_0x2326ee)break;else _0x3e62d4['push'](_0x3e62d4['shift']());}catch(_0xb1948a){_0x3e62d4['push'](_0x3e62d4['shift']());}}}(a9_0x4b28,0xbb936));import{appConfigGet}from'../../commands/app-config/get.js';export const appConfigDefinitions=[appConfigGet];
@@ -1 +1 @@
1
- const a10_0x1e3fea=a10_0x42f2;function a10_0x26ed(){const _0x59ae2c=['4802wisdTi','body','329hugkJR','list','AGENT','flag','/update','Artifact\x20ID','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','add','1929415UYREGY','Updated\x20Artifact\x20','exec','15kzOKyD','data','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','map','779944sGCiDj','update','bool','description','test','num','dayjs','Invalid\x20JSON\x20for\x20--metadata:\x20','build','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','react_module\x20imports\x20are\x20limited\x20to:\x20','react_module','POST','Saves\x20and\x20compiles\x20new\x20Artifact\x20source.\x20On\x20success,\x20a\x20displayable\x20embedded\x20module\x20is\x20added\x20to\x20the\x20current\x20app.','lodash','validation','lastIndex','string','utf8','7564344OqcAFl','file','react-dom','includes','Optional\x20favorite-state\x20filter','source','artifact','File\x20is\x20not\x20a\x20regular\x20file:\x20','Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped','279zFWgmg','length','Artifact\x20source\x20file\x20is\x20blank.','some','Created\x20Artifact\x20','1814155NXYLhq','createTime','Saves\x20and\x20recompiles\x20Artifact\x20source.\x20Embedded\x20module\x20display\x20and\x20interaction\x20in\x20the\x20app\x20may\x20change\x20immediately.','metadata','artifactType','2156671SeqgDk','Preview:\x20update\x20react_module\x20Artifact\x20','favorite','react','.\x20Unsupported:\x20','File\x20not\x20found:\x20','Show\x20one\x20Artifact\x20by\x20id','appCode','57560vWzArZ','number','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','compiledContent','isArray','create','updateTime','File\x20path\x20is\x20required.','startsWith','trim','6GNKuPy','name','List\x20current-app\x20react_module\x20Artifacts','str'];a10_0x26ed=function(){return _0x59ae2c;};return a10_0x26ed();}(function(_0xe196b5,_0x38e80e){const _0x28f88=a10_0x42f2,_0x1b6e40=_0xe196b5();while(!![]){try{const _0x5e03ae=-parseInt(_0x28f88(0xb0))/0x1*(parseInt(_0x28f88(0xae))/0x2)+-parseInt(_0x28f88(0xbc))/0x3*(-parseInt(_0x28f88(0xc0))/0x4)+-parseInt(_0x28f88(0xb9))/0x5*(parseInt(_0x28f88(0xaa))/0x6)+-parseInt(_0x28f88(0xe1))/0x7+parseInt(_0x28f88(0xd3))/0x8+-parseInt(_0x28f88(0xdc))/0x9*(parseInt(_0x28f88(0xa0))/0xa)+parseInt(_0x28f88(0x98))/0xb;if(_0x5e03ae===_0x38e80e)break;else _0x1b6e40['push'](_0x1b6e40['shift']());}catch(_0xbec51a){_0x1b6e40['push'](_0x1b6e40['shift']());}}}(a10_0x26ed,0x7ad51));import{existsSync,readFileSync,statSync}from'node:fs';import{createRuntimeArtifact,getRuntimeArtifact,listRuntimeArtifacts,updateRuntimeArtifact}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a10_0x42f2(_0x1ea778,_0x3d092d){_0x1ea778=_0x1ea778-0x95;const _0x26edec=a10_0x26ed();let _0x42f27d=_0x26edec[_0x1ea778];return _0x42f27d;}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const ARTIFACT_TYPE_REACT_MODULE=a10_0x1e3fea(0xcb),ARTIFACT_SOURCE_AGENT=a10_0x1e3fea(0xb2),ALLOWED_REACT_MODULE_IMPORTS=[a10_0x1e3fea(0x9b),a10_0x1e3fea(0xd5),a10_0x1e3fea(0xce),a10_0x1e3fea(0xc6),'antd','@ant-design/icons'];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS['join'](',\x20');const IMPORT_SOURCE_PATTERNS=[/\bimport\s+(?:type\s+)?(?:[^'";]*?\s+from\s+)?["']([^"']+)["']/g,/\bexport\s+(?:type\s+)?[^'";]*?\s+from\s+["']([^"']+)["']/g,/\bimport\s*\(\s*["']([^"']+)["']\s*\)/g,/\brequire\s*\(\s*["']([^"']+)["']\s*\)/g],PAGE_LEVEL_PATTERNS=[/<!doctype\s+html/i,/<\s*html\b/i,/\bcreateRoot\s*\(/,/\bReactDOM\s*\.\s*render\s*\(/,/\bReactDOM\s*\.\s*createRoot\s*\(/],FILE_FLAG={'name':'file','type':'string','required':!![],'description':a10_0x1e3fea(0xb7)},ARTIFACT_NAME_FLAG={'name':a10_0x1e3fea(0xab),'type':'string','description':'Artifact\x20display\x20name'},METADATA_FLAG={'name':a10_0x1e3fea(0x96),'type':a10_0x1e3fea(0xd1),'description':a10_0x1e3fea(0xdb)};function isPlainObject(_0xcdeff6){const _0x926fe1=a10_0x1e3fea;return typeof _0xcdeff6==='object'&&_0xcdeff6!==null&&!Array[_0x926fe1(0xa4)](_0xcdeff6);}function readSourceFile(_0x5400e0){const _0x3fb0b3=a10_0x1e3fea;if(!_0x5400e0)throw CliErrors[_0x3fb0b3(0xcf)](_0x3fb0b3(0xa7));if(!existsSync(_0x5400e0))throw CliErrors['validation'](_0x3fb0b3(0x9d)+_0x5400e0);if(!statSync(_0x5400e0)['isFile']())throw CliErrors[_0x3fb0b3(0xcf)](_0x3fb0b3(0xda)+_0x5400e0);const _0x1da002=readFileSync(_0x5400e0,_0x3fb0b3(0xd2));return validateReactModuleSource(_0x1da002),_0x1da002;}function parseMetadata(_0x407c2f){const _0x24be96=a10_0x1e3fea;if(!_0x407c2f)return undefined;let _0xaf0810;try{_0xaf0810=JSON['parse'](_0x407c2f);}catch{throw CliErrors[_0x24be96(0xcf)](_0x24be96(0xc7)+_0x407c2f);}if(!isPlainObject(_0xaf0810))throw CliErrors[_0x24be96(0xcf)]('--metadata\x20must\x20be\x20a\x20JSON\x20object.');const _0x44c62e={..._0xaf0810};return delete _0x44c62e[_0x24be96(0xa3)],_0x44c62e;}function getPackageName(_0x355345){const _0x4881bc=a10_0x1e3fea;if(_0x355345[_0x4881bc(0xa8)]('@')){const [_0x50a97c,_0x26fa99]=_0x355345['split']('/');return _0x50a97c&&_0x26fa99?_0x50a97c+'/'+_0x26fa99:_0x355345;}return _0x355345['split']('/')[0x0]||_0x355345;}function validateAllowedImports(_0x4a111d){const _0x13592f=a10_0x1e3fea,_0x382f0b=new Set();for(const _0x304bb7 of IMPORT_SOURCE_PATTERNS){_0x304bb7[_0x13592f(0xd0)]=0x0;let _0x1e9ccb;while((_0x1e9ccb=_0x304bb7[_0x13592f(0xbb)](_0x4a111d))!==null){const _0x2f71e4=_0x1e9ccb[0x1]?.[_0x13592f(0xa9)]();_0x2f71e4&&_0x382f0b[_0x13592f(0xb8)](_0x2f71e4);}}const _0x5b7736=[..._0x382f0b][_0x13592f(0xbf)](getPackageName)['filter'](_0x5ecaa9=>!ALLOWED_REACT_MODULE_IMPORTS[_0x13592f(0xd6)](_0x5ecaa9));if(_0x5b7736[_0x13592f(0xdd)]>0x0)throw CliErrors[_0x13592f(0xcf)](_0x13592f(0xca)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0x13592f(0x9c)+[...new Set(_0x5b7736)]['join'](',\x20'));}export function validateReactModuleSource(_0x1130da){const _0x173dc5=a10_0x1e3fea;if(!_0x1130da[_0x173dc5(0xa9)]())throw CliErrors[_0x173dc5(0xcf)](_0x173dc5(0xde));if(PAGE_LEVEL_PATTERNS[_0x173dc5(0xdf)](_0x4ce446=>_0x4ce446[_0x173dc5(0xc4)](_0x1130da)))throw CliErrors['validation'](_0x173dc5(0xc9));validateAllowedImports(_0x1130da);}function buildArtifactInput(_0x18f300){const _0x5acae2=a10_0x1e3fea,_0x143e88=readSourceFile(_0x18f300[_0x5acae2(0xad)](_0x5acae2(0xd4))),_0x4b3714=_0x18f300[_0x5acae2(0xad)](_0x5acae2(0xab))[_0x5acae2(0xa9)](),_0xd30233=parseMetadata(_0x18f300[_0x5acae2(0xad)](_0x5acae2(0x96)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x4b3714?{'name':_0x4b3714}:{},'content':_0x143e88,..._0xd30233?{'metadata':_0xd30233}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x2a00ae){const _0x3d8017=a10_0x1e3fea;return{'id':_0x2a00ae['id'],'name':_0x2a00ae['name'],'artifactType':_0x2a00ae[_0x3d8017(0x97)],'source':_0x2a00ae[_0x3d8017(0xd8)],'favorite':_0x2a00ae[_0x3d8017(0x9a)],'deleted':_0x2a00ae['deleted'],'createTime':_0x2a00ae['createTime'],'updateTime':_0x2a00ae[_0x3d8017(0xa6)]};}function detailArtifact(_0x37278c){const _0x129678=a10_0x1e3fea;return{'id':_0x37278c['id'],'appCode':_0x37278c[_0x129678(0x9f)],'name':_0x37278c['name'],'artifactType':_0x37278c[_0x129678(0x97)],'source':_0x37278c[_0x129678(0xd8)],'favorite':_0x37278c[_0x129678(0x9a)],'deleted':_0x37278c['deleted'],'content':_0x37278c['content']??'','compiledContent':_0x37278c[_0x129678(0xa3)],'metadata':_0x37278c[_0x129678(0x96)]??{},'createTime':_0x37278c[_0x129678(0xe2)],'updateTime':_0x37278c[_0x129678(0xa6)]};}function readFavoriteFlag(_0x3b50e9){const _0xfdbd47=a10_0x1e3fea,_0x137a75=_0x3b50e9[_0xfdbd47(0xb3)](_0xfdbd47(0x9a));return _0x137a75===undefined||_0x137a75===null||_0x137a75===''?undefined:_0x3b50e9['bool']('favorite');}const artifactList={'service':'artifact','command':a10_0x1e3fea(0xb1),'description':a10_0x1e3fea(0xac),'risk':'read','flags':[{'name':a10_0x1e3fea(0xd8),'type':a10_0x1e3fea(0xd1),'description':a10_0x1e3fea(0xb6)},{'name':'favorite','type':'boolean','description':a10_0x1e3fea(0xd7)},VERBOSE_FLAG],async 'execute'(_0x239689){const _0x27925e=a10_0x1e3fea,_0x4ca245=await listRuntimeArtifacts(_0x239689[_0x27925e(0x9f)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x239689['str'](_0x27925e(0xd8))?{'source':_0x239689[_0x27925e(0xad)](_0x27925e(0xd8))}:{},...readFavoriteFlag(_0x239689)!==undefined?{'favorite':readFavoriteFlag(_0x239689)}:{}});return{'ok':!![],'data':{'total':_0x4ca245[_0x27925e(0xdd)],'items':_0x239689[_0x27925e(0xc2)]('verbose')?_0x4ca245:_0x4ca245[_0x27925e(0xbf)](summarizeArtifact)}};}},artifactDetail={'service':a10_0x1e3fea(0xd9),'command':'detail','description':a10_0x1e3fea(0x9e),'risk':'read','flags':[{...ID_FLAG,'description':'Artifact\x20ID'}],async 'execute'(_0x5b88fb){const _0xe44f0a=a10_0x1e3fea,_0x3d8b98=await getRuntimeArtifact(_0x5b88fb[_0xe44f0a(0xc5)]('id'),_0x5b88fb[_0xe44f0a(0x9f)]);return{'ok':!![],'data':detailArtifact(_0x3d8b98)};}},artifactCreate={'service':a10_0x1e3fea(0xd9),'command':'create','description':a10_0x1e3fea(0xa2),'risk':'write','confirmationDescription':a10_0x1e3fea(0xcd),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x1c7266){const _0x457926=a10_0x1e3fea,_0x56ba5d=buildArtifactInput(_0x1c7266),_0x15a04e=await createRuntimeArtifact(_0x1c7266['appCode'],_0x56ba5d);return{'ok':!![],'data':detailArtifact(_0x15a04e),'message':_0x457926(0xe0)+_0x15a04e['id']+(_0x15a04e[_0x457926(0xab)]?'\x20('+_0x15a04e[_0x457926(0xab)]+')':'')};},async 'dryRun'(_0x2dd9b7){const _0x3fb6e4=a10_0x1e3fea,_0x33f273=buildArtifactInput(_0x2dd9b7);return dryRun(_0x3fb6e4(0xcc),'/client/artifact/create')[_0x3fb6e4(0xaf)]({'appCode':_0x2dd9b7[_0x3fb6e4(0x9f)],..._0x33f273})[_0x3fb6e4(0xc3)]('Preview:\x20create\x20react_module\x20Artifact')[_0x3fb6e4(0xc8)]();},'writeEventSubject'(_0x18810c){const _0x1f2c8c=a10_0x1e3fea,_0x47275a=_0x18810c[_0x1f2c8c(0xbd)]?.['id'];if(typeof _0x47275a!==_0x1f2c8c(0xd1)&&typeof _0x47275a!==_0x1f2c8c(0xa1))return undefined;return{'kind':_0x1f2c8c(0xd9),'id':String(_0x47275a),'action':_0x1f2c8c(0xa5)};}},artifactUpdate={'service':a10_0x1e3fea(0xd9),'command':a10_0x1e3fea(0xc1),'description':a10_0x1e3fea(0xbe),'risk':'write','confirmationDescription':a10_0x1e3fea(0x95),'flags':[{...ID_FLAG,'description':a10_0x1e3fea(0xb5)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x58e757){const _0x23f01b=a10_0x1e3fea,_0x5d018e=_0x58e757[_0x23f01b(0xc5)]('id'),_0x4af4a9=buildArtifactInput(_0x58e757),_0x266e42=await updateRuntimeArtifact(_0x5d018e,_0x58e757['appCode'],_0x4af4a9);return{'ok':!![],'data':detailArtifact(_0x266e42),'message':_0x23f01b(0xba)+_0x266e42['id']+(_0x266e42[_0x23f01b(0xab)]?'\x20('+_0x266e42['name']+')':'')};},async 'dryRun'(_0x42afcb){const _0x3b021f=a10_0x1e3fea,_0x542fc8=_0x42afcb[_0x3b021f(0xc5)]('id'),_0x35d920=buildArtifactInput(_0x42afcb);return dryRun(_0x3b021f(0xcc),'/client/artifact/'+_0x542fc8+_0x3b021f(0xb4))[_0x3b021f(0xaf)]({'appCode':_0x42afcb[_0x3b021f(0x9f)],..._0x35d920})['description'](_0x3b021f(0x99)+_0x542fc8)[_0x3b021f(0xc8)]();},'writeEventSubject'(_0x4ba727){const _0x297842=a10_0x1e3fea,_0x170c8a=_0x4ba727['data']?.['id'];if(typeof _0x170c8a!==_0x297842(0xd1)&&typeof _0x170c8a!==_0x297842(0xa1))return undefined;return{'kind':_0x297842(0xd9),'id':String(_0x170c8a),'action':_0x297842(0xc1)};}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
1
+ const a10_0x51173c=a10_0x58c7;(function(_0x1e5e69,_0x1fbb59){const _0x18036e=a10_0x58c7,_0x2af223=_0x1e5e69();while(!![]){try{const _0x24d278=-parseInt(_0x18036e(0x207))/0x1*(-parseInt(_0x18036e(0x1f9))/0x2)+parseInt(_0x18036e(0x1ee))/0x3*(-parseInt(_0x18036e(0x20b))/0x4)+-parseInt(_0x18036e(0x20f))/0x5+parseInt(_0x18036e(0x201))/0x6*(parseInt(_0x18036e(0x215))/0x7)+parseInt(_0x18036e(0x1f4))/0x8+parseInt(_0x18036e(0x20c))/0x9+-parseInt(_0x18036e(0x218))/0xa;if(_0x24d278===_0x1fbb59)break;else _0x2af223['push'](_0x2af223['shift']());}catch(_0x3807ea){_0x2af223['push'](_0x2af223['shift']());}}}(a10_0x3efa,0x22612));import{existsSync,readFileSync,statSync}from'node:fs';import{createRuntimeArtifact,getRuntimeArtifact,listRuntimeArtifacts,updateRuntimeArtifact}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const ARTIFACT_TYPE_REACT_MODULE=a10_0x51173c(0x224),ARTIFACT_SOURCE_AGENT=a10_0x51173c(0x213),ALLOWED_REACT_MODULE_IMPORTS=['react',a10_0x51173c(0x22e),a10_0x51173c(0x221),a10_0x51173c(0x21d),a10_0x51173c(0x200),a10_0x51173c(0x1ea)];export const ALLOWED_REACT_MODULE_IMPORTS_TEXT=ALLOWED_REACT_MODULE_IMPORTS['join'](',\x20');const IMPORT_SOURCE_PATTERNS=[/\bimport\s+(?:type\s+)?(?:[^'";]*?\s+from\s+)?["']([^"']+)["']/g,/\bexport\s+(?:type\s+)?[^'";]*?\s+from\s+["']([^"']+)["']/g,/\bimport\s*\(\s*["']([^"']+)["']\s*\)/g,/\brequire\s*\(\s*["']([^"']+)["']\s*\)/g],PAGE_LEVEL_PATTERNS=[/<!doctype\s+html/i,/<\s*html\b/i,/\bcreateRoot\s*\(/,/\bReactDOM\s*\.\s*render\s*\(/,/\bReactDOM\s*\.\s*createRoot\s*\(/],FILE_FLAG={'name':a10_0x51173c(0x1f2),'type':a10_0x51173c(0x20a),'required':!![],'description':a10_0x51173c(0x22d)},ARTIFACT_NAME_FLAG={'name':a10_0x51173c(0x203),'type':a10_0x51173c(0x20a),'description':a10_0x51173c(0x225)},METADATA_FLAG={'name':a10_0x51173c(0x216),'type':a10_0x51173c(0x20a),'description':'Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped'};function isPlainObject(_0x500f66){const _0x5c9f3b=a10_0x51173c;return typeof _0x500f66===_0x5c9f3b(0x1ec)&&_0x500f66!==null&&!Array[_0x5c9f3b(0x20d)](_0x500f66);}function readSourceFile(_0x106e4a){const _0x925f9e=a10_0x51173c;if(!_0x106e4a)throw CliErrors[_0x925f9e(0x223)](_0x925f9e(0x208));if(!existsSync(_0x106e4a))throw CliErrors[_0x925f9e(0x223)]('File\x20not\x20found:\x20'+_0x106e4a);if(!statSync(_0x106e4a)['isFile']())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x106e4a);const _0x4d4e1e=readFileSync(_0x106e4a,_0x925f9e(0x22b));return validateReactModuleSource(_0x4d4e1e),_0x4d4e1e;}function parseMetadata(_0x191c1b){const _0x536f15=a10_0x51173c;if(!_0x191c1b)return undefined;let _0x23d915;try{_0x23d915=JSON[_0x536f15(0x22c)](_0x191c1b);}catch{throw CliErrors[_0x536f15(0x223)]('Invalid\x20JSON\x20for\x20--metadata:\x20'+_0x191c1b);}if(!isPlainObject(_0x23d915))throw CliErrors[_0x536f15(0x223)](_0x536f15(0x1f6));const _0x484022={..._0x23d915};return delete _0x484022[_0x536f15(0x202)],_0x484022;}function a10_0x58c7(_0x3e350f,_0x5e172c){_0x3e350f=_0x3e350f-0x1e4;const _0x3efadf=a10_0x3efa();let _0x58c7db=_0x3efadf[_0x3e350f];return _0x58c7db;}function a10_0x3efa(){const _0x1469ce=['str','update','26KHlLgt','File\x20path\x20is\x20required.','detail','string','78620vKGpNV','1903527fnXXET','isArray','Saves\x20and\x20recompiles\x20Artifact\x20source.\x20Embedded\x20module\x20display\x20and\x20interaction\x20in\x20the\x20app\x20may\x20change\x20immediately.','33635TWZclr','Created\x20Artifact\x20','write','Preview:\x20create\x20react_module\x20Artifact','AGENT','appCode','2093jJDeuY','metadata','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','3518590FVCuYm','includes','data','artifactType','/client/artifact/create','dayjs','body','filter','createTime','lodash','exec','validation','react_module','Artifact\x20display\x20name','description','Show\x20one\x20Artifact\x20by\x20id','.\x20Unsupported:\x20','some','List\x20current-app\x20react_module\x20Artifacts','utf8','parse','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','react-dom','artifact','create','bool','source','length','POST','startsWith','test','trim','@ant-design/icons','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','object','build','24hlRWMM','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','Updated\x20Artifact\x20','Artifact\x20ID','file','num','982968XPjNzc','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','--metadata\x20must\x20be\x20a\x20JSON\x20object.','split','read','20834YlqTTu','map','content','lastIndex','/update','flag','number','antd','1032nquIVD','compiledContent','name','favorite'];a10_0x3efa=function(){return _0x1469ce;};return a10_0x3efa();}function getPackageName(_0x33d33a){const _0x27250c=a10_0x51173c;if(_0x33d33a[_0x27250c(0x1e7)]('@')){const [_0x1a6741,_0x28d691]=_0x33d33a[_0x27250c(0x1f7)]('/');return _0x1a6741&&_0x28d691?_0x1a6741+'/'+_0x28d691:_0x33d33a;}return _0x33d33a[_0x27250c(0x1f7)]('/')[0x0]||_0x33d33a;}function validateAllowedImports(_0x3f056d){const _0x465f53=a10_0x51173c,_0xe35662=new Set();for(const _0x93781c of IMPORT_SOURCE_PATTERNS){_0x93781c[_0x465f53(0x1fc)]=0x0;let _0xa421ee;while((_0xa421ee=_0x93781c[_0x465f53(0x222)](_0x3f056d))!==null){const _0x15190a=_0xa421ee[0x1]?.[_0x465f53(0x1e9)]();_0x15190a&&_0xe35662['add'](_0x15190a);}}const _0x4146be=[..._0xe35662][_0x465f53(0x1fa)](getPackageName)[_0x465f53(0x21f)](_0xfc05a=>!ALLOWED_REACT_MODULE_IMPORTS[_0x465f53(0x219)](_0xfc05a));if(_0x4146be[_0x465f53(0x1e5)]>0x0)throw CliErrors['validation']('react_module\x20imports\x20are\x20limited\x20to:\x20'+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0x465f53(0x228)+[...new Set(_0x4146be)]['join'](',\x20'));}export function validateReactModuleSource(_0x48de58){const _0x257d45=a10_0x51173c;if(!_0x48de58['trim']())throw CliErrors[_0x257d45(0x223)]('Artifact\x20source\x20file\x20is\x20blank.');if(PAGE_LEVEL_PATTERNS[_0x257d45(0x229)](_0x1e46e4=>_0x1e46e4[_0x257d45(0x1e8)](_0x48de58)))throw CliErrors[_0x257d45(0x223)](_0x257d45(0x1f5));validateAllowedImports(_0x48de58);}function buildArtifactInput(_0x5d91ad){const _0x970843=a10_0x51173c,_0x1e25c3=readSourceFile(_0x5d91ad[_0x970843(0x205)](_0x970843(0x1f2))),_0xd66ab1=_0x5d91ad[_0x970843(0x205)](_0x970843(0x203))['trim'](),_0x3013e2=parseMetadata(_0x5d91ad[_0x970843(0x205)](_0x970843(0x216)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0xd66ab1?{'name':_0xd66ab1}:{},'content':_0x1e25c3,..._0x3013e2?{'metadata':_0x3013e2}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0xa45e9){const _0x45bdbd=a10_0x51173c;return{'id':_0xa45e9['id'],'name':_0xa45e9[_0x45bdbd(0x203)],'artifactType':_0xa45e9[_0x45bdbd(0x21b)],'source':_0xa45e9[_0x45bdbd(0x1e4)],'favorite':_0xa45e9[_0x45bdbd(0x204)],'deleted':_0xa45e9['deleted'],'createTime':_0xa45e9[_0x45bdbd(0x220)],'updateTime':_0xa45e9['updateTime']};}function detailArtifact(_0x3f7081){const _0xf860ee=a10_0x51173c;return{'id':_0x3f7081['id'],'appCode':_0x3f7081[_0xf860ee(0x214)],'name':_0x3f7081[_0xf860ee(0x203)],'artifactType':_0x3f7081[_0xf860ee(0x21b)],'source':_0x3f7081[_0xf860ee(0x1e4)],'favorite':_0x3f7081['favorite'],'deleted':_0x3f7081['deleted'],'content':_0x3f7081[_0xf860ee(0x1fb)]??'','compiledContent':_0x3f7081[_0xf860ee(0x202)],'metadata':_0x3f7081[_0xf860ee(0x216)]??{},'createTime':_0x3f7081[_0xf860ee(0x220)],'updateTime':_0x3f7081['updateTime']};}function readFavoriteFlag(_0x2d047f){const _0x390048=a10_0x51173c,_0x413e14=_0x2d047f[_0x390048(0x1fe)]('favorite');return _0x413e14===undefined||_0x413e14===null||_0x413e14===''?undefined:_0x2d047f[_0x390048(0x231)](_0x390048(0x204));}const artifactList={'service':'artifact','command':'list','description':a10_0x51173c(0x22a),'risk':a10_0x51173c(0x1f8),'flags':[{'name':'source','type':a10_0x51173c(0x20a),'description':a10_0x51173c(0x217)},{'name':a10_0x51173c(0x204),'type':'boolean','description':'Optional\x20favorite-state\x20filter'},VERBOSE_FLAG],async 'execute'(_0x405e39){const _0x498266=a10_0x51173c,_0x8c820e=await listRuntimeArtifacts(_0x405e39['appCode'],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x405e39[_0x498266(0x205)]('source')?{'source':_0x405e39[_0x498266(0x205)](_0x498266(0x1e4))}:{},...readFavoriteFlag(_0x405e39)!==undefined?{'favorite':readFavoriteFlag(_0x405e39)}:{}});return{'ok':!![],'data':{'total':_0x8c820e[_0x498266(0x1e5)],'items':_0x405e39[_0x498266(0x231)]('verbose')?_0x8c820e:_0x8c820e[_0x498266(0x1fa)](summarizeArtifact)}};}},artifactDetail={'service':a10_0x51173c(0x22f),'command':a10_0x51173c(0x209),'description':a10_0x51173c(0x227),'risk':a10_0x51173c(0x1f8),'flags':[{...ID_FLAG,'description':a10_0x51173c(0x1f1)}],async 'execute'(_0x331c20){const _0x3f3d83=a10_0x51173c,_0x2f2b49=await getRuntimeArtifact(_0x331c20[_0x3f3d83(0x1f3)]('id'),_0x331c20[_0x3f3d83(0x214)]);return{'ok':!![],'data':detailArtifact(_0x2f2b49)};}},artifactCreate={'service':a10_0x51173c(0x22f),'command':a10_0x51173c(0x230),'description':a10_0x51173c(0x1eb),'risk':a10_0x51173c(0x211),'confirmationDescription':'Saves\x20and\x20compiles\x20new\x20Artifact\x20source.\x20On\x20success,\x20a\x20displayable\x20embedded\x20module\x20is\x20added\x20to\x20the\x20current\x20app.','flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x13cd29){const _0x5adcc0=a10_0x51173c,_0x31d00c=buildArtifactInput(_0x13cd29),_0x5dd733=await createRuntimeArtifact(_0x13cd29[_0x5adcc0(0x214)],_0x31d00c);return{'ok':!![],'data':detailArtifact(_0x5dd733),'message':_0x5adcc0(0x210)+_0x5dd733['id']+(_0x5dd733[_0x5adcc0(0x203)]?'\x20('+_0x5dd733[_0x5adcc0(0x203)]+')':'')};},async 'dryRun'(_0x32dcb3){const _0x1df375=a10_0x51173c,_0x29a9bb=buildArtifactInput(_0x32dcb3);return dryRun(_0x1df375(0x1e6),_0x1df375(0x21c))[_0x1df375(0x21e)]({'appCode':_0x32dcb3['appCode'],..._0x29a9bb})[_0x1df375(0x226)](_0x1df375(0x212))['build']();},'writeEventSubject'(_0x3a9190){const _0xa86a42=a10_0x51173c,_0x376e31=_0x3a9190['data']?.['id'];if(typeof _0x376e31!==_0xa86a42(0x20a)&&typeof _0x376e31!=='number')return undefined;return{'kind':_0xa86a42(0x22f),'id':String(_0x376e31),'action':_0xa86a42(0x230)};}},artifactUpdate={'service':a10_0x51173c(0x22f),'command':a10_0x51173c(0x206),'description':a10_0x51173c(0x1ef),'risk':a10_0x51173c(0x211),'confirmationDescription':a10_0x51173c(0x20e),'flags':[{...ID_FLAG,'description':a10_0x51173c(0x1f1)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x768e1e){const _0x47350b=a10_0x51173c,_0x2887b5=_0x768e1e[_0x47350b(0x1f3)]('id'),_0x410c04=buildArtifactInput(_0x768e1e),_0xe70c67=await updateRuntimeArtifact(_0x2887b5,_0x768e1e[_0x47350b(0x214)],_0x410c04);return{'ok':!![],'data':detailArtifact(_0xe70c67),'message':_0x47350b(0x1f0)+_0xe70c67['id']+(_0xe70c67['name']?'\x20('+_0xe70c67[_0x47350b(0x203)]+')':'')};},async 'dryRun'(_0x418e96){const _0xd53e6a=a10_0x51173c,_0x24685b=_0x418e96['num']('id'),_0x4fce99=buildArtifactInput(_0x418e96);return dryRun(_0xd53e6a(0x1e6),'/client/artifact/'+_0x24685b+_0xd53e6a(0x1fd))['body']({'appCode':_0x418e96[_0xd53e6a(0x214)],..._0x4fce99})['description']('Preview:\x20update\x20react_module\x20Artifact\x20'+_0x24685b)[_0xd53e6a(0x1ed)]();},'writeEventSubject'(_0x134117){const _0x306f68=a10_0x51173c,_0x5c625d=_0x134117[_0x306f68(0x21a)]?.['id'];if(typeof _0x5c625d!==_0x306f68(0x20a)&&typeof _0x5c625d!==_0x306f68(0x1ff))return undefined;return{'kind':_0x306f68(0x22f),'id':String(_0x5c625d),'action':_0x306f68(0x206)};}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
@@ -1 +1 @@
1
- const a11_0x47434d=a11_0x35bb;(function(_0x1aeceb,_0x22b670){const _0x1788df=a11_0x35bb,_0x5ded8e=_0x1aeceb();while(!![]){try{const _0x3eeff5=parseInt(_0x1788df(0x165))/0x1+-parseInt(_0x1788df(0x160))/0x2*(-parseInt(_0x1788df(0x16b))/0x3)+-parseInt(_0x1788df(0x190))/0x4*(-parseInt(_0x1788df(0x19f))/0x5)+parseInt(_0x1788df(0x1a1))/0x6*(-parseInt(_0x1788df(0x185))/0x7)+parseInt(_0x1788df(0x164))/0x8+-parseInt(_0x1788df(0x1a0))/0x9+-parseInt(_0x1788df(0x19e))/0xa;if(_0x3eeff5===_0x22b670)break;else _0x5ded8e['push'](_0x5ded8e['shift']());}catch(_0x3c5dcc){_0x5ded8e['push'](_0x5ded8e['shift']());}}}(a11_0x3cf0,0x394e4));import{existsSync,mkdirSync,readFileSync,unlinkSync,writeFileSync}from'node:fs';import{dirname}from'node:path';import{homedir}from'node:os';import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';import{getUserDomain}from'../../constant/domain.js';function a11_0x35bb(_0x22ea92,_0x5928c2){_0x22ea92=_0x22ea92-0x15c;const _0x3cf05a=a11_0x3cf0();let _0x35bb3a=_0x3cf05a[_0x22ea92];return _0x35bb3a;}import{CliErrors}from'../../errors.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function resolveAuthScopeFlags(_0x4d7d4d){const _0x451c38=a11_0x35bb;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x4d7d4d['bool'](_0x451c38(0x179)),'explicitProject':_0x4d7d4d[_0x451c38(0x19a)](_0x451c38(0x162)),'policy':_0x451c38(0x186)}));}const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/,DEVICE_CODE_TTL_MS=0x927c0,POLL_INTERVAL_MS=0xbb8,MAX_POLLS=0xc8,MAX_CONSECUTIVE_NETWORK_ERRORS=0x5;export function generateDeviceCode(){const _0x49b610=a11_0x35bb;return crypto[_0x49b610(0x166)]();}export function buildDeviceAuthUrl(_0x46dd1f,_0x32efab,_0x36f57e='lovrabet-cli'){const _0x45feb6=a11_0x35bb;return _0x46dd1f+'/device-auth?code='+encodeURIComponent(_0x32efab)+_0x45feb6(0x18d)+encodeURIComponent(_0x36f57e);}export function getDeviceCodePath(){const _0x88fde3=a11_0x35bb;return homedir()+'/'+PRODUCT_CONFIG[_0x88fde3(0x15c)]+'/.device-auth';}export function readStoredDeviceCode(){const _0x590074=a11_0x35bb,_0x3383bb=getDeviceCodePath();if(!existsSync(_0x3383bb))return null;try{const _0x3243a6=readFileSync(_0x3383bb,{'encoding':_0x590074(0x192)}),_0x3da0f7=JSON['parse'](_0x3243a6);if(_0x3da0f7&&typeof _0x3da0f7[_0x590074(0x16d)]===_0x590074(0x193)&&typeof _0x3da0f7['createdAt']==='string'&&(_0x3da0f7[_0x590074(0x197)]===_0x590074(0x179)||_0x3da0f7['scope']===_0x590074(0x162)))return _0x3da0f7;}catch{}return null;}export function writeStoredDeviceCode(_0x442b21,_0x4c9f6c){const _0x2c3707=a11_0x35bb,_0x208d03=getDeviceCodePath(),_0x4d329a=dirname(_0x208d03);!existsSync(_0x4d329a)&&mkdirSync(_0x4d329a,{'recursive':!![]});const _0x4b05d2={'code':_0x442b21,'createdAt':new Date()[_0x2c3707(0x19c)](),'scope':_0x4c9f6c};writeFileSync(_0x208d03,JSON[_0x2c3707(0x191)](_0x4b05d2),{'encoding':_0x2c3707(0x192),'mode':0x180});}export function deleteStoredDeviceCode(){const _0x9411d3=getDeviceCodePath();try{unlinkSync(_0x9411d3);}catch{}}export function isStoredDeviceCodeExpired(_0x4a4f7a){const _0x37a5a7=a11_0x35bb;return Date['now']()-new Date(_0x4a4f7a[_0x37a5a7(0x15d)])['getTime']()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x5279b9,_0xbdfed7){const _0x48d651=a11_0x35bb,_0xf724bb=_0x5279b9+_0x48d651(0x17c),_0x9eb3d2=new AbortController(),_0x4eb5ed=setTimeout(()=>_0x9eb3d2[_0x48d651(0x188)](),0x2710),_0x4ed9f3=await fetch(_0xf724bb,{'method':'POST','headers':{'Content-Type':_0x48d651(0x176)},'body':JSON[_0x48d651(0x191)]({'code':_0xbdfed7}),'signal':_0x9eb3d2['signal']});clearTimeout(_0x4eb5ed);if(!_0x4ed9f3['ok'])throw CliErrors[_0x48d651(0x163)](_0x48d651(0x18e)+_0x4ed9f3[_0x48d651(0x178)]);const _0x5e7636=await _0x4ed9f3[_0x48d651(0x17d)](),_0x18a871=_0x5e7636['data']&&typeof _0x5e7636['data']===_0x48d651(0x182)?_0x5e7636[_0x48d651(0x175)]:_0x5e7636;if(!_0x18a871||typeof _0x18a871[_0x48d651(0x178)]!==_0x48d651(0x193))throw CliErrors[_0x48d651(0x1a2)]('Invalid\x20device\x20auth\x20response');return{'status':_0x18a871[_0x48d651(0x178)],'access_key':typeof _0x18a871[_0x48d651(0x15f)]===_0x48d651(0x193)?_0x18a871[_0x48d651(0x15f)]:undefined};}export async function pollDeviceToken(_0xedf2ad,_0x465ea1,_0x4c0453){const _0x40a622=a11_0x35bb;let _0x369a81=0x0;for(let _0x436c65=0x0;_0x436c65<MAX_POLLS;_0x436c65++){if(_0x4c0453['aborted'])throw CliErrors[_0x40a622(0x17f)](_0x40a622(0x187));let _0x3ad757;try{_0x3ad757=await fetchDeviceToken(_0xedf2ad,_0x465ea1);}catch(_0x1270a9){if(_0x1270a9 instanceof Error&&_0x1270a9[_0x40a622(0x194)]===_0x40a622(0x174))throw CliErrors['cancelled']('Device\x20authorization\x20cancelled.');_0x369a81++;if(_0x369a81>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0x40a622(0x163)](_0x40a622(0x1a3));writeCliSideChannelLine(_0x40a622(0x196)+_0x369a81+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+_0x40a622(0x180)),await sleep(POLL_INTERVAL_MS);continue;}_0x369a81=0x0;if(_0x3ad757[_0x40a622(0x178)]===_0x40a622(0x183)){if(!_0x3ad757[_0x40a622(0x15f)])throw CliErrors[_0x40a622(0x1a2)](_0x40a622(0x177));return _0x3ad757[_0x40a622(0x15f)];}if(_0x3ad757[_0x40a622(0x178)]===_0x40a622(0x18a)){deleteStoredDeviceCode();throw CliErrors[_0x40a622(0x16e)](_0x40a622(0x199));}const _0x140d91=(_0x436c65+0x1)*POLL_INTERVAL_MS,_0x49aaf7=DEVICE_CODE_TTL_MS-_0x140d91,_0x4424b3=Math['floor'](_0x49aaf7/0xea60),_0x50ee78=Math[_0x40a622(0x17b)](_0x49aaf7%0xea60/0x3e8);process[_0x40a622(0x16c)][_0x40a622(0x16a)]('\x0dWaiting\x20for\x20authorization...\x20'+_0x4424b3+':'+String(_0x50ee78)[_0x40a622(0x16f)](0x2,'0')+_0x40a622(0x181)),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors['validation'](_0x40a622(0x17a));}function sleep(_0x5da3a0){return new Promise(_0x131287=>setTimeout(_0x131287,_0x5da3a0));}function a11_0x3cf0(){const _0x141be0=['application/json','Invalid\x20access_key\x20returned\x20by\x20server.','status','global','Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','floor','/api/device-auth/token','json','lovrabet-cli','cancelled','),\x20retrying...','\x20remaining','object','success','Device\x20authorization\x20successful.','21TQAgWe','global-default','Device\x20authorization\x20cancelled.','abort','Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','expired','boolean','Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:','&source=','Device\x20auth\x20API\x20returned\x20HTTP\x20','The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.','16tlOmyR','stringify','utf8','string','name','Starts\x20the\x20device-code\x20login\x20flow.\x20On\x20success,\x20the\x20AccessKey\x20is\x20saved\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20device\x20code\x20or\x20secret.','Device\x20auth\x20API\x20error\x20(','scope','once','Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','bool','auth','toISOString','signal','2155570jAkgJF','368345ZoYBMn','1690686AjNOSS','849474fhoFZK','apiError','Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.','After\x20authorizing,\x20re-run:\x20','Write\x20to\x20project\x20config','homeDirName','createdAt','trim','access_key','28894xmbbPg','\x20config.','project','networkError','3619280MdJffw','286892NOdnJB','randomUUID','nonInteractive','App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','accessKey','write','6caBEBV','stderr','code','validation','padStart','Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','url-only','SIGINT','removeListener','AbortError','data'];a11_0x3cf0=function(){return _0x141be0;};return a11_0x3cf0();}export const authDeviceDefinition={'service':a11_0x47434d(0x19b),'command':'device','description':a11_0x47434d(0x189),'risk':'write','confirmationDescription':a11_0x47434d(0x195),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a11_0x47434d(0x179),'type':a11_0x47434d(0x18b),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a11_0x47434d(0x162),'type':a11_0x47434d(0x18b),'description':a11_0x47434d(0x1a5),'default':![]},{'name':'source','type':a11_0x47434d(0x193),'description':a11_0x47434d(0x168),'default':a11_0x47434d(0x17e)},{'name':a11_0x47434d(0x171),'type':'boolean','description':a11_0x47434d(0x170),'default':![]}],async 'execute'(_0x132508){const _0x270eb9=a11_0x47434d,_0x302111=resolveAuthScopeFlags(_0x132508),_0x16ed56=_0x302111[_0x270eb9(0x179)]?_0x270eb9(0x179):_0x270eb9(0x162),_0x4c47d2=readScopedConfig(_0x302111);if(_0x4c47d2[_0x270eb9(0x169)])return{'ok':!![],'message':'Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.'};const _0x244cec=(_0x132508['str']('source')||_0x270eb9(0x17e))[_0x270eb9(0x15e)](),_0x31a80f=getUserDomain(),_0x127d03=readStoredDeviceCode(),_0xd8bd1a=_0x127d03&&!isStoredDeviceCodeExpired(_0x127d03)?_0x127d03[_0x270eb9(0x16d)]:((()=>{const _0x268f2e=generateDeviceCode();return writeStoredDeviceCode(_0x268f2e,_0x16ed56),_0x268f2e;})()),_0x40d5ed=buildDeviceAuthUrl(_0x31a80f,_0xd8bd1a,_0x244cec);if(_0x132508[_0x270eb9(0x19a)](_0x270eb9(0x171)))return console['log'](_0x40d5ed),{'ok':!![]};writeCliSideChannelLine(_0x270eb9(0x18c)),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x40d5ed),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x270eb9(0x18f));if(_0x132508[_0x270eb9(0x167)])return writeCliSideChannelLine(_0x270eb9(0x1a4)+CLI_BIN_NAME+'\x20auth\x20device'),{'ok':!![],'message':'Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.'};writeCliSideChannelLine('Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...');const _0x162176=new AbortController(),_0x2b207f=()=>{const _0x2638b6=_0x270eb9;_0x162176[_0x2638b6(0x188)](),process['removeListener'](_0x2638b6(0x172),_0x2b207f);};process[_0x270eb9(0x198)](_0x270eb9(0x172),_0x2b207f);let _0x539b47;try{_0x539b47=await pollDeviceToken(_0x31a80f,_0xd8bd1a,_0x162176[_0x270eb9(0x19d)]);}finally{process[_0x270eb9(0x173)]('SIGINT',_0x2b207f);}if(!ACCESS_KEY_PATTERN['test'](_0x539b47))throw CliErrors[_0x270eb9(0x1a2)]('Invalid\x20access_key\x20returned\x20by\x20server.');const _0x3191a7=readScopedConfig(_0x302111);return _0x3191a7[_0x270eb9(0x169)]=_0x539b47,writeScopedConfig(_0x3191a7,_0x302111),deleteStoredDeviceCode(),process[_0x270eb9(0x16c)][_0x270eb9(0x16a)]('\x0a'),writeCliSideChannelLine('AccessKey\x20saved\x20to\x20'+_0x16ed56+_0x270eb9(0x161)),writeCliSideChannelLine('Verify:\x20'+CLI_BIN_NAME+'\x20auth\x20status'),{'ok':!![],'message':_0x270eb9(0x184)};}};
1
+ const a11_0x1389ff=a11_0x412e;(function(_0x5197d7,_0x4dd02f){const _0xf57f31=a11_0x412e,_0x23c55d=_0x5197d7();while(!![]){try{const _0x2fce29=parseInt(_0xf57f31(0x1be))/0x1*(parseInt(_0xf57f31(0x1ac))/0x2)+parseInt(_0xf57f31(0x1e4))/0x3*(-parseInt(_0xf57f31(0x1ed))/0x4)+parseInt(_0xf57f31(0x1e1))/0x5+-parseInt(_0xf57f31(0x1c7))/0x6+-parseInt(_0xf57f31(0x1de))/0x7*(parseInt(_0xf57f31(0x1d0))/0x8)+parseInt(_0xf57f31(0x1ba))/0x9*(-parseInt(_0xf57f31(0x1c5))/0xa)+-parseInt(_0xf57f31(0x1e0))/0xb*(-parseInt(_0xf57f31(0x1cc))/0xc);if(_0x2fce29===_0x4dd02f)break;else _0x23c55d['push'](_0x23c55d['shift']());}catch(_0x3af9ab){_0x23c55d['push'](_0x23c55d['shift']());}}}(a11_0x5656,0x352d1));import{existsSync,mkdirSync,readFileSync,unlinkSync,writeFileSync}from'node:fs';import{dirname}from'node:path';import{homedir}from'node:os';import{readScopedConfig,writeScopedConfig}from'../../context.js';function a11_0x412e(_0x2ac51c,_0x1bf6c3){_0x2ac51c=_0x2ac51c-0x1a3;const _0x56568d=a11_0x5656();let _0x412e5a=_0x56568d[_0x2ac51c];return _0x412e5a;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';import{getUserDomain}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';function a11_0x5656(){const _0x325ef9=['Starts\x20the\x20device-code\x20login\x20flow.\x20On\x20success,\x20the\x20AccessKey\x20is\x20saved\x20to\x20the\x20selected\x20Lovrabet\x20config.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20device\x20code\x20or\x20secret.','parse','status','global','success','4450uDxcob','str','apiError','test','/device-auth?code=','aborted','auth','Device\x20auth\x20API\x20returned\x20HTTP\x20','AccessKey\x20saved\x20to\x20','\x20auth\x20status','Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','json','code','Verify:\x20','616014DEWgEn','nonInteractive','Invalid\x20access_key\x20returned\x20by\x20server.','AbortError','1qHhqyk','Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...','bool','Device\x20authorization\x20cancelled.','SIGINT','Device\x20auth\x20API\x20error\x20(','name','10wmaPPI','randomUUID','125952tZXjiP','\x0dWaiting\x20for\x20authorization...\x20','removeListener','/.device-auth','\x20remaining','3692820bTJzlZ','Invalid\x20device\x20auth\x20response','),\x20retrying...','validation','16GhcuBp','accessKey','Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','getTime','Write\x20to\x20project\x20config','Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:','trim','The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.','Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','data','Write\x20to\x20global\x20config\x20(default)','networkError','createdAt','lovrabet-cli','1147797DDQSkG','string','22vtMtQU','2171085yoeLFq','padStart','\x20auth\x20device','4449GItUok','stringify','stderr','scope','now','Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','device','project','boolean','1124JhnNhN','signal','Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.','App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','toISOString','write','floor','\x20config.','access_key','cancelled','url-only','source','application/json','Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.','object','abort'];a11_0x5656=function(){return _0x325ef9;};return a11_0x5656();}import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function resolveAuthScopeFlags(_0x201e13){const _0x2dd6f0=a11_0x412e;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x201e13[_0x2dd6f0(0x1c0)](_0x2dd6f0(0x1aa)),'explicitProject':_0x201e13[_0x2dd6f0(0x1c0)]('project'),'policy':'global-default'}));}const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/,DEVICE_CODE_TTL_MS=0x927c0,POLL_INTERVAL_MS=0xbb8,MAX_POLLS=0xc8,MAX_CONSECUTIVE_NETWORK_ERRORS=0x5;export function generateDeviceCode(){const _0x72ecab=a11_0x412e;return crypto[_0x72ecab(0x1c6)]();}export function buildDeviceAuthUrl(_0x56b13c,_0x4d6d52,_0x3c99b4=a11_0x1389ff(0x1dd)){const _0x447700=a11_0x1389ff;return _0x56b13c+_0x447700(0x1b0)+encodeURIComponent(_0x4d6d52)+'&source='+encodeURIComponent(_0x3c99b4);}export function getDeviceCodePath(){const _0x4a901e=a11_0x1389ff;return homedir()+'/'+PRODUCT_CONFIG['homeDirName']+_0x4a901e(0x1ca);}export function readStoredDeviceCode(){const _0x32707a=a11_0x1389ff,_0x206f19=getDeviceCodePath();if(!existsSync(_0x206f19))return null;try{const _0x38cada=readFileSync(_0x206f19,{'encoding':'utf8'}),_0x319449=JSON[_0x32707a(0x1a8)](_0x38cada);if(_0x319449&&typeof _0x319449[_0x32707a(0x1b8)]===_0x32707a(0x1df)&&typeof _0x319449[_0x32707a(0x1dc)]===_0x32707a(0x1df)&&(_0x319449[_0x32707a(0x1e7)]===_0x32707a(0x1aa)||_0x319449[_0x32707a(0x1e7)]===_0x32707a(0x1eb)))return _0x319449;}catch{}return null;}export function writeStoredDeviceCode(_0x139ad6,_0x191318){const _0x28568f=a11_0x1389ff,_0x225dce=getDeviceCodePath(),_0x353198=dirname(_0x225dce);!existsSync(_0x353198)&&mkdirSync(_0x353198,{'recursive':!![]});const _0x3b1c7c={'code':_0x139ad6,'createdAt':new Date()[_0x28568f(0x1f1)](),'scope':_0x191318};writeFileSync(_0x225dce,JSON[_0x28568f(0x1e5)](_0x3b1c7c),{'encoding':'utf8','mode':0x180});}export function deleteStoredDeviceCode(){const _0x37a590=getDeviceCodePath();try{unlinkSync(_0x37a590);}catch{}}export function isStoredDeviceCodeExpired(_0x3fbcef){const _0x20a363=a11_0x1389ff;return Date[_0x20a363(0x1e8)]()-new Date(_0x3fbcef['createdAt'])[_0x20a363(0x1d3)]()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x238fec,_0x255e26){const _0x5075ae=a11_0x1389ff,_0x59802d=_0x238fec+'/api/device-auth/token',_0x1af62a=new AbortController(),_0x350508=setTimeout(()=>_0x1af62a[_0x5075ae(0x1a6)](),0x2710),_0x23345b=await fetch(_0x59802d,{'method':'POST','headers':{'Content-Type':_0x5075ae(0x1a3)},'body':JSON[_0x5075ae(0x1e5)]({'code':_0x255e26}),'signal':_0x1af62a['signal']});clearTimeout(_0x350508);if(!_0x23345b['ok'])throw CliErrors['networkError'](_0x5075ae(0x1b3)+_0x23345b[_0x5075ae(0x1a9)]);const _0x32d0c6=await _0x23345b[_0x5075ae(0x1b7)](),_0x1fe190=_0x32d0c6[_0x5075ae(0x1d9)]&&typeof _0x32d0c6[_0x5075ae(0x1d9)]===_0x5075ae(0x1a5)?_0x32d0c6['data']:_0x32d0c6;if(!_0x1fe190||typeof _0x1fe190[_0x5075ae(0x1a9)]!==_0x5075ae(0x1df))throw CliErrors[_0x5075ae(0x1ae)](_0x5075ae(0x1cd));return{'status':_0x1fe190[_0x5075ae(0x1a9)],'access_key':typeof _0x1fe190[_0x5075ae(0x1f5)]===_0x5075ae(0x1df)?_0x1fe190['access_key']:undefined};}export async function pollDeviceToken(_0x24f58b,_0x165ad0,_0x3f1e0d){const _0x47493c=a11_0x1389ff;let _0x2b2eff=0x0;for(let _0x63630e=0x0;_0x63630e<MAX_POLLS;_0x63630e++){if(_0x3f1e0d[_0x47493c(0x1b1)])throw CliErrors[_0x47493c(0x1f6)](_0x47493c(0x1c1));let _0x2f5ac5;try{_0x2f5ac5=await fetchDeviceToken(_0x24f58b,_0x165ad0);}catch(_0x1fdf8c){if(_0x1fdf8c instanceof Error&&_0x1fdf8c[_0x47493c(0x1c4)]===_0x47493c(0x1bd))throw CliErrors['cancelled'](_0x47493c(0x1c1));_0x2b2eff++;if(_0x2b2eff>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0x47493c(0x1db)]('Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.');writeCliSideChannelLine(_0x47493c(0x1c3)+_0x2b2eff+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+_0x47493c(0x1ce)),await sleep(POLL_INTERVAL_MS);continue;}_0x2b2eff=0x0;if(_0x2f5ac5[_0x47493c(0x1a9)]===_0x47493c(0x1ab)){if(!_0x2f5ac5[_0x47493c(0x1f5)])throw CliErrors[_0x47493c(0x1ae)]('Invalid\x20access_key\x20returned\x20by\x20server.');return _0x2f5ac5[_0x47493c(0x1f5)];}if(_0x2f5ac5['status']==='expired'){deleteStoredDeviceCode();throw CliErrors[_0x47493c(0x1cf)](_0x47493c(0x1e9));}const _0x52b59d=(_0x63630e+0x1)*POLL_INTERVAL_MS,_0x1a12c1=DEVICE_CODE_TTL_MS-_0x52b59d,_0x3d61a3=Math[_0x47493c(0x1f3)](_0x1a12c1/0xea60),_0x3bf35e=Math[_0x47493c(0x1f3)](_0x1a12c1%0xea60/0x3e8);process[_0x47493c(0x1e6)]['write'](_0x47493c(0x1c8)+_0x3d61a3+':'+String(_0x3bf35e)[_0x47493c(0x1e2)](0x2,'0')+_0x47493c(0x1cb)),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors[_0x47493c(0x1cf)](_0x47493c(0x1d8));}function sleep(_0x11c73d){return new Promise(_0x3c301c=>setTimeout(_0x3c301c,_0x11c73d));}export const authDeviceDefinition={'service':a11_0x1389ff(0x1b2),'command':a11_0x1389ff(0x1ea),'description':a11_0x1389ff(0x1b6),'risk':a11_0x1389ff(0x1f2),'confirmationDescription':a11_0x1389ff(0x1a7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a11_0x1389ff(0x1aa),'type':a11_0x1389ff(0x1ec),'description':a11_0x1389ff(0x1da),'default':!![]},{'name':a11_0x1389ff(0x1eb),'type':'boolean','description':a11_0x1389ff(0x1d4),'default':![]},{'name':a11_0x1389ff(0x1f8),'type':a11_0x1389ff(0x1df),'description':a11_0x1389ff(0x1f0),'default':a11_0x1389ff(0x1dd)},{'name':a11_0x1389ff(0x1f7),'type':a11_0x1389ff(0x1ec),'description':a11_0x1389ff(0x1d2),'default':![]}],async 'execute'(_0x226f45){const _0x234c4d=a11_0x1389ff,_0x2d9384=resolveAuthScopeFlags(_0x226f45),_0x567b68=_0x2d9384[_0x234c4d(0x1aa)]?_0x234c4d(0x1aa):_0x234c4d(0x1eb),_0x2cbd96=readScopedConfig(_0x2d9384);if(_0x2cbd96['accessKey'])return{'ok':!![],'message':_0x234c4d(0x1ef)};const _0x8879c5=(_0x226f45[_0x234c4d(0x1ad)](_0x234c4d(0x1f8))||_0x234c4d(0x1dd))[_0x234c4d(0x1d6)](),_0xd86163=getUserDomain(),_0x12d638=readStoredDeviceCode(),_0x1e740c=_0x12d638&&!isStoredDeviceCodeExpired(_0x12d638)?_0x12d638[_0x234c4d(0x1b8)]:((()=>{const _0x46837d=generateDeviceCode();return writeStoredDeviceCode(_0x46837d,_0x567b68),_0x46837d;})()),_0x16e7ed=buildDeviceAuthUrl(_0xd86163,_0x1e740c,_0x8879c5);if(_0x226f45['bool'](_0x234c4d(0x1f7)))return console['log'](_0x16e7ed),{'ok':!![]};writeCliSideChannelLine(_0x234c4d(0x1d5)),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x16e7ed),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x234c4d(0x1d7));if(_0x226f45[_0x234c4d(0x1bb)])return writeCliSideChannelLine('After\x20authorizing,\x20re-run:\x20'+CLI_BIN_NAME+_0x234c4d(0x1e3)),{'ok':!![],'message':_0x234c4d(0x1a4)};writeCliSideChannelLine(_0x234c4d(0x1bf));const _0x4bd40b=new AbortController(),_0xab5388=()=>{const _0x3ca655=_0x234c4d;_0x4bd40b[_0x3ca655(0x1a6)](),process[_0x3ca655(0x1c9)]('SIGINT',_0xab5388);};process['once'](_0x234c4d(0x1c2),_0xab5388);let _0x3054a2;try{_0x3054a2=await pollDeviceToken(_0xd86163,_0x1e740c,_0x4bd40b[_0x234c4d(0x1ee)]);}finally{process[_0x234c4d(0x1c9)](_0x234c4d(0x1c2),_0xab5388);}if(!ACCESS_KEY_PATTERN[_0x234c4d(0x1af)](_0x3054a2))throw CliErrors[_0x234c4d(0x1ae)](_0x234c4d(0x1bc));const _0x1138bd=readScopedConfig(_0x2d9384);return _0x1138bd[_0x234c4d(0x1d1)]=_0x3054a2,writeScopedConfig(_0x1138bd,_0x2d9384),deleteStoredDeviceCode(),process[_0x234c4d(0x1e6)][_0x234c4d(0x1f2)]('\x0a'),writeCliSideChannelLine(_0x234c4d(0x1b4)+_0x567b68+_0x234c4d(0x1f4)),writeCliSideChannelLine(_0x234c4d(0x1b9)+CLI_BIN_NAME+_0x234c4d(0x1b5)),{'ok':!![],'message':'Device\x20authorization\x20successful.'};}};