@lovrabet/lovrabet-cli 2.3.10-beta.3 → 2.3.10
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.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/approval/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/runtime-user-id.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
(function(
|
|
2
|
+
const a0_0x4892f7=a0_0x46b3;(function(_0x4824fe,_0x211871){const _0x7e5021=a0_0x46b3,_0x37306a=_0x4824fe();while(!![]){try{const _0x512bbe=parseInt(_0x7e5021(0x12f))/0x1*(parseInt(_0x7e5021(0x133))/0x2)+-parseInt(_0x7e5021(0x11f))/0x3*(parseInt(_0x7e5021(0x12b))/0x4)+-parseInt(_0x7e5021(0x117))/0x5*(parseInt(_0x7e5021(0x10f))/0x6)+parseInt(_0x7e5021(0x11c))/0x7*(parseInt(_0x7e5021(0x111))/0x8)+parseInt(_0x7e5021(0x11e))/0x9*(parseInt(_0x7e5021(0x135))/0xa)+parseInt(_0x7e5021(0x12c))/0xb*(-parseInt(_0x7e5021(0x127))/0xc)+-parseInt(_0x7e5021(0x113))/0xd*(-parseInt(_0x7e5021(0x126))/0xe);if(_0x512bbe===_0x211871)break;else _0x37306a['push'](_0x37306a['shift']());}catch(_0x4d4edc){_0x37306a['push'](_0x37306a['shift']());}}}(a0_0x48d6,0x3ff1a));import{jsx as a0_0x466198}from'react/jsx-runtime';import a0_0x5e2495 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';function a0_0x48d6(){const _0x1e65f8=['Unexpected\x20error:','1038296EhMkBt','1152aDVtfz','log','error','original','103684EHtTQV','25036xgMfoB','hint','handler','218670OtBLbS','assign','exit','definition','2uvrHSR','flatMap','50UUIWxw','\x0aCancelled.\x0a','Error:\x20','corrected','[preparse]\x20','name','flags','help','exitCode','write',':\x20--','18bCVeen','message','8lyEOXu','code','130lBhJtV','catch','slice','ERR_USE_AFTER_CLOSE','402145APOsmk','args','ERR_STREAM_DESTROYED','validation','config','724052sNgcRq','cancelled','37521oAmoMZ','42qliTUW','./framework/preparse.js','input','stderr','defaultCommand','doctor'];a0_0x48d6=function(){return _0x1e65f8;};return a0_0x48d6();}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_0x46b3(_0x5c2c09,_0x549eb1){_0x5c2c09=_0x5c2c09-0x107;const _0x48d619=a0_0x48d6();let _0x46b37a=_0x48d619[_0x5c2c09];return _0x46b37a;}const helpText=generateFullHelp(),cli=a0_0x5e2495(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()[a0_0x4892f7(0x114)](handleError);async function main(){try{await run();}catch(_0x3a2d4c){handleError(_0x3a2d4c);}}async function run(){const _0x331f44=a0_0x4892f7;let _0x5bebef=cli[_0x331f44(0x121)][0x0],_0x14071c=cli[_0x331f44(0x121)][0x1];const _0x1e1d3f=cli[_0x331f44(0x10a)];try{const {correctFlags:_0x156497}=await import(_0x331f44(0x120)),_0x56e583=getAllDefinitions()[_0x331f44(0x134)](_0x19a91d=>_0x19a91d['flags']??[]),{flags:_0x9e302b,corrections:_0x10f6b6}=_0x156497(_0x1e1d3f,_0x56e583);if(_0x10f6b6['length']>0x0){for(const _0xce9843 of _0x10f6b6){process[_0x331f44(0x122)][_0x331f44(0x10d)](_0x331f44(0x108)+_0xce9843[_0x331f44(0x12e)]+_0x331f44(0x10e)+_0xce9843[_0x331f44(0x12a)]+'\x20->\x20--'+_0xce9843[_0x331f44(0x107)]+'\x0a');}Object[_0x331f44(0x130)](_0x1e1d3f,_0x9e302b);}}catch{}if(!_0x5bebef){const {waitUntilExit:_0x366edb}=render(a0_0x466198(Help,{}));await _0x366edb();return;}const _0xc2f99=resolveRemovedCommand(_0x5bebef,_0x14071c);if(_0xc2f99)throw CliErrors[_0x331f44(0x11a)](_0xc2f99['message'],_0xc2f99[_0x331f44(0x12d)]);if(!isKnownService(_0x5bebef)){const _0x321136=resolveDynamicServiceCommand(cli[_0x331f44(0x121)],_0x1e1d3f);if(_0x321136){if(_0x1e1d3f['help']){console['log'](generateCommandHelp(_0x321136[_0x331f44(0x132)]));return;}Object[_0x331f44(0x130)](_0x1e1d3f,_0x321136[_0x331f44(0x10a)]);const _0x41b069=buildConfigFromFlags(_0x1e1d3f);await initGlobalEnvironment(_0x41b069);const _0x11c679=createPipelineEnv(_0x41b069,_0x1e1d3f);_0x11c679[_0x331f44(0x118)]=_0x321136[_0x331f44(0x118)],await runCommand(_0x321136[_0x331f44(0x132)],_0x11c679);return;}if(_0x1e1d3f[_0x331f44(0x10b)]){const _0x11bcd9=generateDynamicServiceHelp(_0x5bebef);if(_0x11bcd9){console[_0x331f44(0x128)](_0x11bcd9);return;}}const {waitUntilExit:_0x229da4}=render(a0_0x466198(Help,{}));await _0x229da4();return;}const _0x27f7de=getServiceEntry(_0x5bebef);if(!_0x14071c){if(_0x1e1d3f[_0x331f44(0x10b)]){console[_0x331f44(0x128)](generateServiceHelp(_0x5bebef));return;}if(_0x27f7de[_0x331f44(0x123)])_0x14071c=_0x27f7de[_0x331f44(0x123)];else{console[_0x331f44(0x128)](generateServiceHelp(_0x5bebef));return;}}const _0x306f2b=findDefinition(_0x5bebef,_0x14071c);!_0x306f2b&&(console[_0x331f44(0x128)](generateServiceHelp(_0x5bebef)),handleError(CliErrors['unknownCommand'](_0x5bebef+'\x20'+_0x14071c)));if(_0x1e1d3f[_0x331f44(0x10b)]){console[_0x331f44(0x128)](generateCommandHelp(_0x306f2b));return;}const _0x3ec838=buildConfigFromFlags(_0x1e1d3f);_0x5bebef!==_0x331f44(0x11b)&&_0x5bebef!==_0x331f44(0x124)&&await initGlobalEnvironment(_0x3ec838);const _0x5efb7d=createPipelineEnv(_0x3ec838,_0x1e1d3f);_0x5efb7d[_0x331f44(0x118)]=cli[_0x331f44(0x121)][_0x331f44(0x115)](0x2),await runCommand(_0x306f2b,_0x5efb7d);}function handleError(_0x4a6163){const _0x2db459=a0_0x4892f7;if(_0x4a6163 instanceof CliError){_0x4a6163[_0x2db459(0x112)]===_0x2db459(0x11d)&&(process[_0x2db459(0x122)]['write'](_0x2db459(0x136)),process['exit'](0x0));console[_0x2db459(0x129)](_0x2db459(0x137)+_0x4a6163[_0x2db459(0x110)]);if(_0x4a6163[_0x2db459(0x12d)])console[_0x2db459(0x129)]('Hint:\x20'+_0x4a6163[_0x2db459(0x12d)]);process['exit'](_0x4a6163[_0x2db459(0x10c)]);}isUserCancellation(_0x4a6163)&&(process[_0x2db459(0x122)]['write']('\x0aCancelled.\x0a'),process['exit'](0x0)),console[_0x2db459(0x129)](_0x2db459(0x125),_0x4a6163),process[_0x2db459(0x131)](0x1);}function isUserCancellation(_0x3d0346){const _0x3e40c1=a0_0x4892f7;if(!(_0x3d0346 instanceof Error))return![];if(_0x3d0346[_0x3e40c1(0x109)]==='ExitPromptError')return!![];if(_0x3d0346[_0x3e40c1(0x112)]===_0x3e40c1(0x116))return!![];if(_0x3d0346['code']===_0x3e40c1(0x119))return!![];return![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a1_0x4237a7=a1_0x5b9a;(function(_0x5c6a22,_0x1cd276){const _0x231f76=a1_0x5b9a,_0x27c37e=_0x5c6a22();while(!![]){try{const _0x190e24=parseInt(_0x231f76(0x217))/0x1+parseInt(_0x231f76(0x23b))/0x2*(-parseInt(_0x231f76(0x1cd))/0x3)+parseInt(_0x231f76(0x244))/0x4*(parseInt(_0x231f76(0x204))/0x5)+parseInt(_0x231f76(0x22a))/0x6*(parseInt(_0x231f76(0x22f))/0x7)+-parseInt(_0x231f76(0x228))/0x8+-parseInt(_0x231f76(0x236))/0x9+parseInt(_0x231f76(0x1ca))/0xa;if(_0x190e24===_0x1cd276)break;else _0x27c37e['push'](_0x27c37e['shift']());}catch(_0x103e30){_0x27c37e['push'](_0x27c37e['shift']());}}}(a1_0x5566,0xa80a6));function a1_0x5b9a(_0x4179dd,_0x280b0b){_0x4179dd=_0x4179dd-0x1c3;const _0x5566c7=a1_0x5566();let _0x5b9a91=_0x5566c7[_0x4179dd];return _0x5b9a91;}import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x4237a7(0x1ef),'type':a1_0x4237a7(0x1d0),'description':'Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset'},KEYWORD_FLAG={'name':a1_0x4237a7(0x23a),'type':'string','description':a1_0x4237a7(0x220)},DOC_CODE_FLAG={'name':a1_0x4237a7(0x224),'type':'string','required':!![],'description':a1_0x4237a7(0x232)},DOCS=[{'code':a1_0x4237a7(0x225),'category':a1_0x4237a7(0x22d),'title':a1_0x4237a7(0x20e),'method':a1_0x4237a7(0x1d4),'path':a1_0x4237a7(0x1e4),'summary':'List\x20datasets\x20with\x20pagination','whenToUse':a1_0x4237a7(0x1d5),'pathParams':[],'queryParams':[],'bodySchema':a1_0x4237a7(0x1c5),'responseHighlights':[a1_0x4237a7(0x1f3),'paging.totalCount\x20gives\x20total\x20rows'],'examples':['lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress'],'notes':[a1_0x4237a7(0x22b)],'markdown':['##\x20List\x20datasets','',a1_0x4237a7(0x1ce)][a1_0x4237a7(0x1e0)]('\x0a')},{'code':a1_0x4237a7(0x1fd),'category':a1_0x4237a7(0x22d),'title':a1_0x4237a7(0x1f2),'method':a1_0x4237a7(0x242),'path':a1_0x4237a7(0x21d),'summary':a1_0x4237a7(0x216),'whenToUse':a1_0x4237a7(0x213),'pathParams':[],'queryParams':[{'name':'code','description':a1_0x4237a7(0x202)}],'bodySchema':a1_0x4237a7(0x23e),'responseHighlights':['fields/properties\x20describe\x20data\x20shape',a1_0x4237a7(0x1d6),a1_0x4237a7(0x1eb)],'examples':['lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>'],'notes':[a1_0x4237a7(0x1dd)],'markdown':['##\x20Dataset\x20detail','','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.'][a1_0x4237a7(0x1e0)]('\x0a')},{'code':'dataset_data_filter','category':a1_0x4237a7(0x22d),'title':a1_0x4237a7(0x218),'method':a1_0x4237a7(0x1d4),'path':a1_0x4237a7(0x21f),'summary':a1_0x4237a7(0x238),'whenToUse':a1_0x4237a7(0x1f0),'pathParams':[{'name':a1_0x4237a7(0x1ed),'description':a1_0x4237a7(0x21a)},{'name':a1_0x4237a7(0x1f6),'description':a1_0x4237a7(0x202)}],'queryParams':[],'bodySchema':a1_0x4237a7(0x1cb),'responseHighlights':[a1_0x4237a7(0x1ea),a1_0x4237a7(0x222)],'examples':[a1_0x4237a7(0x1e1),a1_0x4237a7(0x22c)],'notes':[a1_0x4237a7(0x212),a1_0x4237a7(0x1dc),a1_0x4237a7(0x1e3),'Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.'],'markdown':[a1_0x4237a7(0x1c7),'',a1_0x4237a7(0x214)][a1_0x4237a7(0x1e0)]('\x0a')},{'code':a1_0x4237a7(0x1fb),'category':a1_0x4237a7(0x22d),'title':a1_0x4237a7(0x1f9),'method':a1_0x4237a7(0x1d4),'path':'/api/{appCode}/{datasetCode}/aggregate','summary':'Aggregate\x20dataset\x20records','whenToUse':a1_0x4237a7(0x1e8),'pathParams':[{'name':a1_0x4237a7(0x1ed),'description':a1_0x4237a7(0x21a)},{'name':'datasetCode','description':a1_0x4237a7(0x202)}],'queryParams':[],'bodySchema':a1_0x4237a7(0x21b),'responseHighlights':[a1_0x4237a7(0x215),a1_0x4237a7(0x1d8)],'examples':[a1_0x4237a7(0x1da)],'notes':[a1_0x4237a7(0x239),a1_0x4237a7(0x1e6)],'markdown':[a1_0x4237a7(0x1fc),'','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.'][a1_0x4237a7(0x1e0)]('\x0a')},{'code':'dataset_data_get_one','category':a1_0x4237a7(0x22d),'title':a1_0x4237a7(0x1c9),'method':'POST','path':a1_0x4237a7(0x1de),'summary':a1_0x4237a7(0x1c9),'whenToUse':'Use\x20when\x20you\x20already\x20know\x20the\x20record\x20id\x20and\x20need\x20one\x20business\x20row\x20from\x20a\x20dataset','pathParams':[{'name':'appCode','description':a1_0x4237a7(0x21a)},{'name':a1_0x4237a7(0x1f6),'description':a1_0x4237a7(0x202)}],'queryParams':[],'bodySchema':'{\x22id\x22:123}','responseHighlights':[a1_0x4237a7(0x243)],'examples':[a1_0x4237a7(0x1db)],'notes':[a1_0x4237a7(0x1c4)],'markdown':a1_0x4237a7(0x1e5)},{'code':a1_0x4237a7(0x231),'category':'dataset','title':'Create\x20dataset\x20record','method':'POST','path':'/api/{appCode}/{datasetCode}/create','summary':a1_0x4237a7(0x227),'whenToUse':'Use\x20when\x20you\x20need\x20to\x20insert\x20one\x20business\x20record\x20into\x20a\x20dataset','pathParams':[{'name':a1_0x4237a7(0x1ed),'description':a1_0x4237a7(0x21a)},{'name':a1_0x4237a7(0x1f6),'description':a1_0x4237a7(0x202)}],'queryParams':[],'bodySchema':'{\x22fieldName\x22:\x22value\x22}','responseHighlights':['Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result'],'examples':[a1_0x4237a7(0x1e9)],'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':a1_0x4237a7(0x23f),'category':'bf','title':a1_0x4237a7(0x1ff),'method':a1_0x4237a7(0x242),'path':a1_0x4237a7(0x210),'summary':a1_0x4237a7(0x1d2),'whenToUse':a1_0x4237a7(0x1c8),'pathParams':[{'name':a1_0x4237a7(0x1ed),'description':'Current\x20app\x20code'},{'name':a1_0x4237a7(0x20f),'description':a1_0x4237a7(0x21e)}],'queryParams':[],'bodySchema':a1_0x4237a7(0x23e),'responseHighlights':['CLI\x20returns\x20appCode/functionName/description/version/gmtModified'],'examples':['lovrabet\x20bff\x20detail\x20--name\x20<functionName>'],'notes':[a1_0x4237a7(0x240)],'markdown':a1_0x4237a7(0x1c6)},{'code':'bf_execute','category':'bf','title':a1_0x4237a7(0x1ee),'method':a1_0x4237a7(0x1d4),'path':a1_0x4237a7(0x223),'summary':a1_0x4237a7(0x1c3),'whenToUse':a1_0x4237a7(0x221),'pathParams':[{'name':'appCode','description':'Current\x20app\x20code'},{'name':'functionName','description':a1_0x4237a7(0x230)}],'queryParams':[],'bodySchema':'{\x22param\x22:\x22value\x22}','responseHighlights':[a1_0x4237a7(0x233)],'examples':['lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27'],'notes':[a1_0x4237a7(0x23d)],'markdown':a1_0x4237a7(0x20a)},{'code':'personal_bf_execute','category':'bf','title':a1_0x4237a7(0x203),'method':a1_0x4237a7(0x1d4),'path':a1_0x4237a7(0x20c),'summary':a1_0x4237a7(0x23c),'whenToUse':a1_0x4237a7(0x211),'pathParams':[{'name':'id','description':a1_0x4237a7(0x219)}],'queryParams':[{'name':a1_0x4237a7(0x1ed),'description':'Current\x20app\x20code'}],'bodySchema':a1_0x4237a7(0x206),'responseHighlights':[a1_0x4237a7(0x233)],'examples':[a1_0x4237a7(0x209)],'notes':['Personal\x20BFF\x20scripts\x20are\x20user-owned\x20and\x20scoped\x20per\x20app.',a1_0x4237a7(0x1fa)],'markdown':[a1_0x4237a7(0x1f4),'',a1_0x4237a7(0x1f1)][a1_0x4237a7(0x1e0)]('\x0a')},{'code':a1_0x4237a7(0x1d9),'category':a1_0x4237a7(0x1e7),'title':a1_0x4237a7(0x1d1),'method':'POST','path':a1_0x4237a7(0x1cf),'summary':a1_0x4237a7(0x1d1),'whenToUse':a1_0x4237a7(0x21c),'pathParams':[],'queryParams':[],'bodySchema':a1_0x4237a7(0x205),'responseHighlights':[a1_0x4237a7(0x1e2)],'examples':[a1_0x4237a7(0x1cc)],'notes':[a1_0x4237a7(0x1d3)],'markdown':a1_0x4237a7(0x1ec)}];function entrySummary(_0x16b438){const _0x50ebde=a1_0x4237a7;return{'code':_0x16b438[_0x50ebde(0x224)],'category':_0x16b438[_0x50ebde(0x1ef)],'method':_0x16b438[_0x50ebde(0x1df)],'path':_0x16b438[_0x50ebde(0x1fe)],'summary':_0x16b438['summary'],'whenToUse':_0x16b438['whenToUse']};}export function listApiDocEntries(_0x432df4={}){const _0x4b8c87=a1_0x4237a7,_0x145cb6=String(_0x432df4['category']||'')[_0x4b8c87(0x1d7)](),_0xdb9b6b=String(_0x432df4['keyword']||'')[_0x4b8c87(0x1d7)]()[_0x4b8c87(0x207)]();return DOCS[_0x4b8c87(0x241)](_0xad4880=>{const _0x413764=_0x4b8c87;if(_0x145cb6&&_0xad4880[_0x413764(0x1ef)]!==_0x145cb6)return![];if(!_0xdb9b6b)return!![];return[_0xad4880[_0x413764(0x224)],_0xad4880[_0x413764(0x1ef)],_0xad4880[_0x413764(0x1df)],_0xad4880['path'],_0xad4880[_0x413764(0x201)],_0xad4880[_0x413764(0x20b)],_0xad4880[_0x413764(0x237)]][_0x413764(0x1e0)]('\x20')[_0x413764(0x207)]()[_0x413764(0x22e)](_0xdb9b6b);})['map'](entrySummary);}export function getApiDocDetail(_0x5425c5){const _0x5b4f77=a1_0x4237a7,_0x277f33=DOCS[_0x5b4f77(0x1f7)](_0x1bc55e=>_0x1bc55e['code']===_0x5425c5);if(!_0x277f33)throw CliErrors[_0x5b4f77(0x1f8)](_0x5b4f77(0x200)+_0x5425c5);return{..._0x277f33};}function a1_0x5566(){const _0x508933=['##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','whenToUse','/api/runtime-bff/personal/{id}/execute','Show\x20runtime\x20API\x20documentation\x20by\x20code','List\x20datasets','functionName','/client/bff/endpoint/{appCode}/{functionName}','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','where,\x20select,\x20orderBy,\x20currentPage,\x20and\x20pageSize\x20belong\x20inside\x20one\x20--params\x20JSON\x20object;\x20they\x20are\x20not\x20standalone\x20CLI\x20flags.','Use\x20when\x20you\x20need\x20fields,\x20table\x20info,\x20relations,\x20or\x20operation\x20definitions\x20for\x20a\x20dataset\x20code','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','result\x20rows\x20contain\x20aggregate\x20aliases','Get\x20dataset\x20detail','882658nNxVvw','Filter\x20dataset\x20data','Personal\x20Backend\x20Function\x20script\x20ID,\x20for\x20example\x20123','Current\x20app\x20code','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','Use\x20when\x20the\x20target\x20sqlCode\x20exists\x20and\x20you\x20need\x20to\x20execute\x20that\x20custom\x20SQL','/api/dataset/getOneByCode?code={datasetCode}','Exact\x20endpoint\x20function\x20name','/api/{appCode}/{datasetCode}/filter','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','Use\x20when\x20the\x20target\x20BF\x20functionName\x20is\x20confirmed\x20and\x20you\x20need\x20to\x20call\x20that\x20ENDPOINT','paging\x20contains\x20pagination','/api/endpoint/{appCode}/{functionName}','code','dataset_list','str','Create\x20a\x20dataset\x20record','6746424tDwNcu','api-doc','808014nYBuBa','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','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','dataset','includes','21PnmIxG','Endpoint\x20function\x20name','dataset_data_create','API\x20doc\x20code,\x20for\x20example\x20dataset_list','Returns\x20script\x20business\x20payload','read','List\x20available\x20runtime\x20API\x20documentation\x20entries','11845998wQquMR','title','Filter\x20dataset\x20records','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','keyword','1143836VmPlZJ','Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20script\x20ID','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','None','bf_detail','This\x20is\x20an\x20exact\x20lookup\x20by\x20appCode\x20+\x20functionName.\x20The\x20CLI\x20does\x20not\x20enumerate\x20Backend\x20Function\x20definitions\x20or\x20expose\x20platform-only\x20fields.','filter','GET','Returns\x20one\x20matching\x20business\x20record','3196756ufSjmQ','Execute\x20a\x20BF\x20endpoint\x20function','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','##\x20Get\x20BF\x20endpoint\x20function\x20contract\x0a\x0aInspect\x20one\x20known\x20endpoint\x20function\x20through\x20the\x20AK-authenticated\x20exact\x20detail\x20API.','##\x20Filter\x20dataset\x20data','Use\x20when\x20the\x20function\x20name\x20is\x20already\x20confirmed\x20and\x20you\x20need\x20that\x20ENDPOINT\x27s\x20runtime\x20metadata','Get\x20one\x20dataset\x20record','19058010sFGsmz','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','6KFCyQp','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','/api/custom/executeSql','string','Execute\x20custom\x20SQL','Get\x20a\x20BF\x20endpoint\x20contract\x20by\x20app\x20and\x20function\x20name','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','POST','Use\x20when\x20you\x20need\x20a\x20paginated\x20runtime\x20dataset\x20list\x20by\x20appCode\x20and\x20want\x20to\x20collect\x20available\x20datasetCode\x20values','relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned','trim','where\x20filters\x20before\x20aggregation','custom_sql_execute','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','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','For\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged\x20and\x20increment\x20only\x20currentPage,\x20which\x20starts\x20at\x201.','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','/api/{appCode}/{datasetCode}/getOne','method','join','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','Returns\x20SQL\x20execution\x20payload','Verify\x20tableData\x20and\x20paging\x20before\x20treating\x20the\x20response\x20as\x20a\x20business\x20fact.','/api/dataset/get-dataset-list-by-app-code','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','custom_sql','Use\x20when\x20you\x20need\x20groupBy\x20plus\x20count,\x20sum,\x20avg,\x20max,\x20or\x20min\x20aggregates','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','tableData\x20contains\x20records','operations\x20describes\x20runtime\x20APIs','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','appCode','Execute\x20BF\x20endpoint\x20function','category','Use\x20when\x20you\x20need\x20to\x20read\x20business\x20data\x20with\x20where,\x20orderBy,\x20pagination,\x20or\x20similar\x20filters','Execute\x20a\x20known\x20Personal\x20Backend\x20Function\x20script\x20through\x20its\x20runtime\x20execute\x20endpoint.','Dataset\x20detail','tableData\x20contains\x20dataset\x20id/code/name','##\x20Execute\x20Personal\x20Backend\x20Function','list','datasetCode','find','validation','Aggregate\x20dataset\x20data','Function\x20execution\x20may\x20have\x20business\x20side\x20effects;\x20inspect\x20detail\x20before\x20execution.','dataset_data_aggregate','##\x20Aggregate\x20dataset\x20data','dataset_detail','path','Get\x20BF\x20endpoint\x20function\x20contract','API\x20doc\x20code\x20not\x20found:\x20','summary','32-character\x20dataset\x20code','Execute\x20Personal\x20Backend\x20Function','5OcdKMr','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','{\x22param\x22:\x22value\x22}','toLowerCase','length','lovrabet\x20personal-bff\x20exec\x20--id\x20<id>\x20--params\x20\x27{}\x27'];a1_0x5566=function(){return _0x508933;};return a1_0x5566();}const apiDocList={'service':a1_0x4237a7(0x229),'command':a1_0x4237a7(0x1f5),'description':a1_0x4237a7(0x235),'risk':a1_0x4237a7(0x234),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x4f5e13){const _0x42fe64=a1_0x4237a7,_0x2e33bf=listApiDocEntries({'category':_0x4f5e13[_0x42fe64(0x226)](_0x42fe64(0x1ef)),'keyword':_0x4f5e13['str']('keyword')});return{'ok':!![],'data':{'total':_0x2e33bf[_0x42fe64(0x208)],'items':_0x2e33bf}};}},apiDocDetail={'service':a1_0x4237a7(0x229),'command':'detail','description':a1_0x4237a7(0x20d),'risk':'read','requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x2d04e6){const _0x3b178f=a1_0x4237a7;return{'ok':!![],'data':getApiDocDetail(_0x2d04e6['str'](_0x3b178f(0x224)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
|
|
1
|
+
const a1_0x2b90c2=a1_0x41a7;function a1_0x41a7(_0x1ec7a4,_0x55923d){_0x1ec7a4=_0x1ec7a4-0x1a8;const _0x552a51=a1_0x552a();let _0x41a7a9=_0x552a51[_0x1ec7a4];return _0x41a7a9;}(function(_0x3311d0,_0x413209){const _0x361be7=a1_0x41a7,_0x37d189=_0x3311d0();while(!![]){try{const _0x20cb82=-parseInt(_0x361be7(0x1c7))/0x1*(parseInt(_0x361be7(0x1bf))/0x2)+-parseInt(_0x361be7(0x229))/0x3*(-parseInt(_0x361be7(0x1fb))/0x4)+parseInt(_0x361be7(0x1e4))/0x5*(parseInt(_0x361be7(0x1d4))/0x6)+parseInt(_0x361be7(0x1ee))/0x7*(parseInt(_0x361be7(0x20d))/0x8)+parseInt(_0x361be7(0x1ac))/0x9+-parseInt(_0x361be7(0x1f5))/0xa*(-parseInt(_0x361be7(0x1af))/0xb)+-parseInt(_0x361be7(0x22e))/0xc;if(_0x20cb82===_0x413209)break;else _0x37d189['push'](_0x37d189['shift']());}catch(_0x3ac9bc){_0x37d189['push'](_0x37d189['shift']());}}}(a1_0x552a,0xb5090));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x2b90c2(0x1d6),'type':'string','description':a1_0x2b90c2(0x1e0)},KEYWORD_FLAG={'name':a1_0x2b90c2(0x1bc),'type':a1_0x2b90c2(0x1d1),'description':a1_0x2b90c2(0x21f)},DOC_CODE_FLAG={'name':'code','type':a1_0x2b90c2(0x1d1),'required':!![],'description':a1_0x2b90c2(0x1eb)},DOCS=[{'code':'dataset_list','category':a1_0x2b90c2(0x220),'title':a1_0x2b90c2(0x1e5),'method':'POST','path':a1_0x2b90c2(0x210),'summary':a1_0x2b90c2(0x207),'whenToUse':a1_0x2b90c2(0x1bd),'pathParams':[],'queryParams':[],'bodySchema':a1_0x2b90c2(0x212),'responseHighlights':[a1_0x2b90c2(0x201),'paging.totalCount\x20gives\x20total\x20rows'],'examples':[a1_0x2b90c2(0x1e3)],'notes':[a1_0x2b90c2(0x20e)],'markdown':[a1_0x2b90c2(0x1c6),'',a1_0x2b90c2(0x22a)][a1_0x2b90c2(0x1cc)]('\x0a')},{'code':a1_0x2b90c2(0x1c2),'category':'dataset','title':a1_0x2b90c2(0x218),'method':a1_0x2b90c2(0x1f6),'path':a1_0x2b90c2(0x1c3),'summary':'Get\x20dataset\x20detail','whenToUse':a1_0x2b90c2(0x1e2),'pathParams':[],'queryParams':[{'name':'code','description':'32-character\x20dataset\x20code'}],'bodySchema':a1_0x2b90c2(0x21a),'responseHighlights':[a1_0x2b90c2(0x225),'relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned',a1_0x2b90c2(0x223)],'examples':[a1_0x2b90c2(0x1c4)],'notes':[a1_0x2b90c2(0x1dc)],'markdown':[a1_0x2b90c2(0x20b),'','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.'][a1_0x2b90c2(0x1cc)]('\x0a')},{'code':a1_0x2b90c2(0x1cd),'category':a1_0x2b90c2(0x220),'title':a1_0x2b90c2(0x1d5),'method':a1_0x2b90c2(0x224),'path':a1_0x2b90c2(0x1a8),'summary':a1_0x2b90c2(0x1fc),'whenToUse':a1_0x2b90c2(0x228),'pathParams':[{'name':a1_0x2b90c2(0x221),'description':a1_0x2b90c2(0x214)},{'name':a1_0x2b90c2(0x20a),'description':a1_0x2b90c2(0x1b2)}],'queryParams':[],'bodySchema':'{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','responseHighlights':[a1_0x2b90c2(0x1db),a1_0x2b90c2(0x1cb)],'examples':[a1_0x2b90c2(0x1c0),a1_0x2b90c2(0x1f8)],'notes':[a1_0x2b90c2(0x204),a1_0x2b90c2(0x1f1),a1_0x2b90c2(0x1b3),a1_0x2b90c2(0x200)],'markdown':[a1_0x2b90c2(0x1ba),'','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.'][a1_0x2b90c2(0x1cc)]('\x0a')},{'code':a1_0x2b90c2(0x211),'category':a1_0x2b90c2(0x220),'title':a1_0x2b90c2(0x1ae),'method':a1_0x2b90c2(0x224),'path':a1_0x2b90c2(0x1da),'summary':a1_0x2b90c2(0x1aa),'whenToUse':'Use\x20when\x20you\x20need\x20groupBy\x20plus\x20count,\x20sum,\x20avg,\x20max,\x20or\x20min\x20aggregates','pathParams':[{'name':a1_0x2b90c2(0x221),'description':'Current\x20app\x20code'},{'name':a1_0x2b90c2(0x20a),'description':a1_0x2b90c2(0x1b2)}],'queryParams':[],'bodySchema':'{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','responseHighlights':[a1_0x2b90c2(0x1b5),a1_0x2b90c2(0x1e8)],'examples':[a1_0x2b90c2(0x213)],'notes':[a1_0x2b90c2(0x1fa),'`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.'],'markdown':[a1_0x2b90c2(0x1ff),'',a1_0x2b90c2(0x1fe)][a1_0x2b90c2(0x1cc)]('\x0a')},{'code':a1_0x2b90c2(0x22c),'category':a1_0x2b90c2(0x220),'title':a1_0x2b90c2(0x1f9),'method':a1_0x2b90c2(0x224),'path':a1_0x2b90c2(0x1c8),'summary':'Get\x20one\x20dataset\x20record','whenToUse':a1_0x2b90c2(0x1fd),'pathParams':[{'name':a1_0x2b90c2(0x221),'description':a1_0x2b90c2(0x214)},{'name':a1_0x2b90c2(0x20a),'description':'32-character\x20dataset\x20code'}],'queryParams':[],'bodySchema':a1_0x2b90c2(0x1c5),'responseHighlights':[a1_0x2b90c2(0x21d)],'examples':['lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],'notes':['Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.'],'markdown':a1_0x2b90c2(0x202)},{'code':a1_0x2b90c2(0x1e9),'category':a1_0x2b90c2(0x220),'title':'Create\x20dataset\x20record','method':'POST','path':a1_0x2b90c2(0x1c9),'summary':a1_0x2b90c2(0x1d7),'whenToUse':a1_0x2b90c2(0x226),'pathParams':[{'name':a1_0x2b90c2(0x221),'description':a1_0x2b90c2(0x214)},{'name':'datasetCode','description':a1_0x2b90c2(0x1b2)}],'queryParams':[],'bodySchema':a1_0x2b90c2(0x208),'responseHighlights':[a1_0x2b90c2(0x21e)],'examples':[a1_0x2b90c2(0x1d8)],'notes':[a1_0x2b90c2(0x22b)],'markdown':'##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.'},{'code':'bf_detail','category':'bf','title':a1_0x2b90c2(0x22d),'method':a1_0x2b90c2(0x1f6),'path':a1_0x2b90c2(0x1ab),'summary':a1_0x2b90c2(0x1d3),'whenToUse':a1_0x2b90c2(0x209),'pathParams':[{'name':a1_0x2b90c2(0x221),'description':a1_0x2b90c2(0x214)},{'name':a1_0x2b90c2(0x1f7),'description':a1_0x2b90c2(0x1f2)}],'queryParams':[],'bodySchema':a1_0x2b90c2(0x21a),'responseHighlights':[a1_0x2b90c2(0x203)],'examples':[a1_0x2b90c2(0x206)],'notes':[a1_0x2b90c2(0x1f4)],'markdown':a1_0x2b90c2(0x205)},{'code':a1_0x2b90c2(0x20f),'category':'bf','title':'Execute\x20BF\x20endpoint\x20function','method':a1_0x2b90c2(0x224),'path':a1_0x2b90c2(0x1b7),'summary':a1_0x2b90c2(0x1d9),'whenToUse':a1_0x2b90c2(0x1a9),'pathParams':[{'name':a1_0x2b90c2(0x221),'description':a1_0x2b90c2(0x214)},{'name':a1_0x2b90c2(0x1f7),'description':a1_0x2b90c2(0x1d2)}],'queryParams':[],'bodySchema':'{\x22param\x22:\x22value\x22}','responseHighlights':[a1_0x2b90c2(0x1bb)],'examples':['lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27'],'notes':[a1_0x2b90c2(0x1e6)],'markdown':a1_0x2b90c2(0x1b1)},{'code':a1_0x2b90c2(0x21b),'category':'bf','title':'Execute\x20Personal\x20Backend\x20Function','method':a1_0x2b90c2(0x224),'path':a1_0x2b90c2(0x1be),'summary':a1_0x2b90c2(0x227),'whenToUse':a1_0x2b90c2(0x1b4),'pathParams':[{'name':'id','description':'Personal\x20Backend\x20Function\x20script\x20ID,\x20for\x20example\x20123'}],'queryParams':[{'name':a1_0x2b90c2(0x221),'description':a1_0x2b90c2(0x214)}],'bodySchema':'{\x22param\x22:\x22value\x22}','responseHighlights':[a1_0x2b90c2(0x1bb)],'examples':['lovrabet\x20personal-bff\x20exec\x20--id\x20<id>\x20--params\x20\x27{}\x27'],'notes':[a1_0x2b90c2(0x1b6),'Function\x20execution\x20may\x20have\x20business\x20side\x20effects;\x20inspect\x20detail\x20before\x20execution.'],'markdown':[a1_0x2b90c2(0x1e1),'',a1_0x2b90c2(0x1ea)][a1_0x2b90c2(0x1cc)]('\x0a')},{'code':a1_0x2b90c2(0x1de),'category':'custom_sql','title':a1_0x2b90c2(0x1e7),'method':'POST','path':a1_0x2b90c2(0x1ad),'summary':'Execute\x20custom\x20SQL','whenToUse':a1_0x2b90c2(0x1b0),'pathParams':[],'queryParams':[],'bodySchema':'{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','responseHighlights':[a1_0x2b90c2(0x1c1)],'examples':['lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27'],'notes':[a1_0x2b90c2(0x222)],'markdown':a1_0x2b90c2(0x1f0)}];function a1_0x552a(){const _0x14bd3f=['Returns\x20script\x20business\x20payload','keyword','Use\x20when\x20you\x20need\x20a\x20paginated\x20runtime\x20dataset\x20list\x20by\x20appCode\x20and\x20want\x20to\x20collect\x20available\x20datasetCode\x20values','/api/runtime-bff/personal/{id}/execute','135486DfHkew','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','Returns\x20SQL\x20execution\x20payload','dataset_detail','/api/dataset/getOneByCode?code={datasetCode}','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','{\x22id\x22:123}','##\x20List\x20datasets','11wxFKIu','/api/{appCode}/{datasetCode}/getOne','/api/{appCode}/{datasetCode}/create','summary','paging\x20contains\x20pagination','join','dataset_data_filter','title','toLowerCase','str','string','Endpoint\x20function\x20name','Get\x20a\x20BF\x20endpoint\x20contract\x20by\x20app\x20and\x20function\x20name','3256626BAIgtB','Filter\x20dataset\x20data','category','Create\x20a\x20dataset\x20record','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','Execute\x20a\x20BF\x20endpoint\x20function','/api/{appCode}/{datasetCode}/aggregate','tableData\x20contains\x20records','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','whenToUse','custom_sql_execute','detail','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','##\x20Execute\x20Personal\x20Backend\x20Function','Use\x20when\x20you\x20need\x20fields,\x20table\x20info,\x20relations,\x20or\x20operation\x20definitions\x20for\x20a\x20dataset\x20code','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','5RqABoD','List\x20datasets','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','Execute\x20custom\x20SQL','where\x20filters\x20before\x20aggregation','dataset_data_create','Execute\x20a\x20known\x20Personal\x20Backend\x20Function\x20script\x20through\x20its\x20runtime\x20execute\x20endpoint.','API\x20doc\x20code,\x20for\x20example\x20dataset_list','filter','includes','6118geGaAl','validation','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','For\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged\x20and\x20increment\x20only\x20currentPage,\x20which\x20starts\x20at\x201.','Exact\x20endpoint\x20function\x20name','API\x20doc\x20code\x20not\x20found:\x20','This\x20is\x20an\x20exact\x20lookup\x20by\x20appCode\x20+\x20functionName.\x20The\x20CLI\x20does\x20not\x20enumerate\x20Backend\x20Function\x20definitions\x20or\x20expose\x20platform-only\x20fields.','140RGmFrD','GET','functionName','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','Get\x20one\x20dataset\x20record','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','4YXvKZf','Filter\x20dataset\x20records','Use\x20when\x20you\x20already\x20know\x20the\x20record\x20id\x20and\x20need\x20one\x20business\x20row\x20from\x20a\x20dataset','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','##\x20Aggregate\x20dataset\x20data','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','tableData\x20contains\x20dataset\x20id/code/name','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','CLI\x20returns\x20appCode/functionName/description/version/gmtModified','where,\x20select,\x20orderBy,\x20currentPage,\x20and\x20pageSize\x20belong\x20inside\x20one\x20--params\x20JSON\x20object;\x20they\x20are\x20not\x20standalone\x20CLI\x20flags.','##\x20Get\x20BF\x20endpoint\x20function\x20contract\x0a\x0aInspect\x20one\x20known\x20endpoint\x20function\x20through\x20the\x20AK-authenticated\x20exact\x20detail\x20API.','lovrabet\x20bff\x20detail\x20--name\x20<functionName>','List\x20datasets\x20with\x20pagination','{\x22fieldName\x22:\x22value\x22}','Use\x20when\x20the\x20function\x20name\x20is\x20already\x20confirmed\x20and\x20you\x20need\x20that\x20ENDPOINT\x27s\x20runtime\x20metadata','datasetCode','##\x20Dataset\x20detail','Show\x20runtime\x20API\x20documentation\x20by\x20code','13304nbsAKl','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','bf_execute','/api/dataset/get-dataset-list-by-app-code','dataset_data_aggregate','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','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','Current\x20app\x20code','path','method','trim','Dataset\x20detail','api-doc','None','personal_bf_execute','list','Returns\x20one\x20matching\x20business\x20record','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','dataset','appCode','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','operations\x20describes\x20runtime\x20APIs','POST','fields/properties\x20describe\x20data\x20shape','Use\x20when\x20you\x20need\x20to\x20insert\x20one\x20business\x20record\x20into\x20a\x20dataset','Execute\x20a\x20Personal\x20Backend\x20Function\x20by\x20script\x20ID','Use\x20when\x20you\x20need\x20to\x20read\x20business\x20data\x20with\x20where,\x20orderBy,\x20pagination,\x20or\x20similar\x20filters','3146331pQzxfD','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','dataset_data_get_one','Get\x20BF\x20endpoint\x20function\x20contract','36852828PKvhCk','/api/{appCode}/{datasetCode}/filter','Use\x20when\x20the\x20target\x20BF\x20functionName\x20is\x20confirmed\x20and\x20you\x20need\x20to\x20call\x20that\x20ENDPOINT','Aggregate\x20dataset\x20records','/client/bff/endpoint/{appCode}/{functionName}','3372228UfXtws','/api/custom/executeSql','Aggregate\x20dataset\x20data','894190CWtwHW','Use\x20when\x20the\x20target\x20sqlCode\x20exists\x20and\x20you\x20need\x20to\x20execute\x20that\x20custom\x20SQL','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','32-character\x20dataset\x20code','Verify\x20tableData\x20and\x20paging\x20before\x20treating\x20the\x20response\x20as\x20a\x20business\x20fact.','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','result\x20rows\x20contain\x20aggregate\x20aliases','Personal\x20BFF\x20scripts\x20are\x20user-owned\x20and\x20scoped\x20per\x20app.','/api/endpoint/{appCode}/{functionName}','code','read','##\x20Filter\x20dataset\x20data'];a1_0x552a=function(){return _0x14bd3f;};return a1_0x552a();}function entrySummary(_0x5f4601){const _0x1ebc2d=a1_0x2b90c2;return{'code':_0x5f4601[_0x1ebc2d(0x1b8)],'category':_0x5f4601[_0x1ebc2d(0x1d6)],'method':_0x5f4601[_0x1ebc2d(0x216)],'path':_0x5f4601[_0x1ebc2d(0x215)],'summary':_0x5f4601[_0x1ebc2d(0x1ca)],'whenToUse':_0x5f4601[_0x1ebc2d(0x1dd)]};}export function listApiDocEntries(_0x1cfecc={}){const _0x257a52=a1_0x2b90c2,_0x23b5c7=String(_0x1cfecc[_0x257a52(0x1d6)]||'')[_0x257a52(0x217)](),_0x1b2d56=String(_0x1cfecc[_0x257a52(0x1bc)]||'')[_0x257a52(0x217)]()[_0x257a52(0x1cf)]();return DOCS[_0x257a52(0x1ec)](_0x2b27f3=>{const _0xae6841=_0x257a52;if(_0x23b5c7&&_0x2b27f3[_0xae6841(0x1d6)]!==_0x23b5c7)return![];if(!_0x1b2d56)return!![];return[_0x2b27f3[_0xae6841(0x1b8)],_0x2b27f3[_0xae6841(0x1d6)],_0x2b27f3[_0xae6841(0x216)],_0x2b27f3[_0xae6841(0x215)],_0x2b27f3[_0xae6841(0x1ca)],_0x2b27f3[_0xae6841(0x1dd)],_0x2b27f3[_0xae6841(0x1ce)]][_0xae6841(0x1cc)]('\x20')[_0xae6841(0x1cf)]()[_0xae6841(0x1ed)](_0x1b2d56);})['map'](entrySummary);}export function getApiDocDetail(_0x51739a){const _0x8c5cb8=a1_0x2b90c2,_0x45e935=DOCS['find'](_0x193aea=>_0x193aea[_0x8c5cb8(0x1b8)]===_0x51739a);if(!_0x45e935)throw CliErrors[_0x8c5cb8(0x1ef)](_0x8c5cb8(0x1f3)+_0x51739a);return{..._0x45e935};}const apiDocList={'service':a1_0x2b90c2(0x219),'command':a1_0x2b90c2(0x21c),'description':'List\x20available\x20runtime\x20API\x20documentation\x20entries','risk':a1_0x2b90c2(0x1b9),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x3a5ebf){const _0x545d3d=a1_0x2b90c2,_0x30d138=listApiDocEntries({'category':_0x3a5ebf[_0x545d3d(0x1d0)](_0x545d3d(0x1d6)),'keyword':_0x3a5ebf['str'](_0x545d3d(0x1bc))});return{'ok':!![],'data':{'total':_0x30d138['length'],'items':_0x30d138}};}},apiDocDetail={'service':'api-doc','command':a1_0x2b90c2(0x1df),'description':a1_0x2b90c2(0x20c),'risk':a1_0x2b90c2(0x1b9),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x8e358a){const _0x2a4f0c=a1_0x2b90c2;return{'ok':!![],'data':getApiDocDetail(_0x8e358a[_0x2a4f0c(0x1d0)](_0x2a4f0c(0x1b8)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5cf855,_0x7aaea2){const _0x1e19ec=a2_0x482e,_0x3cfaeb=_0x5cf855();while(!![]){try{const _0x96dd86=-parseInt(_0x1e19ec(0xe4))/0x1*(-parseInt(_0x1e19ec(0xf6))/0x2)+-parseInt(_0x1e19ec(0xf3))/0x3*(parseInt(_0x1e19ec(0xf0))/0x4)+parseInt(_0x1e19ec(0xea))/0x5+-parseInt(_0x1e19ec(0xf5))/0x6+-parseInt(_0x1e19ec(0xde))/0x7+parseInt(_0x1e19ec(0xe7))/0x8+parseInt(_0x1e19ec(0xf7))/0x9*(-parseInt(_0x1e19ec(0xe8))/0xa);if(_0x96dd86===_0x7aaea2)break;else _0x3cfaeb['push'](_0x3cfaeb['shift']());}catch(_0x2f7cd0){_0x3cfaeb['push'](_0x3cfaeb['shift']());}}}(a2_0x116e,0x75cca));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_0x116e(){const _0x10750d=['2666503oWlidR','slice','cache','utf8','homeDirName','stringify','3aWXBfV','items','parse','6910912nYGfmQ','80GudkYS','find','3782615IAMerA','ak_','trim','update','digest','appCode','52AFLpxS','EXDEV','code','10527HtHIDi','hex','5093484eMmHRE','117986wUjGdg','44325mmsGwL'];a2_0x116e=function(){return _0x10750d;};return a2_0x116e();}export function fingerprintAccessKey(_0x1b3235){const _0x1f64f2=a2_0x482e,_0x1ee1e=_0x1b3235[_0x1f64f2(0xec)](),_0x24a42a=_0x1ee1e[_0x1f64f2(0xdf)](-0x6)||'unknown',_0x347f8f=createHash('sha256')[_0x1f64f2(0xed)](_0x1ee1e)[_0x1f64f2(0xee)](_0x1f64f2(0xf4))['slice'](0x0,0xc);return _0x1f64f2(0xeb)+_0x24a42a+'_'+_0x347f8f;}export function getAppCacheFilePath(_0x45d8f8,_0x2d83ce){const _0x45a03b=a2_0x482e;return resolve(homedir(),PRODUCT_CONFIG[_0x45a03b(0xe2)],_0x45a03b(0xe0),_0x45d8f8,fingerprintAccessKey(_0x2d83ce),'my-apps.json');}export function readCachedAppList(_0x2f5895,_0x11c1bc){const _0x48a620=a2_0x482e;if(!_0x11c1bc?.[_0x48a620(0xec)]())return null;const _0x329283=getAppCacheFilePath(_0x2f5895,_0x11c1bc);if(!existsSync(_0x329283))return null;try{const _0x58f035=readFileSync(_0x329283,_0x48a620(0xe1));if(!_0x58f035['trim']())return null;const _0xcd0783=JSON[_0x48a620(0xe6)](_0x58f035);if(!Array['isArray'](_0xcd0783[_0x48a620(0xe5)]))return null;return _0xcd0783;}catch{return null;}}export function writeCachedAppList(_0xc174ea,_0x4605a1,_0x485682){const _0x3ddaf4=a2_0x482e,_0x3b8675=getAppCacheFilePath(_0xc174ea,_0x4605a1),_0x2fd67a=dirname(_0x3b8675);!existsSync(_0x2fd67a)&&mkdirSync(_0x2fd67a,{'recursive':!![]});const _0xf0aa17=_0x3b8675+'.tmp';try{writeFileSync(_0xf0aa17,JSON['stringify'](_0x485682,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0xf0aa17,_0x3b8675);}catch(_0x5cfac6){if(_0x5cfac6['code']==='EPERM'||_0x5cfac6[_0x3ddaf4(0xf2)]===_0x3ddaf4(0xf1)||_0x5cfac6[_0x3ddaf4(0xf2)]==='EACCES'){writeFileSync(_0x3b8675,JSON[_0x3ddaf4(0xe3)](_0x485682,null,0x2)+'\x0a',{'encoding':_0x3ddaf4(0xe1)});try{unlinkSync(_0xf0aa17);}catch{}}else throw _0x5cfac6;}}catch(_0x1eec86){try{unlinkSync(_0xf0aa17);}catch{}throw _0x1eec86;}return _0x3b8675;}function a2_0x482e(_0x389e21,_0x3ad78b){_0x389e21=_0x389e21-0xde;const _0x116e11=a2_0x116e();let _0x482ec2=_0x116e11[_0x389e21];return _0x482ec2;}export function resolveCachedAppCode(_0x1fb878,_0x3ab3bd,_0x5e4005){const _0x41fa51=a2_0x482e;if(!_0x1fb878)return undefined;const _0x5cf241=readCachedAppList(_0x3ab3bd,_0x5e4005),_0x48937b=_0x5cf241?.['items'][_0x41fa51(0xe9)](_0x14dcb0=>_0x14dcb0['appName']===_0x1fb878&&isRuntimeAccessibleApp(_0x14dcb0));return _0x48937b?.[_0x41fa51(0xef)]?.['trim']()||undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x4c4594=a3_0x53e8;(function(_0x1ad8cd,_0x4bd8c0){const _0x18cb87=a3_0x53e8,_0x4ef81f=_0x1ad8cd();while(!![]){try{const _0xd4d24=parseInt(_0x18cb87(0x10f))/0x1*(-parseInt(_0x18cb87(0x105))/0x2)+parseInt(_0x18cb87(0x106))/0x3*(parseInt(_0x18cb87(0x122))/0x4)+parseInt(_0x18cb87(0x11b))/0x5+parseInt(_0x18cb87(0x113))/0x6+parseInt(_0x18cb87(0xff))/0x7+parseInt(_0x18cb87(0x100))/0x8*(parseInt(_0x18cb87(0x134))/0x9)+-parseInt(_0x18cb87(0x11f))/0xa;if(_0xd4d24===_0x4bd8c0)break;else _0x4ef81f['push'](_0x4ef81f['shift']());}catch(_0x348b54){_0x4ef81f['push'](_0x4ef81f['shift']());}}}(a3_0x406f,0xebca8));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_0x406f(){const _0x3c26f4=['type','Refreshed\x20app\x20cache\x20with\x20','push','34401060bEhIWn','pull','\x20cached\x20app(s)\x20for\x20env=\x22','30524HLLqQl','isArray','read','Target\x20environment\x20(default:\x20current\x20env)','nonInteractive','fetchedAt','../../commands/app/remote-source.js','bool','remote','langs','string','filter','Read\x20from\x20local\x20cache\x20only','name','config','\x20app(s)\x20for\x20env=\x22','local','length','329337hpTHid','boolean','entries','cachePath','production','Read\x20app\x20list\x20from\x20local\x20cache\x20only','Loaded\x20','enableI18n','trim','source','accessKey','Include\x20unpublished\x20apps\x20for\x20diagnostics','import','7226408eQSHPx','248MjbyqG','no-cache','include-unpublished','appcode','cache','2651436NKaCcz','279AhMoID','map','No\x20apps\x20found\x20on\x20the\x20platform.','globalPath','mergedCli','str','write','Reads\x20the\x20given\x20.rabetbase.json\x20and\x20imports\x20a\x20usable\x20default\x20app\x20into\x20local\x20.lovrabet.json.\x20Matching\x20keys\x20may\x20be\x20updated.','appOwnerName','1NJcGDh','env','items','find','8660436akuLmJ','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','Filter\x20by\x20environment\x20(default:\x20current\x20env)','../../context.js','app','appName','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','i18nInfo','7059040QGQMls'];a3_0x406f=function(){return _0x3c26f4;};return a3_0x406f();}import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';function a3_0x53e8(_0xc130f1,_0xb52e1c){_0xc130f1=_0xc130f1-0xf7;const _0x406fde=a3_0x406f();let _0x53e8f6=_0x406fde[_0xc130f1];return _0x53e8f6;}function collectFlags(_0x41ca1f,_0x1e9e69){const _0x37876c=a3_0x53e8,_0x293e0d={};for(const _0x381a8e of _0x1e9e69){const _0x2da776=_0x381a8e[_0x37876c(0x11c)]===_0x37876c(0x135)?_0x41ca1f[_0x37876c(0x129)](_0x381a8e['name']):_0x41ca1f['str'](_0x381a8e[_0x37876c(0x12f)]);if(_0x2da776!==''&&_0x2da776!==![])_0x293e0d[_0x381a8e[_0x37876c(0x12f)]]=_0x2da776;}if(_0x41ca1f[_0x37876c(0x126)])_0x293e0d['nonInteractive']=!![];return _0x293e0d;}function normalizeLanguages(_0x1379dc){const _0x1aa7cf=a3_0x53e8;if(!Array[_0x1aa7cf(0x123)](_0x1379dc))return[];return _0x1379dc[_0x1aa7cf(0x12d)](_0xcb45a7=>typeof _0xcb45a7===_0x1aa7cf(0x12c))['map'](_0x2c67d2=>_0x2c67d2[_0x1aa7cf(0xfa)]())[_0x1aa7cf(0x12d)](Boolean);}function buildRemoteAppI18nFields(_0x495216){const _0x1e47be=a3_0x53e8,_0x513e40=normalizeLanguages(_0x495216[_0x1e47be(0x11a)]?.[_0x1e47be(0x12b)]);return{'enableI18n':typeof _0x495216['enableI18n']===_0x1e47be(0x135)?_0x495216[_0x1e47be(0xf9)]:null,'languages':_0x513e40,'i18nInfo':_0x495216[_0x1e47be(0x11a)]?{..._0x495216[_0x1e47be(0x11a)],'langs':_0x513e40[_0x1e47be(0x133)]?_0x513e40:null}:null};}const listDef={'service':a3_0x4c4594(0x117),'command':'list','description':a3_0x4c4594(0x114),'risk':a3_0x4c4594(0x124),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':'env','type':'string','description':a3_0x4c4594(0x115),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':'boolean','description':a3_0x4c4594(0xf7),'default':![]},{'name':a3_0x4c4594(0x101),'type':a3_0x4c4594(0x135),'description':a3_0x4c4594(0x119),'default':![]},{'name':a3_0x4c4594(0x102),'type':a3_0x4c4594(0x135),'description':a3_0x4c4594(0xfd),'default':![]}],async 'execute'(_0x1ac836){const _0x2abe44=a3_0x4c4594,_0x1e7c22=_0x1ac836['str'](_0x2abe44(0x110))||_0x1ac836['envName']||getEnv()||_0x2abe44(0x138),_0x350e4b=_0x1ac836['bool'](_0x2abe44(0x132)),_0x5458df=_0x1ac836[_0x2abe44(0x129)](_0x2abe44(0x101)),_0x51d2db=_0x1ac836[_0x2abe44(0x129)](_0x2abe44(0x102)),{readRawConfigWithLayers:_0x40fc32,resolveDefaultAppSource:_0x1e6c7b,getLocalAppAliases:_0x1dc949}=await import(_0x2abe44(0x116)),{getRemoteAppList:_0x1eec6c}=await import(_0x2abe44(0x128)),{config:_0x2cf474,layers:_0x2b63b1}=_0x40fc32(),_0x34ac36=_0x1e6c7b(_0x2b63b1),{defaultApp:_0xf1b656}=_0x2cf474,_0x37a802=await _0x1eec6c({'env':_0x1e7c22,'accessKey':_0x1ac836['accessKey'],'localOnly':_0x350e4b,'noCache':_0x5458df}),_0x13fea2=_0x51d2db?_0x37a802[_0x2abe44(0x111)]:filterRuntimeAccessibleApps(_0x37a802['items']),_0x14f855=_0x37a802[_0x2abe44(0x111)][_0x2abe44(0x133)]-_0x13fea2['length'],_0xd15800=_0x13fea2[_0x2abe44(0x107)](_0x4ceb82=>{const _0x5caed6=_0x2abe44;return{'name':_0x4ceb82[_0x5caed6(0x118)],'appcode':_0x4ceb82['appCode'],'named':!![],'definedIn':_0x5caed6(0x12a),'isDefault':_0x4ceb82[_0x5caed6(0x118)]===_0xf1b656,...buildAppProfileListFields(_0x1e7c22),...buildRemoteAppI18nFields(_0x4ceb82),'source':_0x37a802[_0x5caed6(0xfb)],'owner':_0x4ceb82[_0x5caed6(0x10e)]??null,'status':_0x4ceb82['appPublishStatus']??null,'cachedAt':_0x37a802[_0x5caed6(0x127)]};}),_0x5bb017=_0x1dc949(_0x2cf474);let _0x5d7ee0=0x0;for(const [_0x25c90f,_0x208e90]of Object[_0x2abe44(0x136)](_0x5bb017)){const _0xbb6dda=typeof _0x208e90[_0x2abe44(0x103)]===_0x2abe44(0x12c)?_0x208e90[_0x2abe44(0x103)][_0x2abe44(0xfa)]():'';if(!_0xbb6dda)continue;const _0x3ee019=findAppByCode(_0x37a802[_0x2abe44(0x111)],_0xbb6dda);if(!_0x51d2db&&_0x3ee019&&!isRuntimeAccessibleApp(_0x3ee019))continue;_0x5d7ee0+=0x1,_0xd15800[_0x2abe44(0x11e)]({'name':_0x25c90f,'appcode':_0xbb6dda,'named':!![],'definedIn':_0x2abe44(0x132),'isDefault':_0x25c90f===_0xf1b656,...buildAppProfileListFields(_0x1e7c22),'source':_0x2abe44(0x130),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0xd15800,_0x1ac836[_0x2abe44(0x10a)]);const _0x6309b7=_0xd15800[_0x2abe44(0x112)](_0x3006a9=>_0x3006a9['isCurrent']===!![]),_0x5441ed=_0xf1b656??_0x6309b7?.[_0x2abe44(0x12f)]??null,_0x5e1916={'env':_0x1e7c22,'source':_0x37a802['source'],'fetchedAt':_0x37a802['fetchedAt'],'cachePath':_0x37a802['cachePath'],'globalPath':_0x2b63b1[_0x2abe44(0x109)]??null,'projectPath':_0x2b63b1['projectPath']??null,'defaultApp':_0x5441ed,'defaultAppSource':_0xf1b656!=null?_0x34ac36:null,'localAliasCount':_0x5d7ee0,'remoteTotal':_0x37a802['items'][_0x2abe44(0x133)],'hiddenUnpublishedCount':_0x14f855,'includeUnpublished':_0x51d2db};if(_0xd15800[_0x2abe44(0x133)]===0x0)return{'ok':!![],'data':{'items':_0xd15800,'meta':_0x5e1916},'message':_0x37a802[_0x2abe44(0xfb)]===_0x2abe44(0x104)?'No\x20cached\x20apps\x20found.':_0x2abe44(0x108)};return{'ok':!![],'data':{'items':_0xd15800,'meta':_0x5e1916}};}},pullDef={'service':a3_0x4c4594(0x117),'command':a3_0x4c4594(0x120),'description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':a3_0x4c4594(0x10c),'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':'env','type':'string','description':a3_0x4c4594(0x125),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x4c4594(0x132),'type':a3_0x4c4594(0x135),'description':a3_0x4c4594(0x12e),'default':![]},{'name':a3_0x4c4594(0x101),'type':a3_0x4c4594(0x135),'description':'Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','default':![]}],async 'execute'(_0xb94d80){const _0x44074a=a3_0x4c4594,_0x300875=_0xb94d80[_0x44074a(0x10b)](_0x44074a(0x110))||_0xb94d80['envName']||getEnv()||'production',_0x456e56=_0xb94d80[_0x44074a(0x129)]('local'),_0x1259df=_0xb94d80[_0x44074a(0x129)](_0x44074a(0x101)),{getRemoteAppList:_0x1bc961}=await import('../../commands/app/remote-source.js'),_0x37ec03=await _0x1bc961({'env':_0x300875,'accessKey':_0xb94d80[_0x44074a(0xfc)],'localOnly':_0x456e56,'noCache':_0x1259df});return{'ok':!![],'data':{'total':_0x37ec03['items'][_0x44074a(0x133)],'env':_0x300875,'source':_0x37ec03[_0x44074a(0xfb)],'fetchedAt':_0x37ec03[_0x44074a(0x127)],'cachePath':_0x37ec03[_0x44074a(0x137)]},'message':_0x37ec03[_0x44074a(0xfb)]===_0x44074a(0x104)?_0x44074a(0xf8)+_0x37ec03['items'][_0x44074a(0x133)]+_0x44074a(0x121)+_0x300875+'\x22.':_0x44074a(0x11d)+_0x37ec03[_0x44074a(0x111)][_0x44074a(0x133)]+_0x44074a(0x131)+_0x300875+'\x22.'};}},importDef={'service':'app','command':a3_0x4c4594(0xfe),'description':'Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','risk':a3_0x4c4594(0x10c),'confirmationDescription':a3_0x4c4594(0x10d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':appImportFlagDefs,async 'execute'(_0x253dd8){return await runAppImport(collectFlags(_0x253dd8,appImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[listDef,pullDef,importDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x55b4a4,_0x79a229){const _0x5d4040=a4_0x1903,_0x510d48=_0x55b4a4();while(!![]){try{const _0x437bf2=-parseInt(_0x5d4040(0x17c))/0x1+parseInt(_0x5d4040(0x184))/0x2+-parseInt(_0x5d4040(0x180))/0x3+parseInt(_0x5d4040(0x17f))/0x4*(parseInt(_0x5d4040(0x171))/0x5)+parseInt(_0x5d4040(0x17b))/0x6*(-parseInt(_0x5d4040(0x185))/0x7)+-parseInt(_0x5d4040(0x16e))/0x8*(-parseInt(_0x5d4040(0x179))/0x9)+parseInt(_0x5d4040(0x17d))/0xa;if(_0x437bf2===_0x79a229)break;else _0x510d48['push'](_0x510d48['shift']());}catch(_0x3c612c){_0x510d48['push'](_0x510d48['shift']());}}}(a4_0x246b,0x8c151));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(_0x2af8b7){const _0x2e544a=a4_0x1903;if(typeof _0x2af8b7!==_0x2e544a(0x178))return null;const _0x38c479=_0x2af8b7['trim']();return _0x38c479?_0x38c479[_0x2e544a(0x17e)]():null;}function a4_0x246b(){const _0x44bfa3=['appPublishStatus','.\x20Publish\x20the\x20app\x20before\x20using\x20','1955DGlulP','App\x20','filter','appName','find','trim','appCode','string','3006lneMSZ','UNKNOWN','34014tJUIkm','94637knVdQb','13049680PqdKDF','toUpperCase','6944tEwsnw','2278446OHBBIS','validation','\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.','Current\x20status:\x20','313968peUSOK','980wYkxXu','1936VirYfU'];a4_0x246b=function(){return _0x44bfa3;};return a4_0x246b();}export function isRuntimeAccessibleApp(_0x2e9d50){const _0x49c211=a4_0x1903;return normalizeAppPublishStatus(_0x2e9d50[_0x49c211(0x16f)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x10becc){const _0xe4c4c8=a4_0x1903;return _0x10becc[_0xe4c4c8(0x173)](isRuntimeAccessibleApp);}function a4_0x1903(_0x30210a,_0x5c56a2){_0x30210a=_0x30210a-0x16e;const _0x246bf7=a4_0x246b();let _0x190399=_0x246bf7[_0x30210a];return _0x190399;}export function findAppByName(_0x20646c,_0x39d01b){const _0x27f99e=a4_0x1903;return _0x20646c['find'](_0x9f3838=>_0x9f3838[_0x27f99e(0x174)]===_0x39d01b);}export function findAppByCode(_0x99d19d,_0x5d4d63){const _0x57bd17=a4_0x1903,_0x24a277=_0x5d4d63[_0x57bd17(0x176)]();if(!_0x24a277)return undefined;return _0x99d19d[_0x57bd17(0x175)](_0x3426ca=>_0x3426ca[_0x57bd17(0x177)]?.[_0x57bd17(0x176)]()===_0x24a277);}export function runtimeInaccessibleAppError(_0x6e8d85,_0x4c12e0){const _0x3425bd=a4_0x1903,_0x2ce788=normalizeAppPublishStatus(_0x6e8d85[_0x3425bd(0x16f)])??_0x3425bd(0x17a);return CliErrors[_0x3425bd(0x181)](_0x3425bd(0x172)+_0x4c12e0+'\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.',_0x3425bd(0x183)+_0x2ce788+_0x3425bd(0x170)+CLI_BIN_NAME+_0x3425bd(0x182));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x72324c,_0x436b20){const _0x351f7c=a5_0x5730,_0x1ca78d=_0x72324c();while(!![]){try{const _0x1f9285=parseInt(_0x351f7c(0xed))/0x1+parseInt(_0x351f7c(0xf5))/0x2+-parseInt(_0x351f7c(0xf4))/0x3+parseInt(_0x351f7c(0xfa))/0x4+-parseInt(_0x351f7c(0xf6))/0x5*(parseInt(_0x351f7c(0xf9))/0x6)+-parseInt(_0x351f7c(0xef))/0x7+parseInt(_0x351f7c(0xfc))/0x8*(parseInt(_0x351f7c(0xf8))/0x9);if(_0x1f9285===_0x436b20)break;else _0x1ca78d['push'](_0x1ca78d['shift']());}catch(_0x490c64){_0x1ca78d['push'](_0x1ca78d['shift']());}}}(a5_0x4943,0x68cff));import{fileURLToPath}from'url';function a5_0x4943(){const _0x11f92b=['305220yIbBfu','859976NoxZVK','480tkQklh','data','5016717BkFYfl','49188EfwDoN','2711616Hupfws','errorMsg','8iPJfTG','228436hlNifJ','errorCode','4029774PzBFlH','../../../mock/app-list.json','success','parse','tableData'];a5_0x4943=function(){return _0x11f92b;};return a5_0x4943();}import{dirname,join}from'path';import{readFileSync}from'fs';function a5_0x5730(_0x5254e1,_0x5c5d31){_0x5254e1=_0x5254e1-0xed;const _0x494349=a5_0x4943();let _0x57301f=_0x494349[_0x5254e1];return _0x57301f;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x49901b=a5_0x5730,_0x2c9795=join(__dirname,_0x49901b(0xf0)),_0x3d5228=readFileSync(_0x2c9795,'utf-8');return JSON[_0x49901b(0xf2)](_0x3d5228);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x5a0b9d=a5_0x5730,_0xade535=getMockAppList();if(!_0xade535[_0x5a0b9d(0xf1)])throw new Error('Mock\x20API\x20error:\x20'+_0xade535[_0x5a0b9d(0xfb)]+'\x20('+_0xade535[_0x5a0b9d(0xee)]+')');return _0xade535[_0x5a0b9d(0xf7)][_0x5a0b9d(0xf3)];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1fae7b,_0x634cc0){const _0x3faad2=a6_0x233f,_0x53306d=_0x1fae7b();while(!![]){try{const _0x395c4d=parseInt(_0x3faad2(0x8a))/0x1+-parseInt(_0x3faad2(0x96))/0x2+-parseInt(_0x3faad2(0x90))/0x3+-parseInt(_0x3faad2(0x98))/0x4*(-parseInt(_0x3faad2(0x93))/0x5)+parseInt(_0x3faad2(0x8f))/0x6*(parseInt(_0x3faad2(0x8d))/0x7)+parseInt(_0x3faad2(0x99))/0x8*(-parseInt(_0x3faad2(0x94))/0x9)+parseInt(_0x3faad2(0x92))/0xa*(parseInt(_0x3faad2(0x91))/0xb);if(_0x395c4d===_0x634cc0)break;else _0x53306d['push'](_0x53306d['shift']());}catch(_0x59d5fd){_0x53306d['push'](_0x53306d['shift']());}}}(a6_0x24b3,0x9fc79));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';function a6_0x233f(_0x111f8d,_0xceef3c){_0x111f8d=_0x111f8d-0x87;const _0x24b38b=a6_0x24b3();let _0x233f07=_0x24b38b[_0x111f8d];return _0x233f07;}import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x51563b=a6_0x233f,_0x1834e1=(productEnv(_0x51563b(0x9a))||'')[_0x51563b(0x8c)]()[_0x51563b(0x89)]();return _0x1834e1===_0x51563b(0x97);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x8c027d){const _0x4d8364=a6_0x233f,{env:_0x5f3977,accessKey:_0x19aa42,localOnly:localOnly=![],noCache:noCache=![]}=_0x8c027d,_0x3def77=readCachedAppList(_0x5f3977,_0x19aa42),_0x3b167c=_0x19aa42?.[_0x4d8364(0x8c)]()?getAppCacheFilePath(_0x5f3977,_0x19aa42):null;if(localOnly)return{'items':_0x3def77?.[_0x4d8364(0x8e)]??[],'source':_0x4d8364(0x95),'fetchedAt':_0x3def77?.[_0x4d8364(0x87)]??null,'cachePath':_0x3b167c};try{const _0x327e10=await getRemoteAppItems(),_0x366db2=shouldUseMockRemoteApps()?_0x4d8364(0x97):_0x4d8364(0x88),_0x205743=new Date()[_0x4d8364(0x8b)](),_0x1a8d3a=_0x19aa42?.['trim']()?writeCachedAppList(_0x5f3977,_0x19aa42,{'env':_0x5f3977,'fetchedAt':_0x205743,'source':_0x366db2,'items':_0x327e10}):null;return{'items':_0x327e10,'source':_0x366db2,'fetchedAt':_0x205743,'cachePath':_0x1a8d3a};}catch(_0xc1d638){if(!noCache&&_0x3def77)return{'items':_0x3def77['items'],'source':_0x4d8364(0x95),'fetchedAt':_0x3def77[_0x4d8364(0x87)],'cachePath':_0x3b167c};throw _0xc1d638;}}function a6_0x24b3(){const _0x12f8f5=['2077851sCDjPV','2255GsRaSF','31840XHvGir','755WRjWKw','18CyVKXP','cache','2095070YfOBiM','mock','28216miUICU','213072mStvTK','APP_LIST_SOURCE','fetchedAt','remote','toLowerCase','239387XPFNfz','toISOString','trim','429289aYHXqn','items','48rvYPlK'];a6_0x24b3=function(){return _0x12f8f5;};return a6_0x24b3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x289e09,_0x42b695){const _0x2b0f2a=a7_0x4ebc,_0x265b0b=_0x289e09();while(!![]){try{const _0x589ba3=-parseInt(_0x2b0f2a(0x123))/0x1+-parseInt(_0x2b0f2a(0x130))/0x2+parseInt(_0x2b0f2a(0x133))/0x3*(-parseInt(_0x2b0f2a(0x125))/0x4)+-parseInt(_0x2b0f2a(0x122))/0x5*(parseInt(_0x2b0f2a(0x12b))/0x6)+-parseInt(_0x2b0f2a(0x12e))/0x7+parseInt(_0x2b0f2a(0x126))/0x8+parseInt(_0x2b0f2a(0x12c))/0x9*(parseInt(_0x2b0f2a(0x127))/0xa);if(_0x589ba3===_0x42b695)break;else _0x265b0b['push'](_0x265b0b['shift']());}catch(_0x1fe6b2){_0x265b0b['push'](_0x265b0b['shift']());}}}(a7_0x46ff,0xbf702));function a7_0x4ebc(_0x28be23,_0x3f6520){_0x28be23=_0x28be23-0x122;const _0x46fff7=a7_0x46ff();let _0x4ebcb3=_0x46fff7[_0x28be23];return _0x4ebcb3;}export function enrichAppListItemsWithMergedSelection(_0x3aed93,_0x3691bb){const _0x599cab=a7_0x4ebc;if(!_0x3691bb)return;const _0x4ee9fa=!!(_0x3691bb[_0x599cab(0x124)]??_0x3691bb['defaultApp']);for(const _0x5cf96b of _0x3aed93){_0x5cf96b['isCurrent']=![];}const _0x44d75a=_0x3691bb[_0x599cab(0x131)]!=null?String(_0x3691bb[_0x599cab(0x131)])[_0x599cab(0x129)]():'';if(_0x4ee9fa){const _0x53e555=_0x3691bb[_0x599cab(0x124)]??_0x3691bb['defaultApp'];if(_0x53e555){const _0x1e1a1f=_0x3aed93[_0x599cab(0x134)](_0x752feb=>_0x752feb[_0x599cab(0x132)]===!![]&&_0x752feb[_0x599cab(0x128)]===_0x53e555&&_0x752feb['definedIn']===_0x599cab(0x12a)),_0x440d6f=_0x1e1a1f??_0x3aed93[_0x599cab(0x134)](_0xf4b41b=>_0xf4b41b[_0x599cab(0x132)]===!![]&&_0xf4b41b[_0x599cab(0x128)]===_0x53e555);if(_0x440d6f){const _0xa2f8df=String(_0x440d6f[_0x599cab(0x12d)]??'')[_0x599cab(0x129)]();if(!_0x44d75a||_0xa2f8df===_0x44d75a){_0x440d6f[_0x599cab(0x12f)]=!![];return;}}}if(_0x44d75a){const _0x4fc777=_0x3aed93[_0x599cab(0x134)](_0xa37f9b=>String(_0xa37f9b[_0x599cab(0x12d)]??'')['trim']()===_0x44d75a);_0x4fc777&&(_0x4fc777[_0x599cab(0x12f)]=!![]);}return;}if(!_0x44d75a)return;for(const _0x15ce22 of _0x3aed93){String(_0x15ce22[_0x599cab(0x12d)]??'')['trim']()===_0x44d75a&&(_0x15ce22[_0x599cab(0x12f)]=!![]);}}function a7_0x46ff(){const _0x616eaa=['27xxPPxO','appcode','2648646BYjNYG','isCurrent','35354evdgAw','appCode','named','682113mILzKn','find','8495VNrsqK','746878VnZucl','currentApp','4BEETNR','4898696FOmNoF','9008380RSIPWa','name','trim','local','4098TXLMem'];a7_0x46ff=function(){return _0x616eaa;};return a7_0x46ff();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a8_0x5e7947=a8_0x2bf9;(function(_0x165fd6,_0x5e2a8f){const _0x231565=a8_0x2bf9,_0x16ca2e=_0x165fd6();while(!![]){try{const _0x2e5cfe=parseInt(_0x231565(0xbc))/0x1+parseInt(_0x231565(0xc2))/0x2+parseInt(_0x231565(0xbf))/0x3+-parseInt(_0x231565(0xc7))/0x4+-parseInt(_0x231565(0xb9))/0x5+-parseInt(_0x231565(0xc0))/0x6*(-parseInt(_0x231565(0xbe))/0x7)+parseInt(_0x231565(0xba))/0x8;if(_0x2e5cfe===_0x5e2a8f)break;else _0x16ca2e['push'](_0x16ca2e['shift']());}catch(_0x5c119a){_0x16ca2e['push'](_0x16ca2e['shift']());}}}(a8_0x5fe7,0xd2a9f));function a8_0x2bf9(_0x26cb16,_0xc8c352){_0x26cb16=_0x26cb16-0xb9;const _0x5fe771=a8_0x5fe7();let _0x2bf9ee=_0x5fe771[_0x26cb16];return _0x2bf9ee;}import{getRuntimeAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const appConfigGet={'service':'app-config','command':a8_0x5e7947(0xcb),'description':a8_0x5e7947(0xc1),'risk':'read','args':[{'name':'key','description':a8_0x5e7947(0xca),'required':!![]}],'flags':[],async 'execute'(_0x18e739){const _0x12f08d=a8_0x5e7947,_0x4b9c34=_0x18e739[_0x12f08d(0xc9)][0x0]?.[_0x12f08d(0xc5)]();if(!_0x4b9c34)throw CliErrors[_0x12f08d(0xc6)](_0x12f08d(0xc4),_0x12f08d(0xc3)+CLI_BIN_NAME+'\x20app-config\x20get\x20<key>');try{const _0x1768fe=await getRuntimeAppConfigByKey(_0x18e739[_0x12f08d(0xbd)],_0x4b9c34);return{'ok':!![],'data':_0x1768fe};}catch{throw CliErrors[_0x12f08d(0xcc)]('Unable\x20to\x20get\x20app-config\x20value:\x20key='+_0x4b9c34+_0x12f08d(0xbb)+_0x18e739['appCode'],_0x12f08d(0xc8));}}};function a8_0x5fe7(){const _0x111b00=['7575540yQoPKF','8337304jVvfJa',',\x20appCode=','370023sKCKwk','appCode','118538JYcSPS','405006jWGjKl','18GdSJHL','Get\x20one\x20runtime\x20app-config\x20value\x20by\x20key','2429682bGZIDV','Usage:\x20','Missing\x20app-config\x20key.','trim','validation','1739376tVFLxG','Check\x20that\x20the\x20key\x20exists,\x20the\x20current\x20AccessKey\x20has\x20permission,\x20and\x20the\x20runtime\x20app-config\x20endpoint\x20is\x20available.','args','App\x20config\x20key','get','apiError'];a8_0x5fe7=function(){return _0x111b00;};return a8_0x5fe7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x518300,_0x17dee1){const _0x44f924=a9_0x18c2,_0x672261=_0x518300();while(!![]){try{const _0x4f7bc5=parseInt(_0x44f924(0x1cc))/0x1+parseInt(_0x44f924(0x1ce))/0x2*(-parseInt(_0x44f924(0x1cd))/0x3)+parseInt(_0x44f924(0x1ca))/0x4+parseInt(_0x44f924(0x1cf))/0x5+-parseInt(_0x44f924(0x1c9))/0x6+parseInt(_0x44f924(0x1cb))/0x7*(-parseInt(_0x44f924(0x1c7))/0x8)+-parseInt(_0x44f924(0x1c8))/0x9;if(_0x4f7bc5===_0x17dee1)break;else _0x672261['push'](_0x672261['shift']());}catch(_0x2709d5){_0x672261['push'](_0x672261['shift']());}}}(a9_0x3196,0xec193));function a9_0x18c2(_0x3026ed,_0x359b6b){_0x3026ed=_0x3026ed-0x1c7;const _0x319617=a9_0x3196();let _0x18c215=_0x319617[_0x3026ed];return _0x18c215;}import{appConfigGet}from'../../commands/app-config/get.js';export const appConfigDefinitions=[appConfigGet];function a9_0x3196(){const _0x460085=['14pyxaLP','751185vKMTHg','3FykirW','958676rlwNuN','7488290HkIfzl','1215472DWcpZh','3508092gHeolr','2733474YstQhD','1387156VWmrgQ'];a9_0x3196=function(){return _0x460085;};return a9_0x3196();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a10_0x392989=a10_0x3924;(function(_0x359953,_0x14d448){const _0x4d8d6a=a10_0x3924,_0x2fa37a=_0x359953();while(!![]){try{const _0x39a567=parseInt(_0x4d8d6a(0x163))/0x1+-parseInt(_0x4d8d6a(0x169))/0x2*(parseInt(_0x4d8d6a(0x179))/0x3)+parseInt(_0x4d8d6a(0x14b))/0x4*(-parseInt(_0x4d8d6a(0x166))/0x5)+-parseInt(_0x4d8d6a(0x189))/0x6+-parseInt(_0x4d8d6a(0x156))/0x7*(parseInt(_0x4d8d6a(0x154))/0x8)+-parseInt(_0x4d8d6a(0x152))/0x9*(-parseInt(_0x4d8d6a(0x182))/0xa)+parseInt(_0x4d8d6a(0x17c))/0xb;if(_0x39a567===_0x14d448)break;else _0x2fa37a['push'](_0x2fa37a['shift']());}catch(_0x1ccb59){_0x2fa37a['push'](_0x2fa37a['shift']());}}}(a10_0x358e,0xead63));import{readFileSync}from'node:fs';import{resolve}from'node:path';import{approveApprovalTask,getApprovalTaskDetail,listApprovalTodo,transferApprovalTask}from'../../core/api-client.js';function a10_0x3924(_0x3bb9fa,_0x264686){_0x3bb9fa=_0x3bb9fa-0x14a;const _0x358e68=a10_0x358e();let _0x3924aa=_0x358e68[_0x3bb9fa];return _0x3924aa;}import{CliErrors}from'../../errors.js';import{dryRun as a10_0x32c8a8}from'../../framework/dryrun.js';import{redactSensitiveValue}from'../../utils/redaction.js';import{parseLosslessJson}from'../../utils/lossless-json.js';const APP_CODE_FLAG={'name':a10_0x392989(0x17b),'type':a10_0x392989(0x173),'description':a10_0x392989(0x187)},PAGE_FLAG={'name':'page','type':a10_0x392989(0x14e),'default':0x1,'description':a10_0x392989(0x17d)},PAGE_SIZE_FLAG={'name':a10_0x392989(0x14f),'type':a10_0x392989(0x14e),'default':0x14,'description':a10_0x392989(0x160)},TASK_ID_FLAG={'name':a10_0x392989(0x15f),'type':a10_0x392989(0x173),'required':!![],'description':a10_0x392989(0x164)},COMMENT_FLAG={'name':'comment','type':a10_0x392989(0x173),'description':a10_0x392989(0x176)},VARIABLES_FLAG={'name':a10_0x392989(0x168),'type':a10_0x392989(0x173),'description':a10_0x392989(0x161)},TARGET_USER_ID_FLAG={'name':'target-user-id','type':a10_0x392989(0x173),'required':!![],'description':a10_0x392989(0x174)};function requireApprovalAppCode(_0x2edc72){const _0x2bd3f3=a10_0x392989,_0x28161b=(_0x2edc72[_0x2bd3f3(0x183)](_0x2bd3f3(0x17b))||_0x2edc72['mergedCli']?.[_0x2bd3f3(0x181)]||_0x2edc72[_0x2bd3f3(0x181)]||'')[_0x2bd3f3(0x180)]();if(!_0x28161b)throw CliErrors[_0x2bd3f3(0x16f)](_0x2bd3f3(0x170));return _0x28161b;}function a10_0x358e(){const _0x1d83e1=['transfer','startsWith','isSafeInteger','Application\x20code\x20(falls\x20back\x20to\x20the\x20active\x20workspace\x20app)','/client/flow/approve','9653256dPvHSs','approve','44vHfqSt','read','--page\x20must\x20be\x20a\x20positive\x20integer.','number','page-size','high-risk-write','Preview:\x20transfer\x20an\x20approval\x20task','45wXUTIq','taskId','1032PizLxI','Unable\x20to\x20read\x20--variables\x20file.','91238MNcBkJ','Approves\x20the\x20pending\x20Runtime\x20task\x20and\x20advances\x20its\x20workflow.\x20This\x20action\x20may\x20trigger\x20downstream\x20nodes\x20and\x20business\x20side\x20effects.','Approve\x20a\x20pending\x20Runtime\x20task','Preview:\x20approve\x20an\x20approval\x20task','Transferred\x20approval\x20task\x20','Approved\x20approval\x20task\x20','todo','target-user-id','Show\x20an\x20approval\x20task\x20and\x20its\x20current\x20handling\x20permissions','task-id','Number\x20of\x20todo\x20records\x20per\x20page','Workflow\x20variables\x20as\x20JSON\x20or\x20@path/to/variables.json','--variables\x20@file\x20path\x20must\x20not\x20be\x20blank.','248866CPmYJp','Runtime\x20approval\x20task\x20ID','description','459205aBMXLi','approval','variables','43986wXLXUA','task-detail','num','POST','Transfers\x20the\x20pending\x20Runtime\x20task\x20to\x20the\x20selected\x20eligible\x20user.\x20The\x20current\x20handler\x20may\x20lose\x20permission\x20to\x20process\x20the\x20task.','build','configMissing','Set\x20--app-code,\x20--appcode,\x20or\x20an\x20active\x20app\x20in\x20the\x20workspace\x20configuration.','--page-size\x20must\x20be\x20a\x20positive\x20integer.','page','string','Target\x20user\x20ID\x20selected\x20from\x20Runtime\x20transfer\x20candidates','List\x20the\x20current\x20user\x27s\x20approval\x20todo\x20tasks','Approval\x20or\x20transfer\x20comment','body','utf8','117KglNyS','comment','app-code','46963180rovQYH','One-based\x20todo\x20page\x20number','validation','Rejects\x20the\x20pending\x20Runtime\x20task\x20and\x20applies\x20the\x20workflow\x20rejection\x20path.\x20This\x20action\x20may\x20end\x20the\x20workflow\x20or\x20trigger\x20downstream\x20business\x20side\x20effects.','trim','appCode','3203770diRkER','str'];a10_0x358e=function(){return _0x1d83e1;};return a10_0x358e();}function requireTaskId(_0x3f8182){const _0x12614f=a10_0x392989,_0x4be02c=_0x3f8182[_0x12614f(0x183)](_0x12614f(0x15f))[_0x12614f(0x180)]();if(!_0x4be02c)throw CliErrors[_0x12614f(0x17e)]('--task-id\x20must\x20not\x20be\x20blank.');return _0x4be02c;}function validatePage(_0x3a1688){const _0x4a522e=a10_0x392989,_0xf18e0b=_0x3a1688[_0x4a522e(0x16b)]('page',0x1),_0x13afb8=_0x3a1688[_0x4a522e(0x16b)](_0x4a522e(0x14f),0x14);if(!Number[_0x4a522e(0x186)](_0xf18e0b)||_0xf18e0b<0x1)throw CliErrors['validation'](_0x4a522e(0x14d));if(!Number[_0x4a522e(0x186)](_0x13afb8)||_0x13afb8<0x1)throw CliErrors['validation'](_0x4a522e(0x171));}function readVariables(_0xd58916){const _0x38d8e2=a10_0x392989,_0x479223=_0xd58916['str'](_0x38d8e2(0x168))[_0x38d8e2(0x180)]();if(!_0x479223)return undefined;let _0x4f1ee7=_0x479223;if(_0x479223[_0x38d8e2(0x185)]('@')){const _0x4d7945=_0x479223['slice'](0x1)[_0x38d8e2(0x180)]();if(!_0x4d7945)throw CliErrors[_0x38d8e2(0x17e)](_0x38d8e2(0x162));try{_0x4f1ee7=readFileSync(resolve(_0x4d7945),_0x38d8e2(0x178));}catch{throw CliErrors[_0x38d8e2(0x17e)](_0x38d8e2(0x155));}}let _0x34ff4e;try{_0x34ff4e=parseLosslessJson(_0x4f1ee7);}catch{throw CliErrors[_0x38d8e2(0x17e)]('--variables\x20must\x20contain\x20valid\x20JSON.');}if(!_0x34ff4e||typeof _0x34ff4e!=='object'||Array['isArray'](_0x34ff4e))throw CliErrors[_0x38d8e2(0x17e)]('--variables\x20must\x20be\x20a\x20JSON\x20object.');return _0x34ff4e;}function approvalBody(_0x4dcbee,_0x9c500){const _0xe0a37e=a10_0x392989,_0x29ce0e={'appCode':requireApprovalAppCode(_0x4dcbee),'taskId':requireTaskId(_0x4dcbee),'approved':_0x9c500},_0x5f0be3=_0x4dcbee['str'](_0xe0a37e(0x17a)),_0x327f59=readVariables(_0x4dcbee);if(_0x5f0be3)_0x29ce0e[_0xe0a37e(0x17a)]=_0x5f0be3;if(_0x327f59!==undefined)_0x29ce0e[_0xe0a37e(0x168)]=_0x327f59;return _0x29ce0e;}function transferBody(_0x49064c){const _0x4bc66d=a10_0x392989,_0x28e16f=requireTaskId(_0x49064c),_0x133e5f=_0x49064c[_0x4bc66d(0x183)](_0x4bc66d(0x15d))[_0x4bc66d(0x180)]();if(!_0x133e5f)throw CliErrors[_0x4bc66d(0x17e)]('--target-user-id\x20must\x20not\x20be\x20blank.');const _0x362eca={'appCode':requireApprovalAppCode(_0x49064c),'taskId':_0x28e16f,'targetUserId':_0x133e5f},_0x1c17dc=_0x49064c[_0x4bc66d(0x183)](_0x4bc66d(0x17a));if(_0x1c17dc)_0x362eca[_0x4bc66d(0x17a)]=_0x1c17dc;return _0x362eca;}function sanitized(_0x4f3246){return redactSensitiveValue(_0x4f3246);}const approvalTodo={'service':a10_0x392989(0x167),'command':a10_0x392989(0x15c),'description':a10_0x392989(0x175),'risk':a10_0x392989(0x14c),'requiresAppCode':![],'flags':[APP_CODE_FLAG,PAGE_FLAG,PAGE_SIZE_FLAG],async 'validate'(_0x41a6aa){requireApprovalAppCode(_0x41a6aa),validatePage(_0x41a6aa);},async 'execute'(_0x1357d0){const _0x3bcacf=a10_0x392989,_0x11fdc0=requireApprovalAppCode(_0x1357d0),_0xaab460=await listApprovalTodo(_0x11fdc0,_0x1357d0[_0x3bcacf(0x16b)](_0x3bcacf(0x172),0x1),_0x1357d0[_0x3bcacf(0x16b)](_0x3bcacf(0x14f),0x14));return{'ok':!![],'data':sanitized(_0xaab460)};}},approvalTaskDetail={'service':a10_0x392989(0x167),'command':a10_0x392989(0x16a),'description':a10_0x392989(0x15e),'risk':'read','requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG],async 'validate'(_0x5b1e13){requireApprovalAppCode(_0x5b1e13),requireTaskId(_0x5b1e13);},async 'execute'(_0x1e1985){const _0x2ed33e=requireTaskId(_0x1e1985),_0x29186d=await getApprovalTaskDetail(_0x2ed33e,requireApprovalAppCode(_0x1e1985));return{'ok':!![],'data':sanitized(_0x29186d)};}},approvalApprove={'service':a10_0x392989(0x167),'command':a10_0x392989(0x14a),'description':a10_0x392989(0x158),'risk':a10_0x392989(0x150),'confirmationDescription':a10_0x392989(0x157),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,COMMENT_FLAG,VARIABLES_FLAG],async 'validate'(_0x19da74){approvalBody(_0x19da74,!![]);},async 'execute'(_0x1e58c4){const _0x49cd8c=a10_0x392989,_0x52595b=approvalBody(_0x1e58c4,!![]),_0x4da2ee=await approveApprovalTask(_0x52595b);return{'ok':!![],'data':sanitized(_0x4da2ee),'message':_0x49cd8c(0x15b)+_0x52595b[_0x49cd8c(0x153)]};},async 'dryRun'(_0x184724){const _0x1ce7ee=a10_0x392989,_0x586e7c=approvalBody(_0x184724,!![]);return a10_0x32c8a8(_0x1ce7ee(0x16c),_0x1ce7ee(0x188))[_0x1ce7ee(0x177)](sanitized(_0x586e7c))[_0x1ce7ee(0x165)](_0x1ce7ee(0x159))[_0x1ce7ee(0x16e)]();}},approvalReject={'service':a10_0x392989(0x167),'command':'reject','description':'Reject\x20a\x20pending\x20Runtime\x20task','risk':a10_0x392989(0x150),'confirmationDescription':a10_0x392989(0x17f),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,COMMENT_FLAG,VARIABLES_FLAG],async 'validate'(_0x42088f){approvalBody(_0x42088f,![]);},async 'execute'(_0x5c6dff){const _0x55a3ff=a10_0x392989,_0x39541c=approvalBody(_0x5c6dff,![]),_0x5e3eca=await approveApprovalTask(_0x39541c);return{'ok':!![],'data':sanitized(_0x5e3eca),'message':'Rejected\x20approval\x20task\x20'+_0x39541c[_0x55a3ff(0x153)]};},async 'dryRun'(_0x132770){const _0x193004=a10_0x392989,_0x21447a=approvalBody(_0x132770,![]);return a10_0x32c8a8(_0x193004(0x16c),'/client/flow/approve')[_0x193004(0x177)](sanitized(_0x21447a))[_0x193004(0x165)]('Preview:\x20reject\x20an\x20approval\x20task')[_0x193004(0x16e)]();}},approvalTransfer={'service':a10_0x392989(0x167),'command':a10_0x392989(0x184),'description':'Transfer\x20a\x20pending\x20Runtime\x20task\x20to\x20an\x20allowed\x20user','risk':a10_0x392989(0x150),'confirmationDescription':a10_0x392989(0x16d),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,TARGET_USER_ID_FLAG,COMMENT_FLAG],async 'validate'(_0x873bed){transferBody(_0x873bed);},async 'execute'(_0x28eb1b){const _0x2dd810=a10_0x392989,_0x4814ec=transferBody(_0x28eb1b),_0x3eba3f=await transferApprovalTask(_0x4814ec);return{'ok':!![],'data':sanitized(_0x3eba3f),'message':_0x2dd810(0x15a)+_0x4814ec['taskId']};},async 'dryRun'(_0x77f23e){const _0x26287f=a10_0x392989,_0x46b002=transferBody(_0x77f23e);return a10_0x32c8a8(_0x26287f(0x16c),'/client/flow/task/transfer')['body'](sanitized(_0x46b002))['description'](_0x26287f(0x151))['build']();}};export const approvalDefinitions=[approvalTodo,approvalTaskDetail,approvalApprove,approvalReject,approvalTransfer];export{approvalApprove,approvalReject,approvalTaskDetail,approvalTodo,approvalTransfer};
|
|
1
|
+
const a10_0x52282e=a10_0x5147;(function(_0x5cda35,_0x4f5440){const _0x3ade57=a10_0x5147,_0x2c6e7e=_0x5cda35();while(!![]){try{const _0x312f3c=parseInt(_0x3ade57(0xde))/0x1*(-parseInt(_0x3ade57(0xeb))/0x2)+-parseInt(_0x3ade57(0xf7))/0x3*(-parseInt(_0x3ade57(0xdc))/0x4)+parseInt(_0x3ade57(0xf0))/0x5+parseInt(_0x3ade57(0xe0))/0x6*(parseInt(_0x3ade57(0x104))/0x7)+-parseInt(_0x3ade57(0xe6))/0x8*(-parseInt(_0x3ade57(0xdb))/0x9)+-parseInt(_0x3ade57(0x109))/0xa+-parseInt(_0x3ade57(0xf6))/0xb;if(_0x312f3c===_0x4f5440)break;else _0x2c6e7e['push'](_0x2c6e7e['shift']());}catch(_0x5cc6e8){_0x2c6e7e['push'](_0x2c6e7e['shift']());}}}(a10_0x4f9f,0xc53ae));import{readFileSync}from'node:fs';import{resolve}from'node:path';import{approveApprovalTask,getApprovalTaskDetail,listApprovalTodo,transferApprovalTask}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun as a10_0x1f408d}from'../../framework/dryrun.js';import{redactSensitiveValue}from'../../utils/redaction.js';import{parseLosslessJson}from'../../utils/lossless-json.js';const APP_CODE_FLAG={'name':a10_0x52282e(0x114),'type':a10_0x52282e(0x10a),'description':'Application\x20code\x20(falls\x20back\x20to\x20the\x20active\x20workspace\x20app)'},PAGE_FLAG={'name':a10_0x52282e(0xef),'type':'number','default':0x1,'description':a10_0x52282e(0x101)},PAGE_SIZE_FLAG={'name':a10_0x52282e(0x115),'type':a10_0x52282e(0xf4),'default':0x14,'description':a10_0x52282e(0xd9)},TASK_ID_FLAG={'name':a10_0x52282e(0x119),'type':'string','required':!![],'description':a10_0x52282e(0xfc)},COMMENT_FLAG={'name':a10_0x52282e(0x105),'type':a10_0x52282e(0x10a),'description':a10_0x52282e(0x100)},VARIABLES_FLAG={'name':'variables','type':a10_0x52282e(0x10a),'description':a10_0x52282e(0x10d)},TARGET_USER_ID_FLAG={'name':a10_0x52282e(0x113),'type':a10_0x52282e(0x10a),'required':!![],'description':a10_0x52282e(0xf1)};function requireApprovalAppCode(_0x2c267e){const _0x568ff6=a10_0x52282e,_0x30682e=(_0x2c267e[_0x568ff6(0xf9)]('app-code')||_0x2c267e[_0x568ff6(0x10c)]?.[_0x568ff6(0x108)]||_0x2c267e[_0x568ff6(0x108)]||'')[_0x568ff6(0xf2)]();if(!_0x30682e)throw CliErrors[_0x568ff6(0xdf)](_0x568ff6(0xe4));return _0x30682e;}function requireTaskId(_0x8c9883){const _0xcb17b0=a10_0x52282e,_0x6951b=_0x8c9883[_0xcb17b0(0xf9)](_0xcb17b0(0x119))[_0xcb17b0(0xf2)]();if(!_0x6951b)throw CliErrors[_0xcb17b0(0x10b)](_0xcb17b0(0xfe));return _0x6951b;}function validatePage(_0x409c39){const _0x182b70=a10_0x52282e,_0xbc2c94=_0x409c39['num'](_0x182b70(0xef),0x1),_0x25b5b4=_0x409c39[_0x182b70(0xfa)]('page-size',0x14);if(!Number[_0x182b70(0x112)](_0xbc2c94)||_0xbc2c94<0x1)throw CliErrors[_0x182b70(0x10b)](_0x182b70(0x117));if(!Number['isSafeInteger'](_0x25b5b4)||_0x25b5b4<0x1)throw CliErrors['validation'](_0x182b70(0xf5));}function readVariables(_0x42f737){const _0x3b949b=a10_0x52282e,_0x382fba=_0x42f737[_0x3b949b(0xf9)]('variables')[_0x3b949b(0xf2)]();if(!_0x382fba)return undefined;let _0x4b94c0=_0x382fba;if(_0x382fba['startsWith']('@')){const _0x56ec31=_0x382fba['slice'](0x1)[_0x3b949b(0xf2)]();if(!_0x56ec31)throw CliErrors[_0x3b949b(0x10b)](_0x3b949b(0xd8));try{_0x4b94c0=readFileSync(resolve(_0x56ec31),'utf8');}catch{throw CliErrors[_0x3b949b(0x10b)](_0x3b949b(0xda));}}let _0x4fc640;try{_0x4fc640=parseLosslessJson(_0x4b94c0);}catch{throw CliErrors[_0x3b949b(0x10b)](_0x3b949b(0xe9));}if(!_0x4fc640||typeof _0x4fc640!==_0x3b949b(0x11c)||Array[_0x3b949b(0xd7)](_0x4fc640))throw CliErrors[_0x3b949b(0x10b)](_0x3b949b(0xe5));return _0x4fc640;}function a10_0x5147(_0x2d3f45,_0x3a7f45){_0x2d3f45=_0x2d3f45-0xd7;const _0x4f9f8c=a10_0x4f9f();let _0x51476f=_0x4f9f8c[_0x2d3f45];return _0x51476f;}function a10_0x4f9f(){const _0x2ea1da=['high-risk-write','isSafeInteger','target-user-id','app-code','page-size','Transfers\x20the\x20pending\x20Runtime\x20task\x20to\x20the\x20selected\x20eligible\x20user.\x20The\x20current\x20handler\x20may\x20lose\x20permission\x20to\x20process\x20the\x20task.','--page\x20must\x20be\x20a\x20positive\x20integer.','read','task-id','Transfer\x20a\x20pending\x20Runtime\x20task\x20to\x20an\x20allowed\x20user','POST','object','isArray','--variables\x20@file\x20path\x20must\x20not\x20be\x20blank.','Number\x20of\x20todo\x20records\x20per\x20page','Unable\x20to\x20read\x20--variables\x20file.','1777932IJGrwo','2653720qsnzin','Transferred\x20approval\x20task\x20','1383827JRnUTs','configMissing','9642rOeVdb','approve','Show\x20an\x20approval\x20task\x20and\x20its\x20current\x20handling\x20permissions','reject','Set\x20--app-code,\x20--appcode,\x20or\x20an\x20active\x20app\x20in\x20the\x20workspace\x20configuration.','--variables\x20must\x20be\x20a\x20JSON\x20object.','48jZzdCX','build','Preview:\x20approve\x20an\x20approval\x20task','--variables\x20must\x20contain\x20valid\x20JSON.','variables','2OVfBDl','body','todo','List\x20the\x20current\x20user\x27s\x20approval\x20todo\x20tasks','page','396630QhhLCo','Target\x20user\x20ID\x20selected\x20from\x20Runtime\x20transfer\x20candidates','trim','task-detail','number','--page-size\x20must\x20be\x20a\x20positive\x20integer.','3929453ZiyEzi','3bDnctP','Rejects\x20the\x20pending\x20Runtime\x20task\x20and\x20applies\x20the\x20workflow\x20rejection\x20path.\x20This\x20action\x20may\x20end\x20the\x20workflow\x20or\x20trigger\x20downstream\x20business\x20side\x20effects.','str','num','Preview:\x20transfer\x20an\x20approval\x20task','Runtime\x20approval\x20task\x20ID','Approves\x20the\x20pending\x20Runtime\x20task\x20and\x20advances\x20its\x20workflow.\x20This\x20action\x20may\x20trigger\x20downstream\x20nodes\x20and\x20business\x20side\x20effects.','--task-id\x20must\x20not\x20be\x20blank.','approval','Approval\x20or\x20transfer\x20comment','One-based\x20todo\x20page\x20number','taskId','Reject\x20a\x20pending\x20Runtime\x20task','6097IRvIzJ','comment','/client/flow/approve','Approve\x20a\x20pending\x20Runtime\x20task','appCode','7788370JREIGK','string','validation','mergedCli','Workflow\x20variables\x20as\x20JSON\x20or\x20@path/to/variables.json','description','--target-user-id\x20must\x20not\x20be\x20blank.','Approved\x20approval\x20task\x20'];a10_0x4f9f=function(){return _0x2ea1da;};return a10_0x4f9f();}function approvalBody(_0xdebe2c,_0x1e44f6){const _0x5ad7fe=a10_0x52282e,_0x127820={'appCode':requireApprovalAppCode(_0xdebe2c),'taskId':requireTaskId(_0xdebe2c),'approved':_0x1e44f6},_0x45678d=_0xdebe2c[_0x5ad7fe(0xf9)]('comment'),_0x9ab9f1=readVariables(_0xdebe2c);if(_0x45678d)_0x127820[_0x5ad7fe(0x105)]=_0x45678d;if(_0x9ab9f1!==undefined)_0x127820[_0x5ad7fe(0xea)]=_0x9ab9f1;return _0x127820;}function transferBody(_0x4111dc){const _0xcc5c3=a10_0x52282e,_0x1f00f6=requireTaskId(_0x4111dc),_0x52ce6b=_0x4111dc[_0xcc5c3(0xf9)]('target-user-id')[_0xcc5c3(0xf2)]();if(!_0x52ce6b)throw CliErrors['validation'](_0xcc5c3(0x10f));const _0x2283f8={'appCode':requireApprovalAppCode(_0x4111dc),'taskId':_0x1f00f6,'targetUserId':_0x52ce6b},_0x303a87=_0x4111dc[_0xcc5c3(0xf9)](_0xcc5c3(0x105));if(_0x303a87)_0x2283f8[_0xcc5c3(0x105)]=_0x303a87;return _0x2283f8;}function sanitized(_0x725659){return redactSensitiveValue(_0x725659);}const approvalTodo={'service':'approval','command':a10_0x52282e(0xed),'description':a10_0x52282e(0xee),'risk':a10_0x52282e(0x118),'requiresAppCode':![],'flags':[APP_CODE_FLAG,PAGE_FLAG,PAGE_SIZE_FLAG],async 'validate'(_0xa3e452){requireApprovalAppCode(_0xa3e452),validatePage(_0xa3e452);},async 'execute'(_0x520f9d){const _0x33a02f=a10_0x52282e,_0x470ad7=requireApprovalAppCode(_0x520f9d),_0x48709e=await listApprovalTodo(_0x470ad7,_0x520f9d[_0x33a02f(0xfa)](_0x33a02f(0xef),0x1),_0x520f9d[_0x33a02f(0xfa)](_0x33a02f(0x115),0x14));return{'ok':!![],'data':sanitized(_0x48709e)};}},approvalTaskDetail={'service':a10_0x52282e(0xff),'command':a10_0x52282e(0xf3),'description':a10_0x52282e(0xe2),'risk':'read','requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG],async 'validate'(_0x3145e6){requireApprovalAppCode(_0x3145e6),requireTaskId(_0x3145e6);},async 'execute'(_0x190733){const _0x4ee851=requireTaskId(_0x190733),_0x3531d2=await getApprovalTaskDetail(_0x4ee851,requireApprovalAppCode(_0x190733));return{'ok':!![],'data':sanitized(_0x3531d2)};}},approvalApprove={'service':a10_0x52282e(0xff),'command':a10_0x52282e(0xe1),'description':a10_0x52282e(0x107),'risk':a10_0x52282e(0x111),'confirmationDescription':a10_0x52282e(0xfd),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,COMMENT_FLAG,VARIABLES_FLAG],async 'validate'(_0x46a3de){approvalBody(_0x46a3de,!![]);},async 'execute'(_0x3ebce5){const _0x2aebaa=a10_0x52282e,_0x165602=approvalBody(_0x3ebce5,!![]),_0xd88805=await approveApprovalTask(_0x165602);return{'ok':!![],'data':sanitized(_0xd88805),'message':_0x2aebaa(0x110)+_0x165602['taskId']};},async 'dryRun'(_0x5bdb03){const _0x4ffdaa=a10_0x52282e,_0x34116d=approvalBody(_0x5bdb03,!![]);return a10_0x1f408d(_0x4ffdaa(0x11b),_0x4ffdaa(0x106))[_0x4ffdaa(0xec)](sanitized(_0x34116d))[_0x4ffdaa(0x10e)](_0x4ffdaa(0xe8))[_0x4ffdaa(0xe7)]();}},approvalReject={'service':'approval','command':a10_0x52282e(0xe3),'description':a10_0x52282e(0x103),'risk':a10_0x52282e(0x111),'confirmationDescription':a10_0x52282e(0xf8),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,COMMENT_FLAG,VARIABLES_FLAG],async 'validate'(_0x241c3d){approvalBody(_0x241c3d,![]);},async 'execute'(_0x450ac5){const _0x11b639=a10_0x52282e,_0x3683fa=approvalBody(_0x450ac5,![]),_0x4895f9=await approveApprovalTask(_0x3683fa);return{'ok':!![],'data':sanitized(_0x4895f9),'message':'Rejected\x20approval\x20task\x20'+_0x3683fa[_0x11b639(0x102)]};},async 'dryRun'(_0x5ae21a){const _0x3e9b5e=a10_0x52282e,_0x5c6599=approvalBody(_0x5ae21a,![]);return a10_0x1f408d(_0x3e9b5e(0x11b),_0x3e9b5e(0x106))[_0x3e9b5e(0xec)](sanitized(_0x5c6599))[_0x3e9b5e(0x10e)]('Preview:\x20reject\x20an\x20approval\x20task')[_0x3e9b5e(0xe7)]();}},approvalTransfer={'service':a10_0x52282e(0xff),'command':'transfer','description':a10_0x52282e(0x11a),'risk':a10_0x52282e(0x111),'confirmationDescription':a10_0x52282e(0x116),'requiresAppCode':![],'flags':[APP_CODE_FLAG,TASK_ID_FLAG,TARGET_USER_ID_FLAG,COMMENT_FLAG],async 'validate'(_0x43f301){transferBody(_0x43f301);},async 'execute'(_0x234489){const _0x4889de=a10_0x52282e,_0x5d6c51=transferBody(_0x234489),_0x10a273=await transferApprovalTask(_0x5d6c51);return{'ok':!![],'data':sanitized(_0x10a273),'message':_0x4889de(0xdd)+_0x5d6c51['taskId']};},async 'dryRun'(_0x3cd899){const _0x39ec67=a10_0x52282e,_0x59dcb8=transferBody(_0x3cd899);return a10_0x1f408d(_0x39ec67(0x11b),'/client/flow/task/transfer')[_0x39ec67(0xec)](sanitized(_0x59dcb8))[_0x39ec67(0x10e)](_0x39ec67(0xfb))[_0x39ec67(0xe7)]();}};export const approvalDefinitions=[approvalTodo,approvalTaskDetail,approvalApprove,approvalReject,approvalTransfer];export{approvalApprove,approvalReject,approvalTaskDetail,approvalTodo,approvalTransfer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a11_0x244d5d=a11_0x1d3e;(function(_0x2d6f33,_0x158d88){const _0xaab3d3=a11_0x1d3e,_0x2cdf99=_0x2d6f33();while(!![]){try{const _0x4f074e=-parseInt(_0xaab3d3(0x1f5))/0x1*(-parseInt(_0xaab3d3(0x20f))/0x2)+-parseInt(_0xaab3d3(0x21c))/0x3+parseInt(_0xaab3d3(0x1ec))/0x4+-parseInt(_0xaab3d3(0x20a))/0x5*(-parseInt(_0xaab3d3(0x1f2))/0x6)+-parseInt(_0xaab3d3(0x219))/0x7*(parseInt(_0xaab3d3(0x215))/0x8)+-parseInt(_0xaab3d3(0x1f9))/0x9+-parseInt(_0xaab3d3(0x209))/0xa*(-parseInt(_0xaab3d3(0x1e0))/0xb);if(_0x4f074e===_0x158d88)break;else _0x2cdf99['push'](_0x2cdf99['shift']());}catch(_0x25aac0){_0x2cdf99['push'](_0x2cdf99['shift']());}}}(a11_0x50ff,0xd6099));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=a11_0x244d5d(0x1ee),ARTIFACT_SOURCE_AGENT=a11_0x244d5d(0x1f0),ALLOWED_REACT_MODULE_IMPORTS=[a11_0x244d5d(0x20c),a11_0x244d5d(0x1e1),a11_0x244d5d(0x213),a11_0x244d5d(0x1ed),a11_0x244d5d(0x22a),a11_0x244d5d(0x200)];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':a11_0x244d5d(0x205),'required':!![],'description':a11_0x244d5d(0x21f)},ARTIFACT_NAME_FLAG={'name':a11_0x244d5d(0x1fa),'type':'string','description':a11_0x244d5d(0x1ea)},METADATA_FLAG={'name':a11_0x244d5d(0x229),'type':a11_0x244d5d(0x205),'description':'Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped'};function isPlainObject(_0x4c45c9){return typeof _0x4c45c9==='object'&&_0x4c45c9!==null&&!Array['isArray'](_0x4c45c9);}function readSourceFile(_0x27d96d){const _0x4b4e85=a11_0x244d5d;if(!_0x27d96d)throw CliErrors[_0x4b4e85(0x228)](_0x4b4e85(0x220));if(!existsSync(_0x27d96d))throw CliErrors[_0x4b4e85(0x228)](_0x4b4e85(0x226)+_0x27d96d);if(!statSync(_0x27d96d)['isFile']())throw CliErrors['validation'](_0x4b4e85(0x1e8)+_0x27d96d);const _0x2f96fc=readFileSync(_0x27d96d,_0x4b4e85(0x1e7));return validateReactModuleSource(_0x2f96fc),_0x2f96fc;}function parseMetadata(_0x2c82a4){const _0x3b9b63=a11_0x244d5d;if(!_0x2c82a4)return undefined;let _0x2f9cac;try{_0x2f9cac=JSON[_0x3b9b63(0x1dd)](_0x2c82a4);}catch{throw CliErrors[_0x3b9b63(0x228)]('Invalid\x20JSON\x20for\x20--metadata:\x20'+_0x2c82a4);}if(!isPlainObject(_0x2f9cac))throw CliErrors[_0x3b9b63(0x228)](_0x3b9b63(0x1e4));const _0x170d4c={..._0x2f9cac};return delete _0x170d4c[_0x3b9b63(0x223)],_0x170d4c;}function getPackageName(_0x2e1a41){const _0xb79bc8=a11_0x244d5d;if(_0x2e1a41[_0xb79bc8(0x227)]('@')){const [_0x163189,_0x397541]=_0x2e1a41[_0xb79bc8(0x1e2)]('/');return _0x163189&&_0x397541?_0x163189+'/'+_0x397541:_0x2e1a41;}return _0x2e1a41['split']('/')[0x0]||_0x2e1a41;}function validateAllowedImports(_0x58e7d9){const _0x117537=a11_0x244d5d,_0x118452=new Set();for(const _0x340d62 of IMPORT_SOURCE_PATTERNS){_0x340d62[_0x117537(0x1f7)]=0x0;let _0x3e6d0d;while((_0x3e6d0d=_0x340d62[_0x117537(0x1fe)](_0x58e7d9))!==null){const _0x259859=_0x3e6d0d[0x1]?.['trim']();_0x259859&&_0x118452['add'](_0x259859);}}const _0x136877=[..._0x118452][_0x117537(0x222)](getPackageName)[_0x117537(0x21b)](_0xfb4087=>!ALLOWED_REACT_MODULE_IMPORTS[_0x117537(0x1df)](_0xfb4087));if(_0x136877['length']>0x0)throw CliErrors[_0x117537(0x228)](_0x117537(0x1f4)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0x117537(0x210)+[...new Set(_0x136877)][_0x117537(0x207)](',\x20'));}export function validateReactModuleSource(_0x437e5e){const _0x481034=a11_0x244d5d;if(!_0x437e5e[_0x481034(0x217)]())throw CliErrors[_0x481034(0x228)]('Artifact\x20source\x20file\x20is\x20blank.');if(PAGE_LEVEL_PATTERNS[_0x481034(0x1e6)](_0x512c32=>_0x512c32[_0x481034(0x1de)](_0x437e5e)))throw CliErrors[_0x481034(0x228)](_0x481034(0x1fd));validateAllowedImports(_0x437e5e);}function buildArtifactInput(_0x44b051){const _0x5467ad=a11_0x244d5d,_0x17acb1=readSourceFile(_0x44b051[_0x5467ad(0x1ff)](_0x5467ad(0x20d))),_0x2fcb97=_0x44b051[_0x5467ad(0x1ff)](_0x5467ad(0x1fa))['trim'](),_0x75185a=parseMetadata(_0x44b051[_0x5467ad(0x1ff)](_0x5467ad(0x229)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x2fcb97?{'name':_0x2fcb97}:{},'content':_0x17acb1,..._0x75185a?{'metadata':_0x75185a}:{},'source':ARTIFACT_SOURCE_AGENT};}function a11_0x1d3e(_0x38d5d0,_0x446594){_0x38d5d0=_0x38d5d0-0x1dd;const _0x50ffd8=a11_0x50ff();let _0x1d3e86=_0x50ffd8[_0x38d5d0];return _0x1d3e86;}function summarizeArtifact(_0x85aff3){const _0x427c0b=a11_0x244d5d;return{'id':_0x85aff3['id'],'name':_0x85aff3[_0x427c0b(0x1fa)],'artifactType':_0x85aff3[_0x427c0b(0x204)],'source':_0x85aff3[_0x427c0b(0x1f6)],'favorite':_0x85aff3['favorite'],'deleted':_0x85aff3[_0x427c0b(0x21a)],'createTime':_0x85aff3[_0x427c0b(0x221)],'updateTime':_0x85aff3[_0x427c0b(0x1eb)]};}function detailArtifact(_0x2cec48){const _0x1f2a4e=a11_0x244d5d;return{'id':_0x2cec48['id'],'appCode':_0x2cec48[_0x1f2a4e(0x225)],'name':_0x2cec48['name'],'artifactType':_0x2cec48[_0x1f2a4e(0x204)],'source':_0x2cec48['source'],'favorite':_0x2cec48[_0x1f2a4e(0x203)],'deleted':_0x2cec48[_0x1f2a4e(0x21a)],'content':_0x2cec48[_0x1f2a4e(0x206)]??'','compiledContent':_0x2cec48[_0x1f2a4e(0x223)],'metadata':_0x2cec48[_0x1f2a4e(0x229)]??{},'createTime':_0x2cec48[_0x1f2a4e(0x221)],'updateTime':_0x2cec48[_0x1f2a4e(0x1eb)]};}function a11_0x50ff(){const _0x2de6a3=['react_module','POST','AGENT','boolean','15006ZVcfYD','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','react_module\x20imports\x20are\x20limited\x20to:\x20','26vfoHYX','source','lastIndex','/client/artifact/create','9776286PzMqZb','name','List\x20current-app\x20react_module\x20Artifacts','create','react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.','exec','str','@ant-design/icons','read','list','favorite','artifactType','string','content','join','num','187180XjDfJf','1005OMdqmu','update','react','file','artifact','113534DSrciB','.\x20Unsupported:\x20','/client/artifact/','bool','lodash','build','2821712gCUyVA','body','trim','verbose','21gTSTXw','deleted','filter','4817829wWJfMr','length','Preview:\x20update\x20react_module\x20Artifact\x20','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','File\x20path\x20is\x20required.','createTime','map','compiledContent','Updated\x20Artifact\x20','appCode','File\x20not\x20found:\x20','startsWith','validation','metadata','antd','Artifact\x20ID','parse','test','includes','990NMSQlw','react-dom','split','flag','--metadata\x20must\x20be\x20a\x20JSON\x20object.','Optional\x20favorite-state\x20filter','some','utf8','File\x20is\x20not\x20a\x20regular\x20file:\x20','description','Artifact\x20display\x20name','updateTime','3855092EDuENu','dayjs'];a11_0x50ff=function(){return _0x2de6a3;};return a11_0x50ff();}function readFavoriteFlag(_0x519cea){const _0x4c137a=a11_0x244d5d,_0x37d517=_0x519cea[_0x4c137a(0x1e3)](_0x4c137a(0x203));return _0x37d517===undefined||_0x37d517===null||_0x37d517===''?undefined:_0x519cea[_0x4c137a(0x212)](_0x4c137a(0x203));}const artifactList={'service':'artifact','command':a11_0x244d5d(0x202),'description':a11_0x244d5d(0x1fb),'risk':a11_0x244d5d(0x201),'flags':[{'name':a11_0x244d5d(0x1f6),'type':a11_0x244d5d(0x205),'description':a11_0x244d5d(0x1f3)},{'name':a11_0x244d5d(0x203),'type':a11_0x244d5d(0x1f1),'description':a11_0x244d5d(0x1e5)},VERBOSE_FLAG],async 'execute'(_0x2b12d7){const _0x261c4b=a11_0x244d5d,_0x284c0f=await listRuntimeArtifacts(_0x2b12d7[_0x261c4b(0x225)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x2b12d7['str'](_0x261c4b(0x1f6))?{'source':_0x2b12d7['str'](_0x261c4b(0x1f6))}:{},...readFavoriteFlag(_0x2b12d7)!==undefined?{'favorite':readFavoriteFlag(_0x2b12d7)}:{}});return{'ok':!![],'data':{'total':_0x284c0f[_0x261c4b(0x21d)],'items':_0x2b12d7['bool'](_0x261c4b(0x218))?_0x284c0f:_0x284c0f[_0x261c4b(0x222)](summarizeArtifact)}};}},artifactDetail={'service':a11_0x244d5d(0x20e),'command':'detail','description':'Show\x20one\x20Artifact\x20by\x20id','risk':'read','flags':[{...ID_FLAG,'description':a11_0x244d5d(0x22b)}],async 'execute'(_0x228d93){const _0x510d29=a11_0x244d5d,_0x3d559f=await getRuntimeArtifact(_0x228d93[_0x510d29(0x208)]('id'),_0x228d93[_0x510d29(0x225)]);return{'ok':!![],'data':detailArtifact(_0x3d559f)};}},artifactCreate={'service':'artifact','command':a11_0x244d5d(0x1fc),'description':'Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','risk':a11_0x244d5d(0x201),'flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x6e708c){const _0x27cdf0=a11_0x244d5d,_0x4870a9=buildArtifactInput(_0x6e708c),_0x3aa2ad=await createRuntimeArtifact(_0x6e708c[_0x27cdf0(0x225)],_0x4870a9);return{'ok':!![],'data':detailArtifact(_0x3aa2ad),'message':'Created\x20Artifact\x20'+_0x3aa2ad['id']+(_0x3aa2ad[_0x27cdf0(0x1fa)]?'\x20('+_0x3aa2ad[_0x27cdf0(0x1fa)]+')':'')};},async 'dryRun'(_0x15a67e){const _0x196fda=a11_0x244d5d,_0x5884e4=buildArtifactInput(_0x15a67e);return dryRun(_0x196fda(0x1ef),_0x196fda(0x1f8))[_0x196fda(0x216)]({'appCode':_0x15a67e[_0x196fda(0x225)],..._0x5884e4})['description']('Preview:\x20create\x20react_module\x20Artifact')[_0x196fda(0x214)]();}},artifactUpdate={'service':a11_0x244d5d(0x20e),'command':a11_0x244d5d(0x20b),'description':'Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','risk':a11_0x244d5d(0x201),'flags':[{...ID_FLAG,'description':a11_0x244d5d(0x22b)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x6ccb94){const _0x13d662=a11_0x244d5d,_0x286928=_0x6ccb94[_0x13d662(0x208)]('id'),_0x1cbce3=buildArtifactInput(_0x6ccb94),_0x1136e1=await updateRuntimeArtifact(_0x286928,_0x6ccb94[_0x13d662(0x225)],_0x1cbce3);return{'ok':!![],'data':detailArtifact(_0x1136e1),'message':_0x13d662(0x224)+_0x1136e1['id']+(_0x1136e1[_0x13d662(0x1fa)]?'\x20('+_0x1136e1[_0x13d662(0x1fa)]+')':'')};},async 'dryRun'(_0x565d1a){const _0x78983=a11_0x244d5d,_0x476976=_0x565d1a[_0x78983(0x208)]('id'),_0x30f739=buildArtifactInput(_0x565d1a);return dryRun(_0x78983(0x1ef),_0x78983(0x211)+_0x476976+'/update')[_0x78983(0x216)]({'appCode':_0x565d1a[_0x78983(0x225)],..._0x30f739})[_0x78983(0x1e9)](_0x78983(0x21e)+_0x476976)[_0x78983(0x214)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
|
|
1
|
+
const a11_0x1f4ab3=a11_0x3670;(function(_0x15ea8b,_0x37fedf){const _0xb1780e=a11_0x3670,_0x4c6ea0=_0x15ea8b();while(!![]){try{const _0x49e9fc=-parseInt(_0xb1780e(0x19c))/0x1+-parseInt(_0xb1780e(0x198))/0x2+-parseInt(_0xb1780e(0x18b))/0x3+parseInt(_0xb1780e(0x1ac))/0x4*(parseInt(_0xb1780e(0x1c3))/0x5)+parseInt(_0xb1780e(0x1c7))/0x6*(-parseInt(_0xb1780e(0x1a6))/0x7)+-parseInt(_0xb1780e(0x19f))/0x8*(parseInt(_0xb1780e(0x1ab))/0x9)+parseInt(_0xb1780e(0x186))/0xa;if(_0x49e9fc===_0x37fedf)break;else _0x4c6ea0['push'](_0x4c6ea0['shift']());}catch(_0x47a945){_0x4c6ea0['push'](_0x4c6ea0['shift']());}}}(a11_0x3862,0xd21ed));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=a11_0x1f4ab3(0x1ce),ARTIFACT_SOURCE_AGENT='AGENT',ALLOWED_REACT_MODULE_IMPORTS=[a11_0x1f4ab3(0x1d2),a11_0x1f4ab3(0x1d1),a11_0x1f4ab3(0x1c4),a11_0x1f4ab3(0x1bb),a11_0x1f4ab3(0x1a5),'@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':a11_0x1f4ab3(0x1d5),'type':a11_0x1f4ab3(0x18e),'required':!![],'description':a11_0x1f4ab3(0x18f)},ARTIFACT_NAME_FLAG={'name':a11_0x1f4ab3(0x193),'type':a11_0x1f4ab3(0x18e),'description':a11_0x1f4ab3(0x1c5)},METADATA_FLAG={'name':a11_0x1f4ab3(0x1b0),'type':'string','description':'Artifact\x20metadata\x20as\x20JSON\x20object;\x20compiledContent\x20is\x20stripped'};function isPlainObject(_0x11bcab){const _0x23937c=a11_0x1f4ab3;return typeof _0x11bcab===_0x23937c(0x1cf)&&_0x11bcab!==null&&!Array[_0x23937c(0x189)](_0x11bcab);}function readSourceFile(_0x2258a7){const _0x3a9237=a11_0x1f4ab3;if(!_0x2258a7)throw CliErrors[_0x3a9237(0x1c6)](_0x3a9237(0x1aa));if(!existsSync(_0x2258a7))throw CliErrors[_0x3a9237(0x1c6)](_0x3a9237(0x1b6)+_0x2258a7);if(!statSync(_0x2258a7)[_0x3a9237(0x1d0)]())throw CliErrors[_0x3a9237(0x1c6)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x2258a7);const _0x2603d5=readFileSync(_0x2258a7,_0x3a9237(0x1d4));return validateReactModuleSource(_0x2603d5),_0x2603d5;}function a11_0x3862(){const _0x3cc90b=['7ebipki','build','source','body','File\x20path\x20is\x20required.','12645xZFuJb','685836xljlFr','--metadata\x20must\x20be\x20a\x20JSON\x20object.','Create\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','.\x20Unsupported:\x20','metadata','includes','POST','Created\x20Artifact\x20','artifactType','/client/artifact/create','File\x20not\x20found:\x20','compiledContent','exec','str','add','dayjs','appCode','split','favorite','parse','flag','createTime','description','45zNVNaN','lodash','Artifact\x20display\x20name','validation','3975102TKOehY','detail','trim','create','length','bool','Artifact\x20ID','react_module','object','isFile','react-dom','react','Optional\x20source\x20filter,\x20for\x20example\x20AGENT','utf8','file','33144890cIpxNE','react_module\x20imports\x20are\x20limited\x20to:\x20','updateTime','isArray','verbose','1266246ttmgBN','Preview:\x20update\x20react_module\x20Artifact\x20','read','string','Path\x20to\x20a\x20local\x20UTF-8\x20React\x20module\x20source\x20file','map','/update','startsWith','name','Optional\x20favorite-state\x20filter','num','artifact','test','1722920ZmDrKE','join','deleted','Artifact\x20source\x20file\x20is\x20blank.','981703zcvALb','Show\x20one\x20Artifact\x20by\x20id','Update\x20a\x20react_module\x20Artifact\x20from\x20a\x20local\x20source\x20file','6088ZntutI','Preview:\x20create\x20react_module\x20Artifact','update','List\x20current-app\x20react_module\x20Artifacts','list','/client/artifact/','antd'];a11_0x3862=function(){return _0x3cc90b;};return a11_0x3862();}function parseMetadata(_0x3e4918){const _0xbb5d0a=a11_0x1f4ab3;if(!_0x3e4918)return undefined;let _0x16cf8f;try{_0x16cf8f=JSON[_0xbb5d0a(0x1bf)](_0x3e4918);}catch{throw CliErrors[_0xbb5d0a(0x1c6)]('Invalid\x20JSON\x20for\x20--metadata:\x20'+_0x3e4918);}if(!isPlainObject(_0x16cf8f))throw CliErrors[_0xbb5d0a(0x1c6)](_0xbb5d0a(0x1ad));const _0x3006eb={..._0x16cf8f};return delete _0x3006eb[_0xbb5d0a(0x1b7)],_0x3006eb;}function getPackageName(_0x390692){const _0x1471ad=a11_0x1f4ab3;if(_0x390692[_0x1471ad(0x192)]('@')){const [_0x4f55e7,_0x3b47d4]=_0x390692[_0x1471ad(0x1bd)]('/');return _0x4f55e7&&_0x3b47d4?_0x4f55e7+'/'+_0x3b47d4:_0x390692;}return _0x390692[_0x1471ad(0x1bd)]('/')[0x0]||_0x390692;}function validateAllowedImports(_0x47f010){const _0xabebf=a11_0x1f4ab3,_0x27b9c5=new Set();for(const _0x57c04f of IMPORT_SOURCE_PATTERNS){_0x57c04f['lastIndex']=0x0;let _0x1f78cd;while((_0x1f78cd=_0x57c04f[_0xabebf(0x1b8)](_0x47f010))!==null){const _0x1cdb84=_0x1f78cd[0x1]?.[_0xabebf(0x1c9)]();_0x1cdb84&&_0x27b9c5[_0xabebf(0x1ba)](_0x1cdb84);}}const _0x38ca3f=[..._0x27b9c5][_0xabebf(0x190)](getPackageName)['filter'](_0x4c5e18=>!ALLOWED_REACT_MODULE_IMPORTS[_0xabebf(0x1b1)](_0x4c5e18));if(_0x38ca3f[_0xabebf(0x1cb)]>0x0)throw CliErrors['validation'](_0xabebf(0x187)+ALLOWED_REACT_MODULE_IMPORTS_TEXT+_0xabebf(0x1af)+[...new Set(_0x38ca3f)][_0xabebf(0x199)](',\x20'));}export function validateReactModuleSource(_0x1ad356){const _0x469bd6=a11_0x1f4ab3;if(!_0x1ad356[_0x469bd6(0x1c9)]())throw CliErrors[_0x469bd6(0x1c6)](_0x469bd6(0x19b));if(PAGE_LEVEL_PATTERNS['some'](_0x289cb6=>_0x289cb6[_0x469bd6(0x197)](_0x1ad356)))throw CliErrors[_0x469bd6(0x1c6)]('react_module\x20must\x20be\x20an\x20embeddable\x20React\x20module,\x20not\x20full\x20HTML\x20or\x20a\x20ReactDOM/createRoot\x20mount\x20entry.');validateAllowedImports(_0x1ad356);}function a11_0x3670(_0x4bba89,_0xe6406d){_0x4bba89=_0x4bba89-0x186;const _0x386293=a11_0x3862();let _0x367016=_0x386293[_0x4bba89];return _0x367016;}function buildArtifactInput(_0x799307){const _0x47f455=a11_0x1f4ab3,_0x3406a2=readSourceFile(_0x799307[_0x47f455(0x1b9)](_0x47f455(0x1d5))),_0x4905fb=_0x799307['str']('name')['trim'](),_0x1ebc59=parseMetadata(_0x799307[_0x47f455(0x1b9)](_0x47f455(0x1b0)));return{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x4905fb?{'name':_0x4905fb}:{},'content':_0x3406a2,..._0x1ebc59?{'metadata':_0x1ebc59}:{},'source':ARTIFACT_SOURCE_AGENT};}function summarizeArtifact(_0x20177d){const _0x5a79d4=a11_0x1f4ab3;return{'id':_0x20177d['id'],'name':_0x20177d['name'],'artifactType':_0x20177d[_0x5a79d4(0x1b4)],'source':_0x20177d['source'],'favorite':_0x20177d[_0x5a79d4(0x1be)],'deleted':_0x20177d[_0x5a79d4(0x19a)],'createTime':_0x20177d[_0x5a79d4(0x1c1)],'updateTime':_0x20177d['updateTime']};}function detailArtifact(_0x32551e){const _0x32ead0=a11_0x1f4ab3;return{'id':_0x32551e['id'],'appCode':_0x32551e[_0x32ead0(0x1bc)],'name':_0x32551e['name'],'artifactType':_0x32551e[_0x32ead0(0x1b4)],'source':_0x32551e[_0x32ead0(0x1a8)],'favorite':_0x32551e[_0x32ead0(0x1be)],'deleted':_0x32551e['deleted'],'content':_0x32551e['content']??'','compiledContent':_0x32551e[_0x32ead0(0x1b7)],'metadata':_0x32551e[_0x32ead0(0x1b0)]??{},'createTime':_0x32551e['createTime'],'updateTime':_0x32551e[_0x32ead0(0x188)]};}function readFavoriteFlag(_0x1ffcb2){const _0xd63446=a11_0x1f4ab3,_0x409f91=_0x1ffcb2[_0xd63446(0x1c0)](_0xd63446(0x1be));return _0x409f91===undefined||_0x409f91===null||_0x409f91===''?undefined:_0x1ffcb2[_0xd63446(0x1cc)](_0xd63446(0x1be));}const artifactList={'service':a11_0x1f4ab3(0x196),'command':a11_0x1f4ab3(0x1a3),'description':a11_0x1f4ab3(0x1a2),'risk':'read','flags':[{'name':'source','type':a11_0x1f4ab3(0x18e),'description':a11_0x1f4ab3(0x1d3)},{'name':a11_0x1f4ab3(0x1be),'type':'boolean','description':a11_0x1f4ab3(0x194)},VERBOSE_FLAG],async 'execute'(_0x16281c){const _0x4e4a7c=a11_0x1f4ab3,_0x1b82e2=await listRuntimeArtifacts(_0x16281c[_0x4e4a7c(0x1bc)],{'artifactType':ARTIFACT_TYPE_REACT_MODULE,..._0x16281c[_0x4e4a7c(0x1b9)](_0x4e4a7c(0x1a8))?{'source':_0x16281c[_0x4e4a7c(0x1b9)](_0x4e4a7c(0x1a8))}:{},...readFavoriteFlag(_0x16281c)!==undefined?{'favorite':readFavoriteFlag(_0x16281c)}:{}});return{'ok':!![],'data':{'total':_0x1b82e2[_0x4e4a7c(0x1cb)],'items':_0x16281c[_0x4e4a7c(0x1cc)](_0x4e4a7c(0x18a))?_0x1b82e2:_0x1b82e2[_0x4e4a7c(0x190)](summarizeArtifact)}};}},artifactDetail={'service':a11_0x1f4ab3(0x196),'command':a11_0x1f4ab3(0x1c8),'description':a11_0x1f4ab3(0x19d),'risk':a11_0x1f4ab3(0x18d),'flags':[{...ID_FLAG,'description':a11_0x1f4ab3(0x1cd)}],async 'execute'(_0x22ab5e){const _0x5c2573=a11_0x1f4ab3,_0x225a1b=await getRuntimeArtifact(_0x22ab5e['num']('id'),_0x22ab5e[_0x5c2573(0x1bc)]);return{'ok':!![],'data':detailArtifact(_0x225a1b)};}},artifactCreate={'service':a11_0x1f4ab3(0x196),'command':a11_0x1f4ab3(0x1ca),'description':a11_0x1f4ab3(0x1ae),'risk':'read','flags':[FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x31c506){const _0x4547f0=a11_0x1f4ab3,_0x56c877=buildArtifactInput(_0x31c506),_0x194de9=await createRuntimeArtifact(_0x31c506[_0x4547f0(0x1bc)],_0x56c877);return{'ok':!![],'data':detailArtifact(_0x194de9),'message':_0x4547f0(0x1b3)+_0x194de9['id']+(_0x194de9[_0x4547f0(0x193)]?'\x20('+_0x194de9[_0x4547f0(0x193)]+')':'')};},async 'dryRun'(_0x1184c6){const _0xdaff57=a11_0x1f4ab3,_0x1fdef1=buildArtifactInput(_0x1184c6);return dryRun(_0xdaff57(0x1b2),_0xdaff57(0x1b5))[_0xdaff57(0x1a9)]({'appCode':_0x1184c6[_0xdaff57(0x1bc)],..._0x1fdef1})[_0xdaff57(0x1c2)](_0xdaff57(0x1a0))['build']();}},artifactUpdate={'service':a11_0x1f4ab3(0x196),'command':a11_0x1f4ab3(0x1a1),'description':a11_0x1f4ab3(0x19e),'risk':a11_0x1f4ab3(0x18d),'flags':[{...ID_FLAG,'description':a11_0x1f4ab3(0x1cd)},FILE_FLAG,ARTIFACT_NAME_FLAG,METADATA_FLAG],async 'execute'(_0x18a5d4){const _0x2846dd=a11_0x1f4ab3,_0x37d743=_0x18a5d4[_0x2846dd(0x195)]('id'),_0x1a2beb=buildArtifactInput(_0x18a5d4),_0x589445=await updateRuntimeArtifact(_0x37d743,_0x18a5d4[_0x2846dd(0x1bc)],_0x1a2beb);return{'ok':!![],'data':detailArtifact(_0x589445),'message':'Updated\x20Artifact\x20'+_0x589445['id']+(_0x589445['name']?'\x20('+_0x589445[_0x2846dd(0x193)]+')':'')};},async 'dryRun'(_0x4c4198){const _0x2a6c7d=a11_0x1f4ab3,_0x1c824c=_0x4c4198['num']('id'),_0x5a42e0=buildArtifactInput(_0x4c4198);return dryRun(_0x2a6c7d(0x1b2),_0x2a6c7d(0x1a4)+_0x1c824c+_0x2a6c7d(0x191))[_0x2a6c7d(0x1a9)]({'appCode':_0x4c4198[_0x2a6c7d(0x1bc)],..._0x5a42e0})['description'](_0x2a6c7d(0x18c)+_0x1c824c)[_0x2a6c7d(0x1a7)]();}};export const artifactDefinitions=[artifactList,artifactDetail,artifactCreate,artifactUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a12_0x3d0f(_0x45cbbb,_0xcfae5f){_0x45cbbb=_0x45cbbb-0xbf;const _0xfa1e7b=a12_0xfa1e();let _0x3d0f86=_0xfa1e7b[_0x45cbbb];return _0x3d0f86;}const a12_0x48b6fa=a12_0x3d0f;(function(_0x2fd933,_0x213cb1){const _0x3ec532=a12_0x3d0f,_0x72aa9d=_0x2fd933();while(!![]){try{const _0x434dc5=parseInt(_0x3ec532(0xd6))/0x1+parseInt(_0x3ec532(0xe8))/0x2*(parseInt(_0x3ec532(0x10d))/0x3)+-parseInt(_0x3ec532(0xca))/0x4*(parseInt(_0x3ec532(0x106))/0x5)+parseInt(_0x3ec532(0xf5))/0x6*(parseInt(_0x3ec532(0x103))/0x7)+-parseInt(_0x3ec532(0xed))/0x8+-parseInt(_0x3ec532(0xff))/0x9+-parseInt(_0x3ec532(0xea))/0xa*(-parseInt(_0x3ec532(0x102))/0xb);if(_0x434dc5===_0x213cb1)break;else _0x72aa9d['push'](_0x72aa9d['shift']());}catch(_0x1721b5){_0x72aa9d['push'](_0x72aa9d['shift']());}}}(a12_0xfa1e,0x96c16));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';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(_0x397499){const _0x391ade=a12_0x3d0f;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x397499[_0x391ade(0x101)]('global'),'explicitProject':_0x397499[_0x391ade(0x101)](_0x391ade(0xf1)),'policy':_0x391ade(0xf8)}));}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 _0x40ba60=a12_0x3d0f;return crypto[_0x40ba60(0xc7)]();}export function buildDeviceAuthUrl(_0x1d99f5,_0x6ba0ea,_0x5e42d4=a12_0x48b6fa(0xe6)){const _0x3018e1=a12_0x48b6fa;return _0x1d99f5+_0x3018e1(0xef)+encodeURIComponent(_0x6ba0ea)+_0x3018e1(0xee)+encodeURIComponent(_0x5e42d4);}export function getDeviceCodePath(){const _0x231a35=a12_0x48b6fa;return homedir()+'/'+PRODUCT_CONFIG['homeDirName']+_0x231a35(0xf3);}export function readStoredDeviceCode(){const _0x15b535=a12_0x48b6fa,_0x46a4e0=getDeviceCodePath();if(!existsSync(_0x46a4e0))return null;try{const _0x224a59=readFileSync(_0x46a4e0,{'encoding':_0x15b535(0xc1)}),_0x74a93b=JSON[_0x15b535(0x10a)](_0x224a59);if(_0x74a93b&&typeof _0x74a93b['code']===_0x15b535(0xe9)&&typeof _0x74a93b[_0x15b535(0x10c)]===_0x15b535(0xe9)&&(_0x74a93b['scope']===_0x15b535(0xe0)||_0x74a93b[_0x15b535(0xdc)]===_0x15b535(0xf1)))return _0x74a93b;}catch{}return null;}export function writeStoredDeviceCode(_0x3fcde6,_0x5b4e8d){const _0x2a8458=a12_0x48b6fa,_0x21002e=getDeviceCodePath(),_0xb1b26f=dirname(_0x21002e);!existsSync(_0xb1b26f)&&mkdirSync(_0xb1b26f,{'recursive':!![]});const _0x2955d3={'code':_0x3fcde6,'createdAt':new Date()[_0x2a8458(0xdb)](),'scope':_0x5b4e8d};writeFileSync(_0x21002e,JSON[_0x2a8458(0xec)](_0x2955d3),{'encoding':_0x2a8458(0xc1),'mode':0x180});}function a12_0xfa1e(){const _0x3b1cbd=['randomUUID','str','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.','318412yePBWc','\x20remaining','device','/api/device-auth/token','Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...','Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','code','accessKey','Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.','removeListener','url-only','194220OMOJXF','source','padStart','apiError','networkError','toISOString','scope','Device\x20auth\x20API\x20error\x20(','\x20config.','abort','global','Device\x20auth\x20API\x20returned\x20HTTP\x20','success','once','Write\x20to\x20global\x20config\x20(default)','signal','lovrabet-cli','boolean','34842ApNXUQ','string','2027730QCSKjm','aborted','stringify','4581272bNeAPO','&source=','/device-auth?code=','floor','project','expired','/.device-auth','write','5682BwyvGs','auth','validation','global-default','\x20auth\x20status','data','json','AccessKey\x20saved\x20to\x20','SIGINT','Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','7044498hdXWFU','stderr','bool','44xgQQji','6839pquSOF','getTime','After\x20authorizing,\x20re-run:\x20','5NpHdRa','Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','access_key','AbortError','parse','test','createdAt','21gksSwF','\x0dWaiting\x20for\x20authorization...\x20','Invalid\x20access_key\x20returned\x20by\x20server.','utf8','status','Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.','Device\x20authorization\x20cancelled.','),\x20retrying...','cancelled'];a12_0xfa1e=function(){return _0x3b1cbd;};return a12_0xfa1e();}export function deleteStoredDeviceCode(){const _0x2c304b=getDeviceCodePath();try{unlinkSync(_0x2c304b);}catch{}}export function isStoredDeviceCodeExpired(_0x1ea7df){const _0x61e09d=a12_0x48b6fa;return Date['now']()-new Date(_0x1ea7df[_0x61e09d(0x10c)])[_0x61e09d(0x104)]()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x14914a,_0x22966b){const _0x53f794=a12_0x48b6fa,_0xa93b89=_0x14914a+_0x53f794(0xcd),_0x401057=new AbortController(),_0x3a03cb=setTimeout(()=>_0x401057[_0x53f794(0xdf)](),0x2710),_0x1762c2=await fetch(_0xa93b89,{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON['stringify']({'code':_0x22966b}),'signal':_0x401057['signal']});clearTimeout(_0x3a03cb);if(!_0x1762c2['ok'])throw CliErrors['networkError'](_0x53f794(0xe1)+_0x1762c2[_0x53f794(0xc2)]);const _0x3909e7=await _0x1762c2[_0x53f794(0xfb)](),_0x2c896c=_0x3909e7[_0x53f794(0xfa)]&&typeof _0x3909e7[_0x53f794(0xfa)]==='object'?_0x3909e7[_0x53f794(0xfa)]:_0x3909e7;if(!_0x2c896c||typeof _0x2c896c[_0x53f794(0xc2)]!==_0x53f794(0xe9))throw CliErrors['apiError']('Invalid\x20device\x20auth\x20response');return{'status':_0x2c896c[_0x53f794(0xc2)],'access_key':typeof _0x2c896c[_0x53f794(0x108)]===_0x53f794(0xe9)?_0x2c896c[_0x53f794(0x108)]:undefined};}export async function pollDeviceToken(_0x472dd0,_0x5e867d,_0x167b67){const _0x45e078=a12_0x48b6fa;let _0x41c2bb=0x0;for(let _0x37fdff=0x0;_0x37fdff<MAX_POLLS;_0x37fdff++){if(_0x167b67[_0x45e078(0xeb)])throw CliErrors[_0x45e078(0xc6)](_0x45e078(0xc4));let _0x25b135;try{_0x25b135=await fetchDeviceToken(_0x472dd0,_0x5e867d);}catch(_0x2f6897){if(_0x2f6897 instanceof Error&&_0x2f6897['name']===_0x45e078(0x109))throw CliErrors[_0x45e078(0xc6)]('Device\x20authorization\x20cancelled.');_0x41c2bb++;if(_0x41c2bb>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0x45e078(0xda)](_0x45e078(0xd3));writeCliSideChannelLine(_0x45e078(0xdd)+_0x41c2bb+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+_0x45e078(0xc5)),await sleep(POLL_INTERVAL_MS);continue;}_0x41c2bb=0x0;if(_0x25b135[_0x45e078(0xc2)]===_0x45e078(0xe2)){if(!_0x25b135['access_key'])throw CliErrors[_0x45e078(0xd9)](_0x45e078(0xc0));return _0x25b135[_0x45e078(0x108)];}if(_0x25b135[_0x45e078(0xc2)]===_0x45e078(0xf2)){deleteStoredDeviceCode();throw CliErrors[_0x45e078(0xf7)](_0x45e078(0xcf));}const _0x5a6347=(_0x37fdff+0x1)*POLL_INTERVAL_MS,_0x10d9f3=DEVICE_CODE_TTL_MS-_0x5a6347,_0x15413c=Math[_0x45e078(0xf0)](_0x10d9f3/0xea60),_0x369a2f=Math[_0x45e078(0xf0)](_0x10d9f3%0xea60/0x3e8);process[_0x45e078(0x100)][_0x45e078(0xf4)](_0x45e078(0xbf)+_0x15413c+':'+String(_0x369a2f)[_0x45e078(0xd8)](0x2,'0')+_0x45e078(0xcb)),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors[_0x45e078(0xf7)](_0x45e078(0xfe));}function sleep(_0x46be3e){return new Promise(_0x36d1b4=>setTimeout(_0x36d1b4,_0x46be3e));}export const authDeviceDefinition={'service':a12_0x48b6fa(0xf6),'command':a12_0x48b6fa(0xcc),'description':a12_0x48b6fa(0x107),'risk':a12_0x48b6fa(0xf4),'confirmationDescription':a12_0x48b6fa(0xc9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x48b6fa(0xe0),'type':'boolean','description':a12_0x48b6fa(0xe4),'default':!![]},{'name':'project','type':a12_0x48b6fa(0xe7),'description':'Write\x20to\x20project\x20config','default':![]},{'name':a12_0x48b6fa(0xd7),'type':a12_0x48b6fa(0xe9),'description':'App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','default':'lovrabet-cli'},{'name':a12_0x48b6fa(0xd5),'type':a12_0x48b6fa(0xe7),'description':a12_0x48b6fa(0xd2),'default':![]}],async 'execute'(_0x4f7783){const _0x87355b=a12_0x48b6fa,_0x1ae69b=resolveAuthScopeFlags(_0x4f7783),_0x53adc4=_0x1ae69b[_0x87355b(0xe0)]?_0x87355b(0xe0):_0x87355b(0xf1),_0x22a33a=readScopedConfig(_0x1ae69b);if(_0x22a33a[_0x87355b(0xd1)])return{'ok':!![],'message':'Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.'};const _0x49785d=(_0x4f7783[_0x87355b(0xc8)](_0x87355b(0xd7))||'lovrabet-cli')['trim'](),_0xacd06=getUserDomain(),_0x4d2db0=readStoredDeviceCode(),_0x1631d8=_0x4d2db0&&!isStoredDeviceCodeExpired(_0x4d2db0)?_0x4d2db0[_0x87355b(0xd0)]:((()=>{const _0xd6712e=generateDeviceCode();return writeStoredDeviceCode(_0xd6712e,_0x53adc4),_0xd6712e;})()),_0x3778df=buildDeviceAuthUrl(_0xacd06,_0x1631d8,_0x49785d);if(_0x4f7783[_0x87355b(0x101)]('url-only'))return console['log'](_0x3778df),{'ok':!![]};writeCliSideChannelLine('Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:'),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x3778df),writeCliSideChannelLine(''),writeCliSideChannelLine('The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.');if(_0x4f7783['nonInteractive'])return writeCliSideChannelLine(_0x87355b(0x105)+CLI_BIN_NAME+'\x20auth\x20device'),{'ok':!![],'message':_0x87355b(0xc3)};writeCliSideChannelLine(_0x87355b(0xce));const _0x43515d=new AbortController(),_0x1d2819=()=>{const _0xb8f4b1=_0x87355b;_0x43515d[_0xb8f4b1(0xdf)](),process[_0xb8f4b1(0xd4)](_0xb8f4b1(0xfd),_0x1d2819);};process[_0x87355b(0xe3)]('SIGINT',_0x1d2819);let _0x306230;try{_0x306230=await pollDeviceToken(_0xacd06,_0x1631d8,_0x43515d[_0x87355b(0xe5)]);}finally{process[_0x87355b(0xd4)](_0x87355b(0xfd),_0x1d2819);}if(!ACCESS_KEY_PATTERN[_0x87355b(0x10b)](_0x306230))throw CliErrors[_0x87355b(0xd9)](_0x87355b(0xc0));const _0x3b325c=readScopedConfig(_0x1ae69b);return _0x3b325c['accessKey']=_0x306230,writeScopedConfig(_0x3b325c,_0x1ae69b),deleteStoredDeviceCode(),process[_0x87355b(0x100)][_0x87355b(0xf4)]('\x0a'),writeCliSideChannelLine(_0x87355b(0xfc)+_0x53adc4+_0x87355b(0xde)),writeCliSideChannelLine('Verify:\x20'+CLI_BIN_NAME+_0x87355b(0xf9)),{'ok':!![],'message':'Device\x20authorization\x20successful.'};}};
|
|
1
|
+
const a12_0x2ffeec=a12_0x5b84;(function(_0x22bf61,_0x1b94c6){const _0x552151=a12_0x5b84,_0x437939=_0x22bf61();while(!![]){try{const _0x2f2b74=parseInt(_0x552151(0x191))/0x1*(-parseInt(_0x552151(0x192))/0x2)+parseInt(_0x552151(0x166))/0x3*(parseInt(_0x552151(0x188))/0x4)+-parseInt(_0x552151(0x17e))/0x5*(parseInt(_0x552151(0x142))/0x6)+-parseInt(_0x552151(0x18b))/0x7*(parseInt(_0x552151(0x18d))/0x8)+-parseInt(_0x552151(0x15b))/0x9*(parseInt(_0x552151(0x174))/0xa)+parseInt(_0x552151(0x187))/0xb*(parseInt(_0x552151(0x17d))/0xc)+parseInt(_0x552151(0x15e))/0xd;if(_0x2f2b74===_0x1b94c6)break;else _0x437939['push'](_0x437939['shift']());}catch(_0x1358ae){_0x437939['push'](_0x437939['shift']());}}}(a12_0x15a4,0x848c4));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';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(_0x2b2eda){const _0x24fef4=a12_0x5b84;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x2b2eda[_0x24fef4(0x171)](_0x24fef4(0x175)),'explicitProject':_0x2b2eda[_0x24fef4(0x171)](_0x24fef4(0x179)),'policy':_0x24fef4(0x150)}));}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;function a12_0x5b84(_0x2fa849,_0x2991ca){_0x2fa849=_0x2fa849-0x13d;const _0x15a4f7=a12_0x15a4();let _0x5b8439=_0x15a4f7[_0x2fa849];return _0x5b8439;}export function generateDeviceCode(){const _0x2fae8a=a12_0x5b84;return crypto[_0x2fae8a(0x17c)]();}export function buildDeviceAuthUrl(_0x434ee0,_0x3fb4c6,_0x167bac=a12_0x2ffeec(0x16b)){const _0x1b3326=a12_0x2ffeec;return _0x434ee0+_0x1b3326(0x16d)+encodeURIComponent(_0x3fb4c6)+'&source='+encodeURIComponent(_0x167bac);}export function getDeviceCodePath(){const _0x5251b5=a12_0x2ffeec;return homedir()+'/'+PRODUCT_CONFIG[_0x5251b5(0x181)]+_0x5251b5(0x14b);}export function readStoredDeviceCode(){const _0x4f2708=a12_0x2ffeec,_0x32e244=getDeviceCodePath();if(!existsSync(_0x32e244))return null;try{const _0x45ee47=readFileSync(_0x32e244,{'encoding':_0x4f2708(0x17a)}),_0x433d6b=JSON[_0x4f2708(0x146)](_0x45ee47);if(_0x433d6b&&typeof _0x433d6b[_0x4f2708(0x18a)]===_0x4f2708(0x190)&&typeof _0x433d6b[_0x4f2708(0x157)]==='string'&&(_0x433d6b[_0x4f2708(0x15c)]==='global'||_0x433d6b[_0x4f2708(0x15c)]===_0x4f2708(0x179)))return _0x433d6b;}catch{}return null;}export function writeStoredDeviceCode(_0xa474fe,_0x4dbfcd){const _0x213508=a12_0x2ffeec,_0xee3914=getDeviceCodePath(),_0x100b33=dirname(_0xee3914);!existsSync(_0x100b33)&&mkdirSync(_0x100b33,{'recursive':!![]});const _0x11e069={'code':_0xa474fe,'createdAt':new Date()[_0x213508(0x143)](),'scope':_0x4dbfcd};writeFileSync(_0xee3914,JSON[_0x213508(0x169)](_0x11e069),{'encoding':_0x213508(0x17a),'mode':0x180});}export function deleteStoredDeviceCode(){const _0x3445aa=getDeviceCodePath();try{unlinkSync(_0x3445aa);}catch{}}export function isStoredDeviceCodeExpired(_0x42b668){const _0x46fef2=a12_0x2ffeec;return Date[_0x46fef2(0x14d)]()-new Date(_0x42b668[_0x46fef2(0x157)])[_0x46fef2(0x15d)]()>DEVICE_CODE_TTL_MS;}export async function fetchDeviceToken(_0x3b40b9,_0x446183){const _0x2b6a8f=a12_0x2ffeec,_0x7c5dc4=_0x3b40b9+_0x2b6a8f(0x177),_0x39908c=new AbortController(),_0x36c6e0=setTimeout(()=>_0x39908c['abort'](),0x2710),_0x163c2b=await fetch(_0x7c5dc4,{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON[_0x2b6a8f(0x169)]({'code':_0x446183}),'signal':_0x39908c[_0x2b6a8f(0x186)]});clearTimeout(_0x36c6e0);if(!_0x163c2b['ok'])throw CliErrors[_0x2b6a8f(0x159)](_0x2b6a8f(0x152)+_0x163c2b[_0x2b6a8f(0x165)]);const _0x8e1c15=await _0x163c2b['json'](),_0x12cf0b=_0x8e1c15[_0x2b6a8f(0x172)]&&typeof _0x8e1c15[_0x2b6a8f(0x172)]===_0x2b6a8f(0x170)?_0x8e1c15['data']:_0x8e1c15;if(!_0x12cf0b||typeof _0x12cf0b[_0x2b6a8f(0x165)]!==_0x2b6a8f(0x190))throw CliErrors[_0x2b6a8f(0x140)](_0x2b6a8f(0x16f));return{'status':_0x12cf0b[_0x2b6a8f(0x165)],'access_key':typeof _0x12cf0b[_0x2b6a8f(0x180)]==='string'?_0x12cf0b[_0x2b6a8f(0x180)]:undefined};}export async function pollDeviceToken(_0x5bfbc3,_0x54fc06,_0x2db10f){const _0x408748=a12_0x2ffeec;let _0x3e86ef=0x0;for(let _0xa7516=0x0;_0xa7516<MAX_POLLS;_0xa7516++){if(_0x2db10f[_0x408748(0x15f)])throw CliErrors[_0x408748(0x145)](_0x408748(0x158));let _0xe8ee9a;try{_0xe8ee9a=await fetchDeviceToken(_0x5bfbc3,_0x54fc06);}catch(_0x359ade){if(_0x359ade instanceof Error&&_0x359ade[_0x408748(0x14e)]===_0x408748(0x148))throw CliErrors[_0x408748(0x145)](_0x408748(0x158));_0x3e86ef++;if(_0x3e86ef>=MAX_CONSECUTIVE_NETWORK_ERRORS)throw CliErrors[_0x408748(0x159)](_0x408748(0x16a));writeCliSideChannelLine(_0x408748(0x13f)+_0x3e86ef+'/'+MAX_CONSECUTIVE_NETWORK_ERRORS+_0x408748(0x162)),await sleep(POLL_INTERVAL_MS);continue;}_0x3e86ef=0x0;if(_0xe8ee9a[_0x408748(0x165)]===_0x408748(0x183)){if(!_0xe8ee9a[_0x408748(0x180)])throw CliErrors[_0x408748(0x140)](_0x408748(0x163));return _0xe8ee9a[_0x408748(0x180)];}if(_0xe8ee9a[_0x408748(0x165)]===_0x408748(0x15a)){deleteStoredDeviceCode();throw CliErrors[_0x408748(0x144)](_0x408748(0x160));}const _0x21db3c=(_0xa7516+0x1)*POLL_INTERVAL_MS,_0x4f6c33=DEVICE_CODE_TTL_MS-_0x21db3c,_0x2acc5f=Math[_0x408748(0x155)](_0x4f6c33/0xea60),_0x2e599e=Math[_0x408748(0x155)](_0x4f6c33%0xea60/0x3e8);process[_0x408748(0x18f)][_0x408748(0x176)](_0x408748(0x141)+_0x2acc5f+':'+String(_0x2e599e)[_0x408748(0x13d)](0x2,'0')+_0x408748(0x156)),await sleep(POLL_INTERVAL_MS);}deleteStoredDeviceCode();throw CliErrors[_0x408748(0x144)](_0x408748(0x13e));}function sleep(_0xf7bc9f){return new Promise(_0x322d99=>setTimeout(_0x322d99,_0xf7bc9f));}export const authDeviceDefinition={'service':a12_0x2ffeec(0x185),'command':a12_0x2ffeec(0x173),'description':a12_0x2ffeec(0x17b),'risk':a12_0x2ffeec(0x176),'confirmationDescription':a12_0x2ffeec(0x161),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x2ffeec(0x175),'type':'boolean','description':a12_0x2ffeec(0x189),'default':!![]},{'name':'project','type':a12_0x2ffeec(0x182),'description':a12_0x2ffeec(0x18e),'default':![]},{'name':'source','type':a12_0x2ffeec(0x190),'description':a12_0x2ffeec(0x151),'default':a12_0x2ffeec(0x16b)},{'name':a12_0x2ffeec(0x14c),'type':'boolean','description':a12_0x2ffeec(0x168),'default':![]}],async 'execute'(_0xf5ca0d){const _0x8800dc=a12_0x2ffeec,_0x5481aa=resolveAuthScopeFlags(_0xf5ca0d),_0x547c3c=_0x5481aa[_0x8800dc(0x175)]?'global':_0x8800dc(0x179),_0x1c4b2b=readScopedConfig(_0x5481aa);if(_0x1c4b2b[_0x8800dc(0x14f)])return{'ok':!![],'message':_0x8800dc(0x14a)};const _0x3ed650=(_0xf5ca0d['str'](_0x8800dc(0x194))||'lovrabet-cli')[_0x8800dc(0x16e)](),_0x3d9ffb=getUserDomain(),_0x3e87c7=readStoredDeviceCode(),_0x3b1197=_0x3e87c7&&!isStoredDeviceCodeExpired(_0x3e87c7)?_0x3e87c7[_0x8800dc(0x18a)]:((()=>{const _0x867c6a=generateDeviceCode();return writeStoredDeviceCode(_0x867c6a,_0x547c3c),_0x867c6a;})()),_0x34802f=buildDeviceAuthUrl(_0x3d9ffb,_0x3b1197,_0x3ed650);if(_0xf5ca0d['bool'](_0x8800dc(0x14c)))return console['log'](_0x34802f),{'ok':!![]};writeCliSideChannelLine(_0x8800dc(0x18c)),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x34802f),writeCliSideChannelLine(''),writeCliSideChannelLine(_0x8800dc(0x178));if(_0xf5ca0d[_0x8800dc(0x195)])return writeCliSideChannelLine('After\x20authorizing,\x20re-run:\x20'+CLI_BIN_NAME+_0x8800dc(0x184)),{'ok':!![],'message':_0x8800dc(0x167)};writeCliSideChannelLine(_0x8800dc(0x153));const _0x1e7f9c=new AbortController(),_0x4bec9d=()=>{const _0x59ff94=_0x8800dc;_0x1e7f9c[_0x59ff94(0x147)](),process[_0x59ff94(0x164)](_0x59ff94(0x17f),_0x4bec9d);};process[_0x8800dc(0x149)](_0x8800dc(0x17f),_0x4bec9d);let _0x915df4;try{_0x915df4=await pollDeviceToken(_0x3d9ffb,_0x3b1197,_0x1e7f9c[_0x8800dc(0x186)]);}finally{process['removeListener'](_0x8800dc(0x17f),_0x4bec9d);}if(!ACCESS_KEY_PATTERN[_0x8800dc(0x154)](_0x915df4))throw CliErrors['apiError'](_0x8800dc(0x163));const _0xcc0edb=readScopedConfig(_0x5481aa);return _0xcc0edb['accessKey']=_0x915df4,writeScopedConfig(_0xcc0edb,_0x5481aa),deleteStoredDeviceCode(),process[_0x8800dc(0x18f)]['write']('\x0a'),writeCliSideChannelLine('AccessKey\x20saved\x20to\x20'+_0x547c3c+'\x20config.'),writeCliSideChannelLine(_0x8800dc(0x193)+CLI_BIN_NAME+'\x20auth\x20status'),{'ok':!![],'message':_0x8800dc(0x16c)};}};function a12_0x15a4(){const _0x4815d7=['data','device','10fudbQO','global','write','/api/device-auth/token','The\x20device\x20code\x20is\x20valid\x20for\x2010\x20minutes.','project','utf8','Authorize\x20with\x20the\x20device-code\x20flow\x20(complete\x20in\x20the\x20browser;\x20no\x20copy-paste\x20required)','randomUUID','2200284USvEaI','105CgraAW','SIGINT','access_key','homeDirName','boolean','success','\x20auth\x20device','auth','signal','11xDAylc','1796JrGOAA','Write\x20to\x20global\x20config\x20(default)','code','213409cSzgZn','Open\x20this\x20URL\x20in\x20your\x20browser\x20to\x20authorize:','16GXxXWp','Write\x20to\x20project\x20config','stderr','string','3pYOOoU','79346dvxdYP','Verify:\x20','source','nonInteractive','padStart','Device\x20authorization\x20timed\x20out\x20after\x2010\x20minutes.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','Device\x20auth\x20API\x20error\x20(','apiError','\x0dWaiting\x20for\x20authorization...\x20','157434ZcYEGc','toISOString','validation','cancelled','parse','abort','AbortError','once','Already\x20authorized.\x20Use\x20`lovrabet\x20auth\x20status`\x20to\x20verify.','/.device-auth','url-only','now','name','accessKey','global-default','App\x20name\x20shown\x20on\x20authorization\x20page\x20(default:\x20lovrabet)','Device\x20auth\x20API\x20returned\x20HTTP\x20','Waiting\x20for\x20authorization\x20(timeout:\x2010\x20minutes,\x20Ctrl+C\x20to\x20cancel)...','test','floor','\x20remaining','createdAt','Device\x20authorization\x20cancelled.','networkError','expired','7491429dwwkuT','scope','getTime','21070075THLOsB','aborted','Device\x20code\x20expired.\x20Run\x20`lovrabet\x20auth\x20device`\x20to\x20get\x20a\x20new\x20code.','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.','),\x20retrying...','Invalid\x20access_key\x20returned\x20by\x20server.','removeListener','status','2019TjpZBY','Device\x20authorization\x20URL\x20printed.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20re-run.','Print\x20URL\x20to\x20stdout\x20and\x20exit\x20(for\x20WorkBuddy\x20integration)','stringify','Device\x20auth\x20API\x20unreachable\x20after\x20multiple\x20retries.','lovrabet-cli','Device\x20authorization\x20successful.','/device-auth?code=','trim','Invalid\x20device\x20auth\x20response','object','bool'];a12_0x15a4=function(){return _0x4815d7;};return a12_0x15a4();}
|