@lovrabet/rabetbase-cli 2.3.4-beta.4 → 2.3.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.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-apis-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/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.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/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.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/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.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/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.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/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/commands/bff/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a36_0x13f741=a36_0x59a1;(function(_0x336817,_0x4ac3d6){const _0x4abb34=a36_0x59a1,_0xc129c2=_0x336817();while(!![]){try{const _0x4ea02c=-parseInt(_0x4abb34(0xa8))/0x1+parseInt(_0x4abb34(0xaa))/0x2+-parseInt(_0x4abb34(0xb4))/0x3+parseInt(_0x4abb34(0x88))/0x4*(-parseInt(_0x4abb34(0xb5))/0x5)+parseInt(_0x4abb34(0xaf))/0x6*(-parseInt(_0x4abb34(0x9e))/0x7)+parseInt(_0x4abb34(0x74))/0x8*(parseInt(_0x4abb34(0xa5))/0x9)+parseInt(_0x4abb34(0x97))/0xa;if(_0x4ea02c===_0x4ac3d6)break;else _0xc129c2['push'](_0xc129c2['shift']());}catch(_0x3a12c2){_0xc129c2['push'](_0xc129c2['shift']());}}}(a36_0x58d4,0x40ee4));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';function a36_0x58d4(){const _0x103424=['apps','string','Lock\x20scope\x20for\x20app\x20\x22','Force\x20overwrite\x20local\x20unsynced\x20changes','scriptContent','length','datasetCode','would_pull','boolean','280WCwuaR','bool','operationType','utf8','all','\x20failed','stderr','cancelled','functions','map','COMMON','Would\x20inspect\x20','pull','type','Pull\x20only\x20this\x20script\x20type','7006130FuGxUZ','conflict','scriptsRoot','filePath','apiDir','validation','question','43162sMIDpM','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','local\x20unsynced\x20changes','includes','alias','force','36GfzXAq','scriptType','hash','184124oPceQe','lockFilePath','615154aUrsZc','\x22\x20not\x20found\x20after\x20ensureLockScope.','stdin','yes','stringify','282WOhXRn','trim','\x20skipped,\x20','&type=','Force\x20pull\x20cancelled.','1431252xEawlq','14510JrraWu','No\x20remote\x20BFF\x20scripts\x20found.','skipped','Remote\x20script\x20missing\x20id.','appCode','823832lpnsar','push','\x20pulled,\x20','str','hookLocation','nonInteractive','functionName','close','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','functionNode','lockKey'];a36_0x58d4=function(){return _0x103424;};return a36_0x58d4();}import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';function a36_0x59a1(_0x22c776,_0x253844){_0x22c776=_0x22c776-0x70;const _0x58d44d=a36_0x58d4();let _0x59a17a=_0x58d44d[_0x22c776];return _0x59a17a;}export const bffPull={'service':'bff','command':a36_0x13f741(0x94),'description':a36_0x13f741(0x7c),'risk':'write','flags':[{'name':a36_0x13f741(0x95),'type':a36_0x13f741(0x80),'description':a36_0x13f741(0x96),'enum':[a36_0x13f741(0x92),'ENDPOINT','HOOK']},{'name':a36_0x13f741(0xa4),'type':a36_0x13f741(0x87),'description':a36_0x13f741(0x82)}],async 'dryRun'(_0x8d18f5){const _0x234887=a36_0x13f741,_0x4d8004=loadBffProjectConfig(_0x8d18f5[_0x234887(0x73)]),_0x262d8d=await readBffLockFile(_0x4d8004['lockFilePath']),{appLock:_0x15bb33}=ensureLockScope(_0x262d8d??createEmptyBffLock(),_0x8d18f5[_0x234887(0x73)],_0x4d8004[_0x234887(0x99)],_0x234887(0x94)),_0x4eccdf=normalizeBffType(_0x8d18f5[_0x234887(0x77)](_0x234887(0x95)))??undefined,_0x378266=buildDatasetCodeToAliasMap(_0x8d18f5[_0x234887(0x9b)],_0x8d18f5[_0x234887(0x73)]),[_0xa2c8c0,_0x26e58d]=await Promise[_0x234887(0x8c)]([listBffScripts(_0x8d18f5['appCode'],_0x4eccdf),getBffScriptStatistics(_0x8d18f5[_0x234887(0x73)])]),_0x3ab61f=createHookLocationMap(_0x26e58d),_0x3aa5f6=[];for(const _0x5009dc of _0xa2c8c0){const _0x4197bd=resolveRemoteScriptTarget(_0x4d8004,_0x5009dc,_0x3ab61f,_0x15bb33['functions'],_0x378266);if(!_0x4197bd){_0x3aa5f6[_0x234887(0x75)]({'scriptType':_0x5009dc[_0x234887(0xa6)],'functionName':_0x5009dc[_0x234887(0x7a)]??'','status':_0x234887(0x71),'reason':'unresolvable\x20target\x20path'});continue;}const _0x351fd2=_0x15bb33['functions'][_0x4197bd[_0x234887(0x7e)]],_0x5715eb=_0x5009dc[_0x234887(0x83)]!=null?computeContentHash(_0x5009dc['scriptContent']):undefined,_0x1d94ad=await hasUnsyncedLocalChanges(_0x4197bd[_0x234887(0x9a)],_0x351fd2,_0x5715eb);_0x3aa5f6[_0x234887(0x75)]({'lockKey':_0x4197bd[_0x234887(0x7e)],'filePath':_0x4197bd[_0x234887(0x9a)],'remoteId':_0x5009dc['id']??null,'status':_0x1d94ad?_0x234887(0x98):_0x234887(0x86)});}return{'method':'GET','url':'/api/management/library/scripts/list?appCode='+_0x8d18f5[_0x234887(0x73)]+(_0x4eccdf?_0x234887(0xb2)+_0x4eccdf:''),'body':{'appCode':_0x8d18f5[_0x234887(0x73)],'filterType':_0x4eccdf??null,'files':_0x3aa5f6},'description':_0x234887(0x93)+_0x3aa5f6['length']+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x3617a3){const _0x120c16=a36_0x13f741,_0x1d8370=loadBffProjectConfig(_0x3617a3['appCode']),_0x917f08=await readBffLockFile(_0x1d8370[_0x120c16(0xa9)]),{lockData:_0x5b0eb8,appLock:_0x44bdda}=ensureLockScope(_0x917f08??createEmptyBffLock(),_0x3617a3[_0x120c16(0x73)],_0x1d8370[_0x120c16(0x99)],_0x120c16(0x94)),_0x11408a=normalizeBffType(_0x3617a3[_0x120c16(0x77)]('type'))??undefined;if(_0x3617a3['str'](_0x120c16(0x95))&&!_0x11408a)throw CliErrors[_0x120c16(0x9c)](_0x120c16(0x9f));const [_0x31c6fb,_0x362bb5]=await Promise[_0x120c16(0x8c)]([listBffScripts(_0x3617a3[_0x120c16(0x73)],_0x11408a),getBffScriptStatistics(_0x3617a3[_0x120c16(0x73)])]);if(_0x31c6fb[_0x120c16(0x84)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x120c16(0x70)};const _0x3a1608=_0x3617a3[_0x120c16(0x89)](_0x120c16(0xa4));if(_0x3a1608&&!_0x3617a3[_0x120c16(0x79)]){const _0x47d132=await confirmForce();if(!_0x47d132)throw CliErrors[_0x120c16(0x8f)](_0x120c16(0xb3));}if(_0x3a1608&&_0x3617a3[_0x120c16(0x79)]){}const _0x33b004=buildDatasetCodeToAliasMap(_0x3617a3[_0x120c16(0x9b)],_0x3617a3[_0x120c16(0x73)]),_0x19cd34=createHookLocationMap(_0x362bb5),_0x170412=JSON['parse'](JSON[_0x120c16(0xae)](_0x5b0eb8)),_0x213e39=_0x3617a3[_0x120c16(0x73)],_0x21f590=_0x170412[_0x120c16(0x7f)][_0x213e39];if(!_0x21f590)throw new Error(_0x120c16(0x81)+_0x213e39+_0x120c16(0xab));const _0x2174ab=[],_0xa4f0d0=[],_0x11d0b5=[];for(const _0x19662f of _0x31c6fb){const _0x48628d=resolveRemoteScriptTarget(_0x1d8370,_0x19662f,_0x19cd34,_0x44bdda['functions'],_0x33b004);if(!_0x48628d){_0xa4f0d0['push']({'lockKey':_0x19662f[_0x120c16(0xa6)]+'/'+_0x19662f[_0x120c16(0x7a)],'reason':'unresolvable\x20target\x20path'});continue;}const _0x5729f9=_0x44bdda[_0x120c16(0x90)][_0x48628d[_0x120c16(0x7e)]];try{if(!_0x19662f['id'])throw new Error(_0x120c16(0x72));if(_0x19662f[_0x120c16(0x83)]==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0xa2a8a4=_0x19662f[_0x120c16(0x83)],_0x4b4336=computeContentHash(_0xa2a8a4);if(!_0x3a1608){const _0x4a9b7e=await hasUnsyncedLocalChanges(_0x48628d[_0x120c16(0x9a)],_0x5729f9,_0x4b4336);if(_0x4a9b7e){_0xa4f0d0['push']({'lockKey':_0x48628d['lockKey'],'reason':_0x120c16(0xa1)});continue;}}await ensureParentDirectory(_0x48628d[_0x120c16(0x9a)]),await writeFile(_0x48628d['filePath'],_0xa2a8a4,_0x120c16(0x8b));const _0x9897e3={'hash':_0x4b4336,'remoteId':_0x19662f['id'],'version':_0x19662f['version']};_0x48628d[_0x120c16(0x95)]==='HOOK'&&_0x48628d[_0x120c16(0x78)]&&(_0x9897e3[_0x120c16(0xa3)]=_0x48628d['hookLocation'][_0x120c16(0xa3)],_0x9897e3[_0x120c16(0x85)]=_0x48628d['hookLocation'][_0x120c16(0x85)],_0x9897e3[_0x120c16(0x8a)]=_0x48628d[_0x120c16(0x78)]['operationType'],_0x9897e3['functionNode']=_0x48628d[_0x120c16(0x78)][_0x120c16(0x7d)]),_0x21f590[_0x120c16(0x90)][_0x48628d[_0x120c16(0x7e)]]=_0x9897e3,_0x2174ab[_0x120c16(0x75)]({'lockKey':_0x48628d[_0x120c16(0x7e)],'remoteId':_0x19662f['id']});}catch(_0x2d8b7e){_0x11d0b5[_0x120c16(0x75)]({'lockKey':_0x48628d['lockKey'],'error':_0x2d8b7e instanceof Error?_0x2d8b7e['message']:String(_0x2d8b7e)});}}return _0x21f590['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x1d8370[_0x120c16(0xa9)],_0x170412),{'ok':_0x11d0b5[_0x120c16(0x84)]===0x0,'data':{'pulled':_0x2174ab,'skipped':_0xa4f0d0,'failed':_0x11d0b5},'message':'Pull\x20complete:\x20'+_0x2174ab[_0x120c16(0x84)]+_0x120c16(0x76)+_0xa4f0d0[_0x120c16(0x84)]+_0x120c16(0xb1)+_0x11d0b5[_0x120c16(0x84)]+_0x120c16(0x8d)};}};async function hasUnsyncedLocalChanges(_0x476aa4,_0x425d7e,_0x185101){const _0x14195d=a36_0x13f741;if(!await fileExists(_0x476aa4))return![];const _0x9f49f4=await computeFileHash(_0x476aa4);if(!_0x425d7e)return _0x185101?_0x9f49f4!==_0x185101:!![];return _0x9f49f4!==_0x425d7e[_0x14195d(0xa7)];}function buildDatasetCodeToAliasMap(_0x3976a9,_0xab0586){const _0x32c6a5=a36_0x13f741,_0x1c18e6=loadAliasMap(_0x3976a9,undefined,resolveApiFilePath(_0x3976a9,_0xab0586));return new Map(_0x1c18e6[_0x32c6a5(0x91)](_0x5b0b28=>[_0x5b0b28['datasetCode'],_0x5b0b28[_0x32c6a5(0xa3)]]));}async function confirmForce(){const _0x4a59ce=a36_0x13f741,_0x1bb7f5=createInterface({'input':process[_0x4a59ce(0xac)],'output':process[_0x4a59ce(0x8e)]}),_0x40bf13=await new Promise(_0x42e38f=>{const _0x1ad1f8=_0x4a59ce;_0x1bb7f5[_0x1ad1f8(0x9d)](_0x1ad1f8(0xa0),_0x42e38f);});return _0x1bb7f5[_0x4a59ce(0x7b)](),['y',_0x4a59ce(0xad)][_0x4a59ce(0xa2)](_0x40bf13[_0x4a59ce(0xb0)]()['toLowerCase']());}
|
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a37_0x4f96ff=a37_0x365e;(function(_0x42139e,_0x2242eb){const _0x18a490=a37_0x365e,_0x3a9045=_0x42139e();while(!![]){try{const _0x105afa=-parseInt(_0x18a490(0x8f))/0x1+parseInt(_0x18a490(0xa4))/0x2*(parseInt(_0x18a490(0x98))/0x3)+-parseInt(_0x18a490(0xb8))/0x4*(-parseInt(_0x18a490(0xde))/0x5)+-parseInt(_0x18a490(0xd5))/0x6*(parseInt(_0x18a490(0xcc))/0x7)+-parseInt(_0x18a490(0xe3))/0x8*(parseInt(_0x18a490(0xb3))/0x9)+parseInt(_0x18a490(0xe5))/0xa*(-parseInt(_0x18a490(0xa8))/0xb)+-parseInt(_0x18a490(0xcb))/0xc*(-parseInt(_0x18a490(0x9a))/0xd);if(_0x105afa===_0x2242eb)break;else _0x3a9045['push'](_0x3a9045['shift']());}catch(_0x2ec8e3){_0x3a9045['push'](_0x3a9045['shift']());}}}(a37_0x1dd1,0xe373a));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';function a37_0x1dd1(){const _0x3f1bd3=['Force\x20push\x20ignoring\x20hash\x20protection','description','parse','17418XilhSF','Push\x20local\x20BFF\x20scripts\x20to\x20remote','alias','datasetCode','join','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','operationType','would_push','push','33120OKDxwu','functionNode','Would\x20inspect\x20','validation','datasetCodeToDataset','424bSGzRT','status','43910QmDlWt','string','499556FLWqKf','appCode','\x22\x20not\x20found\x20after\x20ensureLockScope.','filePath','boolean',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','some','COMMON','name','27KEnGKW','bff','234SUABuq','code','update','Run\x20`','high-risk-write','filter','runtime\x20cache\x20not\x20needed','message','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','/api/management/library/scripts/save','310146kOaiyY','attempted','\x20skipped,\x20','hash','1155jzepMP','lockKey','HOOK','bool','str','apps','stringify','remoteId','Runtime\x20script\x20cache\x20cleared.','force','No\x20local\x20BFF\x20functions\x20found.','245304estESn','get','lastSync','create','version','200MiLPMS','aliasToDatasetCode','cleared','lockFilePath','values','Push\x20only\x20this\x20script\x20type','Lock\x20scope\x20for\x20app\x20\x22','utf8','script','length','runtime\x20cache\x20clear\x20failed','every','scriptsRoot','POST','set','map','Cannot\x20resolve\x20dataset\x20for\x20\x22','functions','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','2052588MuKrOk','3542XdtTvG','\x20uploaded,\x20','has','unchanged','type','datasetId'];a37_0x1dd1=function(){return _0x3f1bd3;};return a37_0x1dd1();}import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a37_0x4f96ff(0x99),'command':'push','description':a37_0x4f96ff(0xd6),'risk':a37_0x4f96ff(0x9e),'flags':[{'name':'type','type':a37_0x4f96ff(0xe6),'description':a37_0x4f96ff(0xbd),'enum':[a37_0x4f96ff(0x96),'ENDPOINT',a37_0x4f96ff(0xaa)]},{'name':a37_0x4f96ff(0x97),'type':a37_0x4f96ff(0xe6),'description':a37_0x4f96ff(0xda)},{'name':a37_0x4f96ff(0xb1),'type':a37_0x4f96ff(0x93),'description':a37_0x4f96ff(0xd2)}],async 'dryRun'(_0x54c5b9){const _0x4b6c9f=a37_0x4f96ff,_0x443bd9=loadBffProjectConfig(_0x54c5b9[_0x4b6c9f(0x90)]),_0x50b76f=await readBffLockFile(_0x443bd9[_0x4b6c9f(0xbb)]),{appLock:_0x113b26}=ensureLockScope(_0x50b76f??createEmptyBffLock(),_0x54c5b9[_0x4b6c9f(0x90)],_0x443bd9[_0x4b6c9f(0xc4)],_0x4b6c9f(0xdd)),_0x4cadcf=await getTargetFunctions(_0x443bd9,_0x54c5b9),_0x3a14f7=_0x54c5b9[_0x4b6c9f(0xab)](_0x4b6c9f(0xb1)),_0x329700=[];for(const _0x2b1953 of _0x4cadcf){const _0x5dcb92=await computeFileHash(_0x2b1953[_0x4b6c9f(0x92)]),_0x2acd1b=_0x113b26[_0x4b6c9f(0xc9)][_0x2b1953['lockKey']],_0x571c91=!!_0x2acd1b&&_0x2acd1b[_0x4b6c9f(0xa7)]===_0x5dcb92;_0x329700[_0x4b6c9f(0xdd)]({'lockKey':_0x2b1953[_0x4b6c9f(0xa9)],'filePath':_0x2b1953[_0x4b6c9f(0x92)],'remoteId':_0x2acd1b?.[_0x4b6c9f(0xaf)]??null,'mode':_0x2acd1b?.[_0x4b6c9f(0xaf)]?_0x4b6c9f(0x9c):_0x4b6c9f(0xb6),'status':!_0x3a14f7&&_0x571c91?_0x4b6c9f(0xcf):_0x4b6c9f(0xdc)});}return{'method':_0x4b6c9f(0xc5),'url':_0x4b6c9f(0xa3),'body':{'appCode':_0x54c5b9['appCode'],'force':_0x3a14f7,'files':_0x329700,'cacheClearAtRuntime':_0x329700[_0x4b6c9f(0x95)](_0x590ec2=>_0x590ec2[_0x4b6c9f(0xe4)]===_0x4b6c9f(0xdc)),'cacheClearAtRuntimeTimes':_0x329700[_0x4b6c9f(0x95)](_0x567181=>_0x567181[_0x4b6c9f(0xe4)]===_0x4b6c9f(0xdc))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x4b6c9f(0xe0)+_0x329700[_0x4b6c9f(0xc1)]+_0x4b6c9f(0xa2)};},async 'execute'(_0x2c59c0){const _0x80563c=a37_0x4f96ff,_0x387d7f=loadBffProjectConfig(_0x2c59c0[_0x80563c(0x90)]),_0x454384=await readBffLockFile(_0x387d7f['lockFilePath']),{lockData:_0x291780,appLock:_0x4a2595}=ensureLockScope(_0x454384??createEmptyBffLock(),_0x2c59c0['appCode'],_0x387d7f[_0x80563c(0xc4)],'push'),_0x1f0a79=await getTargetFunctions(_0x387d7f,_0x2c59c0);if(_0x1f0a79[_0x80563c(0xc1)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x80563c(0xb2)};const _0x138e59=_0x2c59c0[_0x80563c(0xab)](_0x80563c(0xb1)),_0x134189=JSON[_0x80563c(0xd4)](JSON[_0x80563c(0xae)](_0x291780)),_0x46a896=_0x134189['apps'][_0x2c59c0[_0x80563c(0x90)]];if(!_0x46a896)throw new Error(_0x80563c(0xbe)+_0x2c59c0[_0x80563c(0x90)]+_0x80563c(0x91));const _0xba057d=await buildHookMaps(_0x2c59c0[_0x80563c(0x90)],_0x2c59c0['apiDir'],_0x1f0a79,_0x46a896),_0x57bb87=[],_0x28e0ef=[],_0x1e007f=[];for(const _0x30d0f1 of _0x1f0a79){const _0x91a12c=await computeFileHash(_0x30d0f1[_0x80563c(0x92)]),_0x3c1fcb=_0x46a896[_0x80563c(0xc9)][_0x30d0f1['lockKey']];if(!_0x138e59&&_0x3c1fcb&&_0x3c1fcb[_0x80563c(0xa7)]===_0x91a12c){_0x28e0ef['push']({'lockKey':_0x30d0f1[_0x80563c(0xa9)],'reason':_0x80563c(0xcf)});continue;}try{await uploadSingleFunction(_0x2c59c0[_0x80563c(0x90)],_0x30d0f1,_0x46a896,_0xba057d);const _0x128219=_0x46a896[_0x80563c(0xc9)][_0x30d0f1[_0x80563c(0xa9)]];_0x57bb87[_0x80563c(0xdd)]({'lockKey':_0x30d0f1[_0x80563c(0xa9)],'remoteId':_0x128219?.[_0x80563c(0xaf)]??0x0});}catch(_0x5ae046){_0x1e007f[_0x80563c(0xdd)]({'lockKey':_0x30d0f1['lockKey'],'error':_0x5ae046 instanceof Error?_0x5ae046['message']:String(_0x5ae046)});}}_0x46a896[_0x80563c(0xb5)]=new Date()['toISOString'](),await writeBffLockFile(_0x387d7f[_0x80563c(0xbb)],_0x134189),await waitForUploadedLockEntries(_0x387d7f[_0x80563c(0xbb)],_0x2c59c0['appCode'],_0x57bb87[_0x80563c(0xc7)](_0x58f71d=>_0x58f71d['lockKey']));let _0x9f82ff={'attempted':![],'cleared':![]};if(_0x57bb87[_0x80563c(0xc1)]>0x0)try{let _0x51ebf1='';for(let _0x1782a5=0x0;_0x1782a5<CACHE_CLEAR_ATTEMPTS;_0x1782a5+=0x1){_0x51ebf1=await clearBffScriptCache(),_0x1782a5<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x9f82ff={'attempted':!![],'cleared':!![],'message':_0x51ebf1||_0x80563c(0xb0)};}catch(_0x2827dd){_0x9f82ff={'attempted':!![],'cleared':![],'error':_0x2827dd instanceof Error?_0x2827dd[_0x80563c(0xa1)]:String(_0x2827dd)};}const _0x22fc91=_0x1e007f[_0x80563c(0xc1)]===0x0&&(_0x9f82ff[_0x80563c(0xa5)]?_0x9f82ff['cleared']:!![]),_0x21e9bf=_0x9f82ff[_0x80563c(0xa5)]?_0x9f82ff[_0x80563c(0xba)]?'runtime\x20cache\x20cleared':_0x80563c(0xc2):_0x80563c(0xa0);return{'ok':_0x22fc91,'data':{'uploaded':_0x57bb87,'skipped':_0x28e0ef,'failed':_0x1e007f,'cacheClear':_0x9f82ff},'message':'Push\x20complete:\x20'+_0x57bb87[_0x80563c(0xc1)]+_0x80563c(0xcd)+_0x28e0ef[_0x80563c(0xc1)]+_0x80563c(0xa6)+_0x1e007f[_0x80563c(0xc1)]+'\x20failed,\x20'+_0x21e9bf};}};function a37_0x365e(_0x4b2d46,_0x1ca5b6){_0x4b2d46=_0x4b2d46-0x8f;const _0x1dd114=a37_0x1dd1();let _0x365eb4=_0x1dd114[_0x4b2d46];return _0x365eb4;}async function getTargetFunctions(_0x521d62,_0x301095){const _0x11316c=a37_0x4f96ff,_0x3bfc5d=_0x301095[_0x11316c(0xac)](_0x11316c(0xd0)),_0x542ff7=_0x301095[_0x11316c(0xac)](_0x11316c(0x97)),_0x1d0158=normalizeBffType(_0x3bfc5d)??undefined;if(_0x542ff7&&!_0x1d0158)throw CliErrors[_0x11316c(0xe1)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x63882e=await scanLocalBffFunctions(_0x521d62,_0x1d0158);if(_0x542ff7){const _0x35fba7=_0x63882e[_0x11316c(0x9f)](_0x46015c=>_0x46015c[_0x11316c(0x97)]===_0x542ff7);if(_0x35fba7[_0x11316c(0xc1)]===0x0)throw CliErrors[_0x11316c(0xe1)]('Local\x20function\x20not\x20found:\x20'+_0x1d0158+'/'+_0x542ff7);return _0x35fba7;}return _0x63882e;}async function buildHookMaps(_0x51b707,_0x27fe71,_0x10f5c6,_0x44c3dc){const _0x459a11=a37_0x4f96ff,_0x403b1a=_0x10f5c6[_0x459a11(0x95)](_0x28a24a=>_0x28a24a[_0x459a11(0xd0)]==='HOOK');if(!_0x403b1a)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x56ae00=loadAliasMap(_0x27fe71,undefined,resolveApiFilePath(_0x27fe71,_0x51b707)),_0x3f6d25=new Map(_0x56ae00[_0x459a11(0xc7)](_0x5267ba=>[_0x5267ba[_0x459a11(0xd7)],_0x5267ba[_0x459a11(0xd8)]]));for(const _0x28382d of Object[_0x459a11(0xbc)](_0x44c3dc['functions'])){_0x28382d[_0x459a11(0xd7)]&&_0x28382d[_0x459a11(0xd8)]&&!_0x3f6d25[_0x459a11(0xce)](_0x28382d['alias'])&&_0x3f6d25[_0x459a11(0xc6)](_0x28382d[_0x459a11(0xd7)],_0x28382d[_0x459a11(0xd8)]);}const _0x8a544a=await listDatasets(_0x51b707),_0x32b46b=new Map(_0x8a544a[_0x459a11(0xc7)](_0x4b2040=>[_0x4b2040[_0x459a11(0x9b)],_0x4b2040]));return{'aliasToDatasetCode':_0x3f6d25,'datasetCodeToDataset':_0x32b46b};}async function uploadSingleFunction(_0x37bb9e,_0x9aad32,_0x264a6e,_0x6f4531){const _0x366d41=a37_0x4f96ff,_0x1327ed=await readFile(_0x9aad32[_0x366d41(0x92)],_0x366d41(0xbf)),_0x7badb5=await computeFileHash(_0x9aad32[_0x366d41(0x92)]),_0x26b035=_0x264a6e[_0x366d41(0xc9)][_0x9aad32[_0x366d41(0xa9)]];if(_0x26b035?.[_0x366d41(0xaf)]&&_0x26b035[_0x366d41(0xb7)]==null)throw CliErrors[_0x366d41(0xe1)](_0x9aad32[_0x366d41(0xa9)]+_0x366d41(0x94));let _0x254e16=extractScriptDescription(_0x1327ed);if(!_0x254e16&&_0x26b035?.[_0x366d41(0xaf)]){const _0x1c3d47=await getBffScriptInfo(_0x26b035['remoteId']);_0x254e16=_0x1c3d47[_0x366d41(0xd3)]||undefined;}const _0x3e41c7={'appCode':_0x37bb9e,'functionName':_0x9aad32[_0x366d41(0x97)],'scriptType':_0x9aad32['type'],'scriptContent':_0x1327ed};if(_0x26b035?.['remoteId'])_0x3e41c7['id']=_0x26b035[_0x366d41(0xaf)];if(_0x26b035?.[_0x366d41(0xb7)]!=null)_0x3e41c7[_0x366d41(0xb7)]=_0x26b035[_0x366d41(0xb7)];if(_0x254e16)_0x3e41c7[_0x366d41(0xd3)]=_0x254e16;if(_0x9aad32['type']===_0x366d41(0xaa)){const _0x3da592=_0x9aad32[_0x366d41(0xd7)];if(!_0x3da592||!_0x9aad32['operationType']||!_0x9aad32[_0x366d41(0xdf)])throw CliErrors['validation']('Incomplete\x20HOOK\x20path:\x20'+_0x9aad32[_0x366d41(0xa9)]);const _0x596b1f=_0x6f4531[_0x366d41(0xb9)][_0x366d41(0xb4)](_0x3da592)??_0x26b035?.[_0x366d41(0xd8)]??_0x3da592,_0x2eaf6e=_0x6f4531[_0x366d41(0xe2)][_0x366d41(0xb4)](_0x596b1f);if(!_0x2eaf6e)throw CliErrors['validation'](_0x366d41(0xc8)+_0x3da592+'\x22.\x20'+(_0x366d41(0x9d)+CLI_BIN_NAME+_0x366d41(0xca)));_0x3e41c7[_0x366d41(0xd1)]=_0x2eaf6e['id'],_0x3e41c7[_0x366d41(0xdb)]=_0x9aad32['operationType'],_0x3e41c7[_0x366d41(0xdf)]=_0x9aad32['functionNode'];}const _0x1fee95=await saveBffScript(_0x3e41c7),_0x23c940=_0x1fee95['id'],_0x23e1f7=_0x1fee95[_0x366d41(0xc0)]??await getBffScriptInfo(_0x23c940),_0x5a4ea6={'hash':_0x7badb5,'remoteId':_0x23c940,'version':_0x23e1f7['version']};if(_0x9aad32[_0x366d41(0xd0)]===_0x366d41(0xaa)){const _0x5bbb81=_0x9aad32['alias'],_0x3342a2=_0x6f4531['aliasToDatasetCode']['get'](_0x5bbb81)??_0x26b035?.[_0x366d41(0xd8)]??_0x5bbb81;_0x6f4531[_0x366d41(0xb9)][_0x366d41(0xce)](_0x5bbb81)?_0x5a4ea6[_0x366d41(0xd7)]=_0x5bbb81:_0x5a4ea6[_0x366d41(0xd7)]=_0x26b035?.[_0x366d41(0xd7)],_0x5a4ea6[_0x366d41(0xd8)]=_0x3342a2,_0x5a4ea6[_0x366d41(0xdb)]=_0x9aad32[_0x366d41(0xdb)],_0x5a4ea6[_0x366d41(0xdf)]=_0x9aad32[_0x366d41(0xdf)];}_0x264a6e[_0x366d41(0xc9)][_0x9aad32['lockKey']]=_0x5a4ea6;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x1017f5,_0x4786fa,_0x18adec){const _0x4d388b=a37_0x4f96ff;if(_0x18adec[_0x4d388b(0xc1)]===0x0)return;for(let _0x1d66f6=0x0;_0x1d66f6<LOCK_SETTLE_RETRY_COUNT;_0x1d66f6+=0x1){const _0x18eefb=await readBffLockFile(_0x1017f5),_0x51dfa5=_0x18eefb?.[_0x4d388b(0xad)]?.[_0x4786fa]?.[_0x4d388b(0xc9)]??{},_0x19c223=_0x18adec[_0x4d388b(0xc3)](_0xdae8f5=>!!_0x51dfa5[_0xdae8f5]?.[_0x4d388b(0xaf)]);if(_0x19c223)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x18adec[_0x4d388b(0xd9)](',\x20')+'.');}
|
|
1
|
+
const a37_0x17e72b=a37_0x2de6;(function(_0x3465d1,_0x27f53f){const _0x38458f=a37_0x2de6,_0x28b551=_0x3465d1();while(!![]){try{const _0x2acb92=-parseInt(_0x38458f(0x200))/0x1+parseInt(_0x38458f(0x20e))/0x2+parseInt(_0x38458f(0x1dc))/0x3+-parseInt(_0x38458f(0x1d6))/0x4*(parseInt(_0x38458f(0x1c8))/0x5)+-parseInt(_0x38458f(0x207))/0x6*(-parseInt(_0x38458f(0x208))/0x7)+parseInt(_0x38458f(0x1d5))/0x8*(parseInt(_0x38458f(0x1cd))/0x9)+-parseInt(_0x38458f(0x209))/0xa;if(_0x2acb92===_0x27f53f)break;else _0x28b551['push'](_0x28b551['shift']());}catch(_0x4e363d){_0x28b551['push'](_0x28b551['shift']());}}}(a37_0x1bfe,0x76c9d));function a37_0x1bfe(){const _0x1a2c6d=['attempted','3951OCaUDa','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','\x20uploaded,\x20','create','Push\x20local\x20BFF\x20scripts\x20to\x20remote','boolean','would_push','9504upuWvD','3308iRIAGN','version','Local\x20function\x20not\x20found:\x20','runtime\x20cache\x20cleared','every','Push\x20only\x20this\x20script\x20type','2892984whRnSr','hash','stringify','utf8','validation','type','POST','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','datasetCode','appCode','set','name','update','message','operationType','length','some','lockKey','string','\x20skipped,\x20','Lock\x20scope\x20for\x20app\x20\x22','apps','push','datasetId','get','parse','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','HOOK','lastSync','Push\x20complete:\x20','unchanged','alias','code','\x22\x20not\x20found\x20after\x20ensureLockScope.','/api/management/library/scripts/save','ENDPOINT','510262uJAKmS','scriptsRoot','bool','aliasToDatasetCode','force','Run\x20`','Cannot\x20resolve\x20dataset\x20for\x20\x22','18qiVQhx','2245579cYfTHr','19126470dryEmv','bff','COMMON','Incomplete\x20HOOK\x20path:\x20','map','963780MXStKN','\x22.\x20','functionNode','No\x20local\x20BFF\x20functions\x20found.','remoteId','functions','lockFilePath','description','toISOString','high-risk-write','125ioCKUl','has','status','filePath'];a37_0x1bfe=function(){return _0x1a2c6d;};return a37_0x1bfe();}import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a37_0x2de6(_0x1d5fd4,_0x26f83c){_0x1d5fd4=_0x1d5fd4-0x1c4;const _0x1bfe86=a37_0x1bfe();let _0x2de6d3=_0x1bfe86[_0x1d5fd4];return _0x2de6d3;}import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a37_0x17e72b(0x20a),'command':'push','description':a37_0x17e72b(0x1d2),'risk':a37_0x17e72b(0x1c7),'flags':[{'name':a37_0x17e72b(0x1e1),'type':a37_0x17e72b(0x1ee),'description':a37_0x17e72b(0x1db),'enum':[a37_0x17e72b(0x20b),a37_0x17e72b(0x1ff),a37_0x17e72b(0x1f7)]},{'name':a37_0x17e72b(0x1e7),'type':'string','description':a37_0x17e72b(0x1ce)},{'name':a37_0x17e72b(0x204),'type':a37_0x17e72b(0x1d3),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x397f09){const _0x326894=a37_0x17e72b,_0x5029f4=loadBffProjectConfig(_0x397f09[_0x326894(0x1e5)]),_0x3abd00=await readBffLockFile(_0x5029f4[_0x326894(0x1c4)]),{appLock:_0x161872}=ensureLockScope(_0x3abd00??createEmptyBffLock(),_0x397f09[_0x326894(0x1e5)],_0x5029f4[_0x326894(0x201)],'push'),_0x40c972=await getTargetFunctions(_0x5029f4,_0x397f09),_0x4413a7=_0x397f09['bool'](_0x326894(0x204)),_0x6ddc42=[];for(const _0x1da8b2 of _0x40c972){const _0x4fa5f8=await computeFileHash(_0x1da8b2[_0x326894(0x1cb)]),_0x4622fa=_0x161872[_0x326894(0x213)][_0x1da8b2[_0x326894(0x1ed)]],_0x353ea8=!!_0x4622fa&&_0x4622fa[_0x326894(0x1dd)]===_0x4fa5f8;_0x6ddc42[_0x326894(0x1f2)]({'lockKey':_0x1da8b2[_0x326894(0x1ed)],'filePath':_0x1da8b2[_0x326894(0x1cb)],'remoteId':_0x4622fa?.[_0x326894(0x212)]??null,'mode':_0x4622fa?.['remoteId']?_0x326894(0x1e8):_0x326894(0x1d1),'status':!_0x4413a7&&_0x353ea8?_0x326894(0x1fa):_0x326894(0x1d4)});}return{'method':_0x326894(0x1e2),'url':_0x326894(0x1fe),'body':{'appCode':_0x397f09[_0x326894(0x1e5)],'force':_0x4413a7,'files':_0x6ddc42,'cacheClearAtRuntime':_0x6ddc42[_0x326894(0x1ec)](_0x3e7e47=>_0x3e7e47[_0x326894(0x1ca)]==='would_push'),'cacheClearAtRuntimeTimes':_0x6ddc42[_0x326894(0x1ec)](_0x2f8d6a=>_0x2f8d6a['status']===_0x326894(0x1d4))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x6ddc42[_0x326894(0x1eb)]+_0x326894(0x1e3)};},async 'execute'(_0x428d5d){const _0x1da3a3=a37_0x17e72b,_0x2d30fb=loadBffProjectConfig(_0x428d5d[_0x1da3a3(0x1e5)]),_0x4d993b=await readBffLockFile(_0x2d30fb[_0x1da3a3(0x1c4)]),{lockData:_0x21a955,appLock:_0x3c73c0}=ensureLockScope(_0x4d993b??createEmptyBffLock(),_0x428d5d[_0x1da3a3(0x1e5)],_0x2d30fb[_0x1da3a3(0x201)],_0x1da3a3(0x1f2)),_0x5aac74=await getTargetFunctions(_0x2d30fb,_0x428d5d);if(_0x5aac74[_0x1da3a3(0x1eb)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x1da3a3(0x211)};const _0x466972=_0x428d5d[_0x1da3a3(0x202)](_0x1da3a3(0x204)),_0x1dd862=JSON[_0x1da3a3(0x1f5)](JSON[_0x1da3a3(0x1de)](_0x21a955)),_0x248ea9=_0x1dd862[_0x1da3a3(0x1f1)][_0x428d5d[_0x1da3a3(0x1e5)]];if(!_0x248ea9)throw new Error(_0x1da3a3(0x1f0)+_0x428d5d[_0x1da3a3(0x1e5)]+_0x1da3a3(0x1fd));const _0x5c5aed=await buildHookMaps(_0x428d5d[_0x1da3a3(0x1e5)],_0x428d5d['apiDir'],_0x5aac74,_0x248ea9),_0x53c60b=[],_0x32cb8f=[],_0x2110fe=[];for(const _0xbbd623 of _0x5aac74){const _0x5213f0=await computeFileHash(_0xbbd623[_0x1da3a3(0x1cb)]),_0x51e1a2=_0x248ea9['functions'][_0xbbd623[_0x1da3a3(0x1ed)]];if(!_0x466972&&_0x51e1a2&&_0x51e1a2[_0x1da3a3(0x1dd)]===_0x5213f0){_0x32cb8f[_0x1da3a3(0x1f2)]({'lockKey':_0xbbd623[_0x1da3a3(0x1ed)],'reason':_0x1da3a3(0x1fa)});continue;}try{await uploadSingleFunction(_0x428d5d[_0x1da3a3(0x1e5)],_0xbbd623,_0x248ea9,_0x5c5aed);const _0x25af2b=_0x248ea9[_0x1da3a3(0x213)][_0xbbd623[_0x1da3a3(0x1ed)]];_0x53c60b[_0x1da3a3(0x1f2)]({'lockKey':_0xbbd623['lockKey'],'remoteId':_0x25af2b?.[_0x1da3a3(0x212)]??0x0});}catch(_0x2a1f71){_0x2110fe[_0x1da3a3(0x1f2)]({'lockKey':_0xbbd623['lockKey'],'error':_0x2a1f71 instanceof Error?_0x2a1f71[_0x1da3a3(0x1e9)]:String(_0x2a1f71)});}}_0x248ea9[_0x1da3a3(0x1f8)]=new Date()[_0x1da3a3(0x1c6)](),await writeBffLockFile(_0x2d30fb[_0x1da3a3(0x1c4)],_0x1dd862),await waitForUploadedLockEntries(_0x2d30fb[_0x1da3a3(0x1c4)],_0x428d5d['appCode'],_0x53c60b['map'](_0x169307=>_0x169307[_0x1da3a3(0x1ed)]));let _0x24382c={'attempted':![],'cleared':![]};if(_0x53c60b[_0x1da3a3(0x1eb)]>0x0)try{let _0x527062='';for(let _0x354b69=0x0;_0x354b69<CACHE_CLEAR_ATTEMPTS;_0x354b69+=0x1){_0x527062=await clearBffScriptCache(),_0x354b69<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x24382c={'attempted':!![],'cleared':!![],'message':_0x527062||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0xd99838){_0x24382c={'attempted':!![],'cleared':![],'error':_0xd99838 instanceof Error?_0xd99838[_0x1da3a3(0x1e9)]:String(_0xd99838)};}const _0x1327fb=_0x2110fe[_0x1da3a3(0x1eb)]===0x0&&(_0x24382c[_0x1da3a3(0x1cc)]?_0x24382c['cleared']:!![]),_0x5a0122=_0x24382c[_0x1da3a3(0x1cc)]?_0x24382c['cleared']?_0x1da3a3(0x1d9):'runtime\x20cache\x20clear\x20failed':'runtime\x20cache\x20not\x20needed';return{'ok':_0x1327fb,'data':{'uploaded':_0x53c60b,'skipped':_0x32cb8f,'failed':_0x2110fe,'cacheClear':_0x24382c},'message':_0x1da3a3(0x1f9)+_0x53c60b['length']+_0x1da3a3(0x1d0)+_0x32cb8f[_0x1da3a3(0x1eb)]+_0x1da3a3(0x1ef)+_0x2110fe['length']+'\x20failed,\x20'+_0x5a0122};}};async function getTargetFunctions(_0x11f76c,_0x340403){const _0xaada7a=a37_0x17e72b,_0x278abb=_0x340403['str']('type'),_0xa0f43f=_0x340403['str']('name'),_0x1c33e8=normalizeBffType(_0x278abb)??undefined;if(_0xa0f43f&&!_0x1c33e8)throw CliErrors[_0xaada7a(0x1e0)](_0xaada7a(0x1f6));const _0x2a52d7=await scanLocalBffFunctions(_0x11f76c,_0x1c33e8);if(_0xa0f43f){const _0x9e0f46=_0x2a52d7['filter'](_0x526a44=>_0x526a44[_0xaada7a(0x1e7)]===_0xa0f43f);if(_0x9e0f46[_0xaada7a(0x1eb)]===0x0)throw CliErrors[_0xaada7a(0x1e0)](_0xaada7a(0x1d8)+_0x1c33e8+'/'+_0xa0f43f);return _0x9e0f46;}return _0x2a52d7;}async function buildHookMaps(_0x191f90,_0x5e3dae,_0x1b85eb,_0x502690){const _0x30fe23=a37_0x17e72b,_0x83cf1=_0x1b85eb[_0x30fe23(0x1ec)](_0x48249c=>_0x48249c[_0x30fe23(0x1e1)]==='HOOK');if(!_0x83cf1)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x439be4=loadAliasMap(_0x5e3dae,undefined,resolveApiFilePath(_0x5e3dae,_0x191f90)),_0x4b5766=new Map(_0x439be4[_0x30fe23(0x20d)](_0x520390=>[_0x520390[_0x30fe23(0x1fb)],_0x520390['datasetCode']]));for(const _0x354cb8 of Object['values'](_0x502690[_0x30fe23(0x213)])){_0x354cb8['alias']&&_0x354cb8['datasetCode']&&!_0x4b5766['has'](_0x354cb8['alias'])&&_0x4b5766[_0x30fe23(0x1e6)](_0x354cb8[_0x30fe23(0x1fb)],_0x354cb8[_0x30fe23(0x1e4)]);}const _0x110cb6=await listDatasets(_0x191f90),_0x44b559=new Map(_0x110cb6[_0x30fe23(0x20d)](_0x3436fa=>[_0x3436fa[_0x30fe23(0x1fc)],_0x3436fa]));return{'aliasToDatasetCode':_0x4b5766,'datasetCodeToDataset':_0x44b559};}async function uploadSingleFunction(_0x457930,_0x548d87,_0x4930fb,_0x1bc3a0){const _0x265229=a37_0x17e72b,_0x776d5e=await readFile(_0x548d87['filePath'],_0x265229(0x1df)),_0xea240=await computeFileHash(_0x548d87[_0x265229(0x1cb)]),_0x355a81=_0x4930fb['functions'][_0x548d87['lockKey']];if(_0x355a81?.[_0x265229(0x212)]&&_0x355a81['version']==null)throw CliErrors['validation'](_0x548d87[_0x265229(0x1ed)]+_0x265229(0x1cf));let _0x243900=extractScriptDescription(_0x776d5e);if(!_0x243900&&_0x355a81?.[_0x265229(0x212)]){const _0x59d60b=await getBffScriptInfo(_0x355a81[_0x265229(0x212)]);_0x243900=_0x59d60b[_0x265229(0x1c5)]||undefined;}const _0x1ac230={'appCode':_0x457930,'functionName':_0x548d87[_0x265229(0x1e7)],'scriptType':_0x548d87['type'],'scriptContent':_0x776d5e};if(_0x355a81?.['remoteId'])_0x1ac230['id']=_0x355a81['remoteId'];if(_0x355a81?.[_0x265229(0x1d7)]!=null)_0x1ac230[_0x265229(0x1d7)]=_0x355a81['version'];if(_0x243900)_0x1ac230[_0x265229(0x1c5)]=_0x243900;if(_0x548d87['type']==='HOOK'){const _0x52203e=_0x548d87[_0x265229(0x1fb)];if(!_0x52203e||!_0x548d87[_0x265229(0x1ea)]||!_0x548d87[_0x265229(0x210)])throw CliErrors['validation'](_0x265229(0x20c)+_0x548d87[_0x265229(0x1ed)]);const _0x132139=_0x1bc3a0[_0x265229(0x203)][_0x265229(0x1f4)](_0x52203e)??_0x355a81?.[_0x265229(0x1e4)]??_0x52203e,_0x4f4e98=_0x1bc3a0['datasetCodeToDataset'][_0x265229(0x1f4)](_0x132139);if(!_0x4f4e98)throw CliErrors['validation'](_0x265229(0x206)+_0x52203e+_0x265229(0x20f)+(_0x265229(0x205)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x1ac230[_0x265229(0x1f3)]=_0x4f4e98['id'],_0x1ac230[_0x265229(0x1ea)]=_0x548d87[_0x265229(0x1ea)],_0x1ac230[_0x265229(0x210)]=_0x548d87[_0x265229(0x210)];}const _0x1058f7=await saveBffScript(_0x1ac230),_0x71e67c=_0x1058f7['id'],_0x3c062c=_0x1058f7['script']??await getBffScriptInfo(_0x71e67c),_0x39a78f={'hash':_0xea240,'remoteId':_0x71e67c,'version':_0x3c062c[_0x265229(0x1d7)]};if(_0x548d87[_0x265229(0x1e1)]===_0x265229(0x1f7)){const _0x41fa04=_0x548d87['alias'],_0x3e84d9=_0x1bc3a0[_0x265229(0x203)][_0x265229(0x1f4)](_0x41fa04)??_0x355a81?.[_0x265229(0x1e4)]??_0x41fa04;_0x1bc3a0[_0x265229(0x203)][_0x265229(0x1c9)](_0x41fa04)?_0x39a78f[_0x265229(0x1fb)]=_0x41fa04:_0x39a78f[_0x265229(0x1fb)]=_0x355a81?.[_0x265229(0x1fb)],_0x39a78f[_0x265229(0x1e4)]=_0x3e84d9,_0x39a78f[_0x265229(0x1ea)]=_0x548d87[_0x265229(0x1ea)],_0x39a78f[_0x265229(0x210)]=_0x548d87[_0x265229(0x210)];}_0x4930fb['functions'][_0x548d87[_0x265229(0x1ed)]]=_0x39a78f;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x5dd67d,_0x27dbbb,_0x1398a1){const _0x1df5e9=a37_0x17e72b;if(_0x1398a1[_0x1df5e9(0x1eb)]===0x0)return;for(let _0xc22b51=0x0;_0xc22b51<LOCK_SETTLE_RETRY_COUNT;_0xc22b51+=0x1){const _0x3ff433=await readBffLockFile(_0x5dd67d),_0x20b517=_0x3ff433?.[_0x1df5e9(0x1f1)]?.[_0x27dbbb]?.['functions']??{},_0x34d054=_0x1398a1[_0x1df5e9(0x1da)](_0x2a0b8f=>!!_0x20b517[_0x2a0b8f]?.[_0x1df5e9(0x212)]);if(_0x34d054)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x1398a1['join'](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a38_0x58fd71=a38_0x229a;(function(_0x2af516,_0xf26f88){const _0x425e9c=a38_0x229a,_0x26e36a=_0x2af516();while(!![]){try{const _0x42a02d=parseInt(_0x425e9c(0x8e))/0x1*(-parseInt(_0x425e9c(0x7a))/0x2)+-parseInt(_0x425e9c(0x8a))/0x3*(-parseInt(_0x425e9c(0x75))/0x4)+parseInt(_0x425e9c(0x85))/0x5*(-parseInt(_0x425e9c(0x8c))/0x6)+parseInt(_0x425e9c(0x7e))/0x7+parseInt(_0x425e9c(0x8b))/0x8*(parseInt(_0x425e9c(0x80))/0x9)+-parseInt(_0x425e9c(0x78))/0xa*(-parseInt(_0x425e9c(0x7d))/0xb)+-parseInt(_0x425e9c(0x90))/0xc*(parseInt(_0x425e9c(0x7f))/0xd);if(_0x42a02d===_0xf26f88)break;else _0x26e36a['push'](_0x26e36a['shift']());}catch(_0xc627c8){_0x26e36a['push'](_0x26e36a['shift']());}}}(a38_0x549b,0x66dd5));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';function a38_0x549b(){const _0x232922=['5227012rBozqn','104bwvkjQ','9UfjlYu','lockFilePath','length','status','apiDir','721615IyzEkI','remote','boolean','scriptsRoot','read','672411JarBnM','2407784ebUbII','18KBqtCh','has','8MgRbAo','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','1276176vlsrPc','\x20added,\x20','datasetCode','lockKey','bool','bff','4MUIeGb','push','\x20modified,\x20','4713560SEEBTj','functions','9524eJPpCX','All\x20BFF\x20scripts\x20are\x20in\x20sync.','appCode','11XwGpPE'];a38_0x549b=function(){return _0x232922;};return a38_0x549b();}import{computeFileHash}from'../../core/bff/hash.js';function a38_0x229a(_0x32f087,_0x42e792){_0x32f087=_0x32f087-0x72;const _0x549baa=a38_0x549b();let _0x229a4d=_0x549baa[_0x32f087];return _0x229a4d;}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x58fd71(0x74),'command':'status','description':a38_0x58fd71(0x8f),'risk':a38_0x58fd71(0x89),'flags':[{'name':'remote','type':a38_0x58fd71(0x87),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0xc1b394){const _0x2755b2=a38_0x58fd71,_0x44fdc3=loadBffProjectConfig(_0xc1b394[_0x2755b2(0x7c)]),_0x16c03d=await readBffLockFile(_0x44fdc3[_0x2755b2(0x81)]),{appLock:_0x5bcfd0}=ensureLockScope(_0x16c03d??createEmptyBffLock(),_0xc1b394[_0x2755b2(0x7c)],_0x44fdc3[_0x2755b2(0x88)],_0x2755b2(0x83)),_0x219d18=await scanLocalBffFunctions(_0x44fdc3),_0x15d72c=[],_0x5ee01f=[],_0x58b029=[];for(const _0xa638d5 of _0x219d18){const _0x5dedf2=await computeFileHash(_0xa638d5['filePath']),_0x4cfcd6=_0x5bcfd0[_0x2755b2(0x79)][_0xa638d5[_0x2755b2(0x72)]];if(!_0x4cfcd6)_0x15d72c[_0x2755b2(0x76)](_0xa638d5[_0x2755b2(0x72)]);else _0x4cfcd6['hash']!==_0x5dedf2?_0x5ee01f['push'](_0xa638d5[_0x2755b2(0x72)]):_0x58b029[_0x2755b2(0x76)](_0xa638d5[_0x2755b2(0x72)]);}const _0x5c8b9a=[];if(_0xc1b394[_0x2755b2(0x73)](_0x2755b2(0x86))){const _0x2fb396=loadAliasMap(_0xc1b394[_0x2755b2(0x84)],undefined,resolveApiFilePath(_0xc1b394[_0x2755b2(0x84)],_0xc1b394[_0x2755b2(0x7c)])),_0x2f52fc=new Map(_0x2fb396['map'](_0x38bc28=>[_0x38bc28[_0x2755b2(0x92)],_0x38bc28['alias']])),[_0x34ba6d,_0x36638e]=await Promise['all']([listBffScripts(_0xc1b394['appCode']),getBffScriptStatistics(_0xc1b394[_0x2755b2(0x7c)])]),_0x1c6a44=createHookLocationMap(_0x36638e),_0x44b866=new Set(_0x219d18['map'](_0x5f59a9=>_0x5f59a9[_0x2755b2(0x72)]));for(const _0x1e4ba4 of _0x34ba6d){const _0x57e169=resolveRemoteScriptTarget(_0x44fdc3,_0x1e4ba4,_0x1c6a44,_0x5bcfd0[_0x2755b2(0x79)],_0x2f52fc);_0x57e169&&!_0x44b866[_0x2755b2(0x8d)](_0x57e169[_0x2755b2(0x72)])&&_0x5c8b9a[_0x2755b2(0x76)](_0x57e169['lockKey']);}}const _0x4a2336=_0x15d72c['length']===0x0&&_0x5ee01f[_0x2755b2(0x82)]===0x0&&_0x5c8b9a[_0x2755b2(0x82)]===0x0;return{'ok':!![],'data':{'added':_0x15d72c,'modified':_0x5ee01f,'unchanged':_0x58b029,'remoteOnly':_0x5c8b9a},'message':_0x4a2336?_0x2755b2(0x7b):_0x15d72c[_0x2755b2(0x82)]+_0x2755b2(0x91)+_0x5ee01f[_0x2755b2(0x82)]+_0x2755b2(0x77)+_0x58b029[_0x2755b2(0x82)]+'\x20unchanged'+(_0x5c8b9a[_0x2755b2(0x82)]>0x0?',\x20'+_0x5c8b9a['length']+'\x20remote-only':'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a39_0x1bc386=a39_0x4498;function a39_0x201d(){const _0x15163d=['Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','6165260KnGrKY','log','install','nonInteractive','308813sKMizA','2vEDjgP','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','35cqeiyn','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','npx\x20skills\x20add\x20failed:\x20','5414240VYxkqM','3345470nZBJii','error','9axCIJT','cwd','inherit','cli-skill-install','unknown','write','931816eTjVoi',')...','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','842886wBkoOe','setLogPath','513324ZFkVSA','apiError','info','pipe','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','skipped'];a39_0x201d=function(){return _0x15163d;};return a39_0x201d();}(function(_0x4d66bb,_0x37f2bc){const _0x52e916=a39_0x4498,_0x3d6f1b=_0x4d66bb();while(!![]){try{const _0x222d36=parseInt(_0x52e916(0x73))/0x1*(parseInt(_0x52e916(0x74))/0x2)+parseInt(_0x52e916(0x85))/0x3+-parseInt(_0x52e916(0x79))/0x4+parseInt(_0x52e916(0x8e))/0x5+-parseInt(_0x52e916(0x87))/0x6*(-parseInt(_0x52e916(0x76))/0x7)+parseInt(_0x52e916(0x82))/0x8+parseInt(_0x52e916(0x7c))/0x9*(-parseInt(_0x52e916(0x7a))/0xa);if(_0x222d36===_0x37f2bc)break;else _0x3d6f1b['push'](_0x3d6f1b['shift']());}catch(_0x132c78){_0x3d6f1b['push'](_0x3d6f1b['shift']());}}}(a39_0x201d,0xa5c37));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';function a39_0x4498(_0x2da428,_0xa25dab){_0x2da428=_0x2da428-0x70;const _0x201d6a=a39_0x201d();let _0x4498db=_0x201d6a[_0x2da428];return _0x4498db;}export const cliSkillDefinitions=[{'service':'cli-skill','command':a39_0x1bc386(0x71),'description':a39_0x1bc386(0x84),'risk':a39_0x1bc386(0x81),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x32b11b){const _0x14e883=a39_0x1bc386;logger[_0x14e883(0x86)](process['cwd']()),logger[_0x14e883(0x89)](_0x14e883(0x7f),_0x14e883(0x77));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x4636ab,RABETBASE_SKILL_SOURCE:_0xadbecc,runNpxSkillsAddGlobal:_0x5673f9}=await import('../../skills/npx-skills-add.js'),_0x415bb3=_0x32b11b[_0x14e883(0x72)]?_0x14e883(0x8a):_0x14e883(0x7e);console[_0x14e883(0x70)](_0x14e883(0x8d)+_0x4636ab+_0x14e883(0x83));const _0x74c4b5=_0x5673f9(process[_0x14e883(0x7d)](),_0xadbecc,{'stdio':_0x415bb3});if(_0x74c4b5[_0x14e883(0x8c)])console['log'](_0x14e883(0x75));else{if(_0x74c4b5['ok'])console['log']('CLI\x20Built-in\x20Skill\x20installed');else throw CliErrors[_0x14e883(0x88)](_0x14e883(0x78)+(_0x74c4b5[_0x14e883(0x7b)]||_0x14e883(0x80)),_0x14e883(0x8b)+_0x4636ab);}return{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a40_0x157917=a40_0x2c5f;function a40_0x4fda(){const _0x369061=['cwd','12315540NopDrx','Install\x20a\x20specific\x20CLI\x20version','no-skills','str','fail','red','update','Updating\x20via\x20','slice','\x20cli-skill\x20install','inherit','63dcTGhB','Checking\x20for\x20updates...','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Updated\x20to\x20v','/dist-tags','4025145RVEdWY','green','pipe','Update\x20failed','bun','\x20install\x20-g\x20','skills','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','flag','Beta\x20version:\x20','string','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','\x20→\x20','Already\x20up\x20to\x20date\x20(v','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','source','Requested\x20version:\x20','npm','run','start','map','valid','9304799lyRSlI','1568CvKdSz','message','Current\x20version:\x20','entries','gray','install','unknown','beta','\x20\x20Try\x20manually:\x20','2610306yDmoxP','Update\x20available:\x20','Invalid\x20version:\x20','1bRWNyR','latest','Version\x20comparison\x20failed','bool','65884KDsJwk','succeed','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','...','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','length','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','error','536482pFmEdA','validation','Already\x20on\x20requested\x20version\x20(v','info','58761JrwmxG','yellow','version','write','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','https://registry.npmjs.org/-/package/','trim','log','boolean','nonInteractive'];a40_0x4fda=function(){return _0x369061;};return a40_0x4fda();}(function(_0x5443e7,_0x2d9efe){const _0xceb21=a40_0x2c5f,_0x4049b8=_0x5443e7();while(!![]){try{const _0x20579b=parseInt(_0xceb21(0x120))/0x1*(parseInt(_0xceb21(0x12d))/0x2)+-parseInt(_0xceb21(0x147))/0x3*(parseInt(_0xceb21(0x124))/0x4)+-parseInt(_0xceb21(0x14c))/0x5+parseInt(_0xceb21(0x11d))/0x6+-parseInt(_0xceb21(0x113))/0x7+parseInt(_0xceb21(0x114))/0x8*(parseInt(_0xceb21(0x131))/0x9)+parseInt(_0xceb21(0x13c))/0xa;if(_0x20579b===_0x2d9efe)break;else _0x4049b8['push'](_0x4049b8['shift']());}catch(_0x5351ec){_0x4049b8['push'](_0x4049b8['shift']());}}}(a40_0x4fda,0xb3491));import a40_0x1aede3 from'chalk';import a40_0x171b96 from'ora';import a40_0x1308f5 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0xb1cbe8=a40_0x2c5f;return GIT_COMMIT!==_0xb1cbe8(0x11a)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0xb1cbe8(0x144)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0xcc5ceb=a40_0x2c5f,_0x337730=process['execPath']['toLowerCase']();if(_0x337730['includes'](_0xcc5ceb(0x150)))return'bun';return _0xcc5ceb(0x15e);}function a40_0x2c5f(_0x1d3ed3,_0x5531f9){_0x1d3ed3=_0x1d3ed3-0x111;const _0x4fdac0=a40_0x4fda();let _0x2c5ff6=_0x4fdac0[_0x1d3ed3];return _0x2c5ff6;}const updateFlags=[{'name':a40_0x157917(0x11b),'type':a40_0x157917(0x139),'description':a40_0x157917(0x127),'default':![]},{'name':a40_0x157917(0x133),'type':a40_0x157917(0x156),'description':a40_0x157917(0x13d)},{'name':a40_0x157917(0x13e),'type':a40_0x157917(0x139),'description':a40_0x157917(0x126),'default':![]},{'name':'skills','type':'boolean','description':a40_0x157917(0x158),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x3be2a5){const _0x696d00=a40_0x157917;return _0x3be2a5[_0x696d00(0x13f)](_0x696d00(0x133))[_0x696d00(0x137)]();}function shouldSkipCliSkill(_0x3af86e){const _0x172a8c=a40_0x157917;return _0x3af86e['bool'](_0x172a8c(0x13e))||_0x3af86e[_0x172a8c(0x154)](_0x172a8c(0x152))===![];}async function validateUpdateFlags(_0x29a7a7){const _0x444c3e=a40_0x157917,_0x44716c=_0x29a7a7[_0x444c3e(0x123)](_0x444c3e(0x11b)),_0x4fcd93=getRequestedVersion(_0x29a7a7);if(_0x44716c&&_0x4fcd93)throw CliErrors[_0x444c3e(0x12e)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x444c3e(0x149));if(_0x4fcd93&&!a40_0x1308f5[_0x444c3e(0x112)](_0x4fcd93))throw CliErrors['validation'](_0x444c3e(0x11f)+_0x4fcd93,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x453716=a40_0x157917;try{const _0x4bfdd4=await fetch(_0x453716(0x136)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x453716(0x14b),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x4bfdd4['ok'])return null;const _0x250efc=await _0x4bfdd4['json']();if(!_0x250efc||typeof _0x250efc!=='object')return null;return Object['fromEntries'](Object[_0x453716(0x117)](_0x250efc)['filter'](([,_0x286b01])=>typeof _0x286b01===_0x453716(0x156)&&_0x286b01[_0x453716(0x137)]()[_0x453716(0x12a)]>0x0)[_0x453716(0x111)](([_0x13d6d8,_0x405054])=>[_0x13d6d8,String(_0x405054)[_0x453716(0x137)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x187eef){const _0x1b72ed=await fetchNpmDistTags();return _0x1b72ed?.[_0x187eef]??null;}async function fetchLatestVersion(){const _0x264451=a40_0x157917;return fetchNpmDistTagVersion(_0x264451(0x121));}async function resolveTargetVersion(_0x45018e){const _0x305c91=a40_0x157917,_0x5ec29e=getRequestedVersion(_0x45018e);if(_0x5ec29e)return{'version':_0x5ec29e,'source':_0x305c91(0x133)};if(_0x45018e[_0x305c91(0x123)](_0x305c91(0x11b))){const _0x235b2d=await fetchNpmDistTagVersion(_0x305c91(0x11b));if(!_0x235b2d)return null;return{'version':_0x235b2d,'source':_0x305c91(0x11b)};}const _0x1b34b6=await fetchLatestVersion();if(!_0x1b34b6)return null;return{'version':_0x1b34b6,'source':_0x305c91(0x121)};}function shouldInstallTarget(_0x9fed18,_0x601410){const _0x3b46e6=a40_0x157917;if(_0x601410[_0x3b46e6(0x15c)]===_0x3b46e6(0x133)||_0x601410[_0x3b46e6(0x15c)]===_0x3b46e6(0x11b))return!a40_0x1308f5['eq'](_0x9fed18,_0x601410[_0x3b46e6(0x133)]);return a40_0x1308f5['lt'](_0x9fed18,_0x601410[_0x3b46e6(0x133)]);}function getInstallPlanLabel(_0x41d35f,_0x8f687e){const _0x245101=a40_0x157917;switch(_0x8f687e['source']){case _0x245101(0x11b):return _0x245101(0x155)+a40_0x1aede3[_0x245101(0x132)](_0x41d35f)+_0x245101(0x159)+a40_0x1aede3[_0x245101(0x14d)](_0x8f687e[_0x245101(0x133)]);case _0x245101(0x133):return _0x245101(0x15d)+a40_0x1aede3[_0x245101(0x132)](_0x41d35f)+_0x245101(0x159)+a40_0x1aede3[_0x245101(0x14d)](_0x8f687e[_0x245101(0x133)]);case _0x245101(0x121):default:return _0x245101(0x11e)+a40_0x1aede3[_0x245101(0x132)](_0x41d35f)+'\x20→\x20'+a40_0x1aede3[_0x245101(0x14d)](_0x8f687e['version']);}}async function installCliSkill(_0x455e2f){const _0x3f3232=a40_0x157917;console['log'](a40_0x1aede3[_0x3f3232(0x118)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x27c9ae=runNpxSkillsAddGlobal(process[_0x3f3232(0x13b)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x455e2f?_0x3f3232(0x14e):_0x3f3232(0x146)});if(_0x27c9ae['skipped']){console[_0x3f3232(0x138)](a40_0x1aede3[_0x3f3232(0x118)](_0x3f3232(0x129)));return;}if(_0x27c9ae['ok']){console[_0x3f3232(0x138)](a40_0x1aede3['gray']('\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.'));return;}console['warn'](a40_0x1aede3[_0x3f3232(0x132)]('\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20'+(_0x27c9ae[_0x3f3232(0x12c)]||_0x3f3232(0x11a)))),console[_0x3f3232(0x138)](a40_0x1aede3[_0x3f3232(0x118)]('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+_0x3f3232(0x145)));}async function execute(_0x48d6d9){const _0x3e3d3b=a40_0x157917;await validateUpdateFlags(_0x48d6d9);const _0x1eb95a=getCurrentVersion();console[_0x3e3d3b(0x138)](_0x3e3d3b(0x116)+_0x1eb95a);const _0x499200=a40_0x171b96(_0x3e3d3b(0x148))['start'](),_0x431825=await resolveTargetVersion(_0x48d6d9);if(!_0x431825){const _0x4c37a5=_0x48d6d9[_0x3e3d3b(0x123)](_0x3e3d3b(0x11b))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x3e3d3b(0x157);return _0x499200['fail'](_0x4c37a5),console[_0x3e3d3b(0x138)](a40_0x1aede3[_0x3e3d3b(0x118)](_0x3e3d3b(0x153)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x4c37a5};}const _0x575310=a40_0x1308f5[_0x3e3d3b(0x112)](VERSION),_0x590c4e=a40_0x1308f5[_0x3e3d3b(0x112)](_0x431825[_0x3e3d3b(0x133)]);if(!_0x575310||!_0x590c4e)return _0x499200[_0x3e3d3b(0x140)](_0x3e3d3b(0x122)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x575310,_0x431825)){const _0x2280cf=_0x431825[_0x3e3d3b(0x15c)]==='version'?_0x3e3d3b(0x12f)+_0x431825['version']+')':_0x3e3d3b(0x15a)+_0x431825[_0x3e3d3b(0x133)]+')';return _0x499200[_0x3e3d3b(0x125)](_0x2280cf),shouldSkipCliSkill(_0x48d6d9)?console[_0x3e3d3b(0x138)](a40_0x1aede3[_0x3e3d3b(0x118)](_0x3e3d3b(0x135))):await installCliSkill(_0x48d6d9[_0x3e3d3b(0x13a)]),{'ok':!![]};}_0x499200[_0x3e3d3b(0x130)](getInstallPlanLabel(_0x1eb95a,_0x431825));const _0x89a8a2=detectPackageManager(),_0x3cbc34=_0x89a8a2===_0x3e3d3b(0x15e)?resolveNpmBin(_0x3e3d3b(0x15e)):_0x89a8a2,_0x2d371e=a40_0x171b96(_0x3e3d3b(0x143)+_0x89a8a2+_0x3e3d3b(0x128))[_0x3e3d3b(0x160)]();try{return await execa(_0x3cbc34,[_0x3e3d3b(0x119),'-g',NPM_PACKAGE_NAME+'@'+_0x431825[_0x3e3d3b(0x133)]],{'stdio':_0x3e3d3b(0x14e)}),_0x2d371e[_0x3e3d3b(0x125)](_0x3e3d3b(0x14a)+_0x431825[_0x3e3d3b(0x133)]),console['log'](a40_0x1aede3['gray'](_0x3e3d3b(0x15b))),shouldSkipCliSkill(_0x48d6d9)?console[_0x3e3d3b(0x138)](a40_0x1aede3[_0x3e3d3b(0x118)](_0x3e3d3b(0x135))):await installCliSkill(_0x48d6d9['nonInteractive']),{'ok':!![]};}catch(_0x9175b6){return _0x2d371e[_0x3e3d3b(0x140)](_0x3e3d3b(0x14f)),console['error'](a40_0x1aede3[_0x3e3d3b(0x141)]('\x20\x20'+_0x9175b6[_0x3e3d3b(0x115)])),console[_0x3e3d3b(0x138)](a40_0x1aede3['gray'](_0x3e3d3b(0x11c)+_0x89a8a2+_0x3e3d3b(0x151)+NPM_PACKAGE_NAME+'@'+_0x431825[_0x3e3d3b(0x133)])),{'ok':![],'message':_0x9175b6[_0x3e3d3b(0x115)]};}}export const updateDefinition={'service':a40_0x157917(0x142),'command':a40_0x157917(0x15f),'description':a40_0x157917(0x12b),'risk':a40_0x157917(0x134),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a40_0x490599=a40_0x302d;(function(_0x116047,_0x2ab7ae){const _0x17be9c=a40_0x302d,_0x2a4bf0=_0x116047();while(!![]){try{const _0xb8291a=-parseInt(_0x17be9c(0x191))/0x1+parseInt(_0x17be9c(0x167))/0x2+-parseInt(_0x17be9c(0x15e))/0x3*(-parseInt(_0x17be9c(0x184))/0x4)+-parseInt(_0x17be9c(0x170))/0x5*(-parseInt(_0x17be9c(0x1a9))/0x6)+-parseInt(_0x17be9c(0x174))/0x7*(-parseInt(_0x17be9c(0x19b))/0x8)+parseInt(_0x17be9c(0x161))/0x9*(-parseInt(_0x17be9c(0x175))/0xa)+-parseInt(_0x17be9c(0x163))/0xb*(parseInt(_0x17be9c(0x15a))/0xc);if(_0xb8291a===_0x2ab7ae)break;else _0x2a4bf0['push'](_0x2a4bf0['shift']());}catch(_0x5fad64){_0x2a4bf0['push'](_0x2a4bf0['shift']());}}}(a40_0x23b0,0x7fc3a));import a40_0x2a24b0 from'chalk';import a40_0x545778 from'ora';import a40_0x4d8556 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';function a40_0x302d(_0x55eb32,_0x2690e3){_0x55eb32=_0x55eb32-0x156;const _0x23b074=a40_0x23b0();let _0x302d95=_0x23b074[_0x55eb32];return _0x302d95;}import{CliErrors}from'../errors.js';import{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x36cfa7=a40_0x302d,_0x49f3ad=process[_0x36cfa7(0x162)][_0x36cfa7(0x156)]();if(_0x49f3ad[_0x36cfa7(0x180)](_0x36cfa7(0x1a3)))return _0x36cfa7(0x1a3);return'npm';}const updateFlags=[{'name':'beta','type':a40_0x490599(0x1a6),'description':a40_0x490599(0x15f),'default':![]},{'name':'version','type':'string','description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':a40_0x490599(0x197),'type':a40_0x490599(0x1a6),'description':a40_0x490599(0x168),'default':![]},{'name':a40_0x490599(0x16d),'type':a40_0x490599(0x1a6),'description':a40_0x490599(0x1a5),'default':!![],'hidden':!![]}];function a40_0x23b0(){const _0x8cd381=['12MTqCbu','start','inherit','error','2892117TuxjNx','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','9uHXJUa','execPath','6541645ClsUri','npm','red','green','1636914rOAWEh','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','entries','map','info','skills','length','message','195auFwrs','source','Checking\x20CLI\x20Built-in\x20Skill...','Beta\x20version:\x20','423689OgKbEf','8550890FseubQ','trim','run','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','succeed','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','@latest','valid','Version\x20comparison\x20failed','\x20\x20Try\x20manually:\x20','gray','includes','install','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','object','4Fvcljd','timeout','flag','Updating\x20via\x20','bool','latest','Update\x20available:\x20','\x20\x20Run\x20manually:\x20','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','Current\x20version:\x20','https://registry.npmjs.org/-/package/','Requested\x20version:\x20','fromEntries','50135DwRqjZ','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','json','yellow','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Already\x20on\x20requested\x20version\x20(v','no-skills','skipped','version','fail','16IsqrGj','log','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','/dist-tags','beta','unknown','cwd','Invalid\x20version:\x20','bun','\x20→\x20','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','boolean','pipe','validation','18414vDgHdt','toLowerCase','Already\x20up\x20to\x20date\x20(v','filter','nonInteractive'];a40_0x23b0=function(){return _0x8cd381;};return a40_0x23b0();}function getRequestedVersion(_0x2012e1){const _0x42de59=a40_0x490599;return _0x2012e1['str']('version')[_0x42de59(0x176)]();}function shouldSkipCliSkill(_0x36827c){const _0x34e1b3=a40_0x490599;return _0x36827c[_0x34e1b3(0x188)]('no-skills')||_0x36827c[_0x34e1b3(0x186)]('skills')===![];}async function validateUpdateFlags(_0x22ad8d){const _0xd737fa=a40_0x490599,_0x20e143=_0x22ad8d[_0xd737fa(0x188)](_0xd737fa(0x19f)),_0x8c5f0e=getRequestedVersion(_0x22ad8d);if(_0x20e143&&_0x8c5f0e)throw CliErrors[_0xd737fa(0x1a8)](_0xd737fa(0x169),_0xd737fa(0x195));if(_0x8c5f0e&&!a40_0x4d8556[_0xd737fa(0x17c)](_0x8c5f0e))throw CliErrors[_0xd737fa(0x1a8)](_0xd737fa(0x1a2)+_0x8c5f0e,_0xd737fa(0x17a));}async function fetchNpmDistTags(){const _0x1a6e16=a40_0x490599;try{const _0x1657af=await fetch(_0x1a6e16(0x18e)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x1a6e16(0x19e),{'signal':AbortSignal[_0x1a6e16(0x185)](0x2710)});if(!_0x1657af['ok'])return null;const _0x1c3d2d=await _0x1657af[_0x1a6e16(0x193)]();if(!_0x1c3d2d||typeof _0x1c3d2d!==_0x1a6e16(0x183))return null;return Object[_0x1a6e16(0x190)](Object[_0x1a6e16(0x16a)](_0x1c3d2d)[_0x1a6e16(0x158)](([,_0x5a0512])=>typeof _0x5a0512==='string'&&_0x5a0512[_0x1a6e16(0x176)]()[_0x1a6e16(0x16e)]>0x0)[_0x1a6e16(0x16b)](([_0x220e0e,_0x54c6e9])=>[_0x220e0e,String(_0x54c6e9)[_0x1a6e16(0x176)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x533c2c){const _0x4ef8bb=await fetchNpmDistTags();return _0x4ef8bb?.[_0x533c2c]??null;}async function fetchLatestVersion(){const _0xbe7d06=a40_0x490599;return fetchNpmDistTagVersion(_0xbe7d06(0x189));}async function resolveTargetVersion(_0x98d118){const _0x27d693=a40_0x490599,_0x5aa056=getRequestedVersion(_0x98d118);if(_0x5aa056)return{'version':_0x5aa056,'source':_0x27d693(0x199)};if(_0x98d118['bool'](_0x27d693(0x19f))){const _0x3e7e77=await fetchNpmDistTagVersion(_0x27d693(0x19f));if(!_0x3e7e77)return null;return{'version':_0x3e7e77,'source':'beta'};}const _0x2b6b02=await fetchLatestVersion();if(!_0x2b6b02)return null;return{'version':_0x2b6b02,'source':_0x27d693(0x189)};}function shouldInstallTarget(_0x4334ce,_0x3d431a){const _0x4839bd=a40_0x490599;if(_0x3d431a[_0x4839bd(0x171)]===_0x4839bd(0x199)||_0x3d431a[_0x4839bd(0x171)]===_0x4839bd(0x19f))return!a40_0x4d8556['eq'](_0x4334ce,_0x3d431a[_0x4839bd(0x199)]);return a40_0x4d8556['lt'](_0x4334ce,_0x3d431a[_0x4839bd(0x199)]);}function getInstallPlanLabel(_0x479c12,_0x19c8b3){const _0x3ae50d=a40_0x490599;switch(_0x19c8b3['source']){case _0x3ae50d(0x19f):return _0x3ae50d(0x173)+a40_0x2a24b0['yellow'](_0x479c12)+_0x3ae50d(0x1a4)+a40_0x2a24b0[_0x3ae50d(0x166)](_0x19c8b3[_0x3ae50d(0x199)]);case _0x3ae50d(0x199):return _0x3ae50d(0x18f)+a40_0x2a24b0['yellow'](_0x479c12)+_0x3ae50d(0x1a4)+a40_0x2a24b0[_0x3ae50d(0x166)](_0x19c8b3[_0x3ae50d(0x199)]);case _0x3ae50d(0x189):default:return _0x3ae50d(0x18a)+a40_0x2a24b0[_0x3ae50d(0x194)](_0x479c12)+_0x3ae50d(0x1a4)+a40_0x2a24b0[_0x3ae50d(0x166)](_0x19c8b3[_0x3ae50d(0x199)]);}}async function installCliSkill(_0xc74fd0){const _0x1412ac=a40_0x490599;console['log'](a40_0x2a24b0['gray'](_0x1412ac(0x172)));const _0x162a12=runNpxSkillsAddGlobal(process[_0x1412ac(0x1a1)](),RABETBASE_SKILL_SOURCE,{'stdio':_0xc74fd0?_0x1412ac(0x1a7):_0x1412ac(0x15c)});if(_0x162a12[_0x1412ac(0x198)]){console['log'](a40_0x2a24b0[_0x1412ac(0x17f)](_0x1412ac(0x18c)));return;}if(_0x162a12['ok']){console[_0x1412ac(0x19c)](a40_0x2a24b0[_0x1412ac(0x17f)](_0x1412ac(0x192)));return;}console['warn'](a40_0x2a24b0[_0x1412ac(0x194)]('\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20'+(_0x162a12[_0x1412ac(0x15d)]||_0x1412ac(0x1a0)))),console[_0x1412ac(0x19c)](a40_0x2a24b0[_0x1412ac(0x17f)](_0x1412ac(0x18b)+CLI_BIN_NAME+'\x20cli-skill\x20install'));}async function execute(_0x1e0220){const _0x5a8ad8=a40_0x490599;await validateUpdateFlags(_0x1e0220);const _0xf10a9f=getCurrentVersion();console[_0x5a8ad8(0x19c)](_0x5a8ad8(0x18d)+_0xf10a9f);const _0x120c24=a40_0x545778('Checking\x20for\x20updates...')['start'](),_0x5277c4=await resolveTargetVersion(_0x1e0220);if(!_0x5277c4){const _0x40ad95=_0x1e0220[_0x5a8ad8(0x188)](_0x5a8ad8(0x19f))?_0x5a8ad8(0x19d):_0x5a8ad8(0x182);return _0x120c24['fail'](_0x40ad95),console['log'](a40_0x2a24b0[_0x5a8ad8(0x17f)](_0x5a8ad8(0x160)+NPM_PACKAGE_NAME+_0x5a8ad8(0x17b))),{'ok':![],'message':_0x40ad95};}const _0x156456=a40_0x4d8556[_0x5a8ad8(0x17c)](VERSION),_0x1c8742=a40_0x4d8556['valid'](_0x5277c4[_0x5a8ad8(0x199)]);if(!_0x156456||!_0x1c8742)return _0x120c24[_0x5a8ad8(0x19a)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0x5a8ad8(0x17d)};if(!shouldInstallTarget(_0x156456,_0x5277c4)){const _0x15670d=_0x5277c4[_0x5a8ad8(0x171)]==='version'?_0x5a8ad8(0x196)+_0x5277c4[_0x5a8ad8(0x199)]+')':_0x5a8ad8(0x157)+_0x5277c4[_0x5a8ad8(0x199)]+')';return _0x120c24[_0x5a8ad8(0x179)](_0x15670d),shouldSkipCliSkill(_0x1e0220)?console[_0x5a8ad8(0x19c)](a40_0x2a24b0[_0x5a8ad8(0x17f)](_0x5a8ad8(0x178))):await installCliSkill(_0x1e0220['nonInteractive']),{'ok':!![]};}_0x120c24[_0x5a8ad8(0x16c)](getInstallPlanLabel(_0xf10a9f,_0x5277c4));const _0x258555=detectPackageManager(),_0x4a8d93=_0x258555===_0x5a8ad8(0x164)?resolveNpmBin(_0x5a8ad8(0x164)):_0x258555,_0xd545b6=a40_0x545778(_0x5a8ad8(0x187)+_0x258555+'...')[_0x5a8ad8(0x15b)]();try{return await execa(_0x4a8d93,[_0x5a8ad8(0x181),'-g',NPM_PACKAGE_NAME+'@'+_0x5277c4[_0x5a8ad8(0x199)]],{'stdio':_0x5a8ad8(0x1a7)}),_0xd545b6[_0x5a8ad8(0x179)]('Updated\x20to\x20v'+_0x5277c4[_0x5a8ad8(0x199)]),console[_0x5a8ad8(0x19c)](a40_0x2a24b0['gray']('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipCliSkill(_0x1e0220)?console['log'](a40_0x2a24b0[_0x5a8ad8(0x17f)](_0x5a8ad8(0x178))):await installCliSkill(_0x1e0220[_0x5a8ad8(0x159)]),{'ok':!![]};}catch(_0x501dd0){return _0xd545b6['fail']('Update\x20failed'),console['error'](a40_0x2a24b0[_0x5a8ad8(0x165)]('\x20\x20'+_0x501dd0[_0x5a8ad8(0x16f)])),console[_0x5a8ad8(0x19c)](a40_0x2a24b0[_0x5a8ad8(0x17f)](_0x5a8ad8(0x17e)+_0x258555+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x5277c4[_0x5a8ad8(0x199)])),{'ok':![],'message':_0x501dd0[_0x5a8ad8(0x16f)]};}}export const updateDefinition={'service':'update','command':a40_0x490599(0x177),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x57dd6c,_0x39db1d){const _0x6666b4=a41_0x11d0,_0xd332a5=_0x57dd6c();while(!![]){try{const _0xbbb695=-parseInt(_0x6666b4(0x16d))/0x1+-parseInt(_0x6666b4(0x169))/0x2+-parseInt(_0x6666b4(0x167))/0x3+parseInt(_0x6666b4(0x16b))/0x4+parseInt(_0x6666b4(0x16a))/0x5+-parseInt(_0x6666b4(0x166))/0x6*(-parseInt(_0x6666b4(0x165))/0x7)+-parseInt(_0x6666b4(0x16c))/0x8*(-parseInt(_0x6666b4(0x168))/0x9);if(_0xbbb695===_0x39db1d)break;else _0xd332a5['push'](_0xd332a5['shift']());}catch(_0x36bc76){_0xd332a5['push'](_0xd332a5['shift']());}}}(a41_0x42ed,0x43efb));function a41_0x11d0(_0x48100d,_0x4efef3){_0x48100d=_0x48100d-0x165;const _0x42ed6c=a41_0x42ed();let _0x11d080=_0x42ed6c[_0x48100d];return _0x11d080;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a41_0x42ed(){const _0x3fa5b9=['448055JWDAEl','1864120risXYZ','2440fwhJub','173158lcCZuO','396347wBJbIA','36pKWUzD','695385QjunIe','2466crsIhz','591434aVcWdh'];a41_0x42ed=function(){return _0x3fa5b9;};return a41_0x42ed();}export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a42_0xec9a9f=a42_0x14f5;function a42_0x14f5(_0x6cf3e0,_0x400185){_0x6cf3e0=_0x6cf3e0-0x13a;const _0x130154=a42_0x1301();let _0x14f5e0=_0x130154[_0x6cf3e0];return _0x14f5e0;}(function(_0xd341a3,_0x585608){const _0x274442=a42_0x14f5,_0x31e712=_0xd341a3();while(!![]){try{const _0x2ae944=-parseInt(_0x274442(0x13b))/0x1+-parseInt(_0x274442(0x142))/0x2*(parseInt(_0x274442(0x14a))/0x3)+parseInt(_0x274442(0x141))/0x4*(-parseInt(_0x274442(0x14b))/0x5)+-parseInt(_0x274442(0x150))/0x6+-parseInt(_0x274442(0x146))/0x7+parseInt(_0x274442(0x14e))/0x8+parseInt(_0x274442(0x147))/0x9*(parseInt(_0x274442(0x148))/0xa);if(_0x2ae944===_0x585608)break;else _0x31e712['push'](_0x31e712['shift']());}catch(_0x42c6c7){_0x31e712['push'](_0x31e712['shift']());}}}(a42_0x1301,0x31ff6));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a42_0x1301(){const _0x222de4=['Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','operation','read','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','Omit\x20import\x20statements\x20from\x20generated\x20code','31428LINAIG','514AoTavp','str','code','codegen','1688148GGYWwK','297DLAGJq','236750sQrENr','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','3513UfovFN','5xguCiU','bool','skip-imports','2878656imcaUJ','name','51936JUfhcF','boolean','appCode','377693jsaSVG'];a42_0x1301=function(){return _0x222de4;};return a42_0x1301();}export const codegenSdk={'service':a42_0xec9a9f(0x145),'command':'sdk','description':a42_0xec9a9f(0x13f),'risk':a42_0xec9a9f(0x13e),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a42_0xec9a9f(0x149)},{'name':a42_0xec9a9f(0x13d),'type':'string','required':!![],'description':a42_0xec9a9f(0x13c)},{'name':a42_0xec9a9f(0x14d),'type':a42_0xec9a9f(0x151),'description':a42_0xec9a9f(0x140)}],async 'execute'(_0x4d8b0c){const _0x5de645=a42_0xec9a9f,{dataset:_0x5a9321,operation:_0x3aabb0}=await getOperationDetail(_0x4d8b0c[_0x5de645(0x13a)],_0x4d8b0c[_0x5de645(0x143)]('code'),_0x4d8b0c[_0x5de645(0x143)](_0x5de645(0x13d))),_0x3804b3=generateSdkCode(_0x5a9321,_0x3aabb0,{'includeImports':!_0x4d8b0c[_0x5de645(0x14c)](_0x5de645(0x14d))});return{'ok':!![],'data':{'dataset':{'name':_0x5a9321[_0x5de645(0x14f)],'code':_0x5a9321[_0x5de645(0x144)],'tableName':_0x5a9321['tableName']},'operation':_0x4d8b0c[_0x5de645(0x143)](_0x5de645(0x13d)),'code':_0x3804b3}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x4efe0d=a43_0x53fe;function a43_0x7195(){const _0x5af67e=['3757485FKBAOr','sqlName','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','sdk','6252870LuzXsx','16kxKduy','9169678ElQuGD','bool','str','4KSZyCh','no-imports','1682844SfVuJs','sqlcode','string','25767180TavJjT','82197gMVBLK','9835088mDcRLZ','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','read','Omit\x20import\x20statements\x20from\x20generated\x20code','target','sqlCode','bff','boolean'];a43_0x7195=function(){return _0x5af67e;};return a43_0x7195();}(function(_0x225d3d,_0x5af81e){const _0x291f5e=a43_0x53fe,_0x1f97b0=_0x225d3d();while(!![]){try{const _0x224868=-parseInt(_0x291f5e(0x125))/0x1*(-parseInt(_0x291f5e(0x133))/0x2)+-parseInt(_0x291f5e(0x12e))/0x3*(parseInt(_0x291f5e(0x11f))/0x4)+-parseInt(_0x291f5e(0x132))/0x5+-parseInt(_0x291f5e(0x121))/0x6+-parseInt(_0x291f5e(0x134))/0x7+parseInt(_0x291f5e(0x126))/0x8+parseInt(_0x291f5e(0x124))/0x9;if(_0x224868===_0x5af81e)break;else _0x1f97b0['push'](_0x1f97b0['shift']());}catch(_0x2c503e){_0x1f97b0['push'](_0x1f97b0['shift']());}}}(a43_0x7195,0xa0465));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a43_0x53fe(_0xe348,_0x3e7858){_0xe348=_0xe348-0x11e;const _0x7195c3=a43_0x7195();let _0x53fe51=_0x7195c3[_0xe348];return _0x53fe51;}export const codegenSql={'service':'codegen','command':'sql','description':a43_0x4efe0d(0x127),'risk':a43_0x4efe0d(0x128),'flags':[SQLCODE_FLAG,{'name':a43_0x4efe0d(0x12a),'type':a43_0x4efe0d(0x123),'description':a43_0x4efe0d(0x130),'default':'sdk','enum':[a43_0x4efe0d(0x131),a43_0x4efe0d(0x12c)]},{'name':a43_0x4efe0d(0x120),'type':a43_0x4efe0d(0x12d),'description':a43_0x4efe0d(0x129)}],async 'execute'(_0x4411e0){const _0x519612=a43_0x4efe0d,_0x4be072=await getSqlQueryInfo(_0x4411e0['appCode'],_0x4411e0[_0x519612(0x11e)](_0x519612(0x122))),_0x5cec17=_0x4411e0[_0x519612(0x11e)](_0x519612(0x12a))||'sdk',_0x3cb941=generateSqlCodeTemplate(_0x4be072,{'target':_0x5cec17,'includeImports':!_0x4411e0[_0x519612(0x135)](_0x519612(0x120))});return{'ok':!![],'data':{'sqlCode':_0x4be072[_0x519612(0x12b)],'sqlName':_0x4be072[_0x519612(0x12f)],'target':_0x5cec17,'code':_0x3cb941}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x393f3c,_0x376d87){const _0x381ace=a44_0x17d0,_0x2f286d=_0x393f3c();while(!![]){try{const _0x4e48b7=parseInt(_0x381ace(0x74))/0x1+parseInt(_0x381ace(0x7e))/0x2+parseInt(_0x381ace(0x7b))/0x3+parseInt(_0x381ace(0x95))/0x4+-parseInt(_0x381ace(0x92))/0x5*(-parseInt(_0x381ace(0x75))/0x6)+-parseInt(_0x381ace(0x9b))/0x7+parseInt(_0x381ace(0x99))/0x8*(-parseInt(_0x381ace(0x88))/0x9);if(_0x4e48b7===_0x376d87)break;else _0x2f286d['push'](_0x2f286d['shift']());}catch(_0x1e2429){_0x2f286d['push'](_0x2f286d['shift']());}}}(a44_0x4809,0xb89af));import{CliErrors}from'../../errors.js';function a44_0x4809(){const _0x52b74d=['appcode','string','project','Added','Removed\x20app\x20\x22','apps','8136981vmhPab','\x20<name>\x20[--global]','\x20config.','length','boolean','inherit','Usage:\x20','\x20Set\x20as\x20default\x20app.','App\x20\x22','defaultApp','16930uheSIO','validation','keys','1191216AFtOMe','object','\x20<name>\x20--appcode\x20<code>','projectConfig','8TidCZt','\x22\x20not\x20found.','10517829LWlpqz','bool','globalConfig','994108JaBlrx','918MtnWVA','trim','both','\x22\x20still\x20defined\x20in\x20','\x20Default\x20app\x20changed\x20to\x20\x22','str','252609DmdKnE','\x20Note:\x20app\x20\x22','\x20<name>','2537252vfndKz','Use\x20global\x20config\x20scope','Missing\x20app\x20name.','global'];a44_0x4809=function(){return _0x52b74d;};return a44_0x4809();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x17773a=a44_0x17d0;return[{'name':'appcode','type':_0x17773a(0x83),'description':'App\x20code','required':!![]},{'name':_0x17773a(0x81),'type':_0x17773a(0x8c),'description':_0x17773a(0x7f),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x3b6eac=a44_0x17d0;return[{'name':_0x3b6eac(0x81),'type':'boolean','description':_0x3b6eac(0x7f),'default':![]}];}export async function validateAppName(_0x169cb0,_0x4d8f64){const _0x5c6f84=a44_0x17d0,_0x3cf9a5=_0x169cb0['args'][0x0]?.['trim']();if(!_0x3cf9a5)throw CliErrors[_0x5c6f84(0x93)](_0x5c6f84(0x80),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x4d8f64+_0x5c6f84(0x7d));}export async function runAppAdd(_0x2aaeb2,_0x3ffbce){const _0xc9b396=a44_0x17d0,_0x12fd56=_0x2aaeb2['args'][0x0]?.['trim']();if(!_0x12fd56)throw CliErrors[_0xc9b396(0x93)]('Missing\x20app\x20name.',_0xc9b396(0x8e)+CLI_BIN_NAME+'\x20'+_0x3ffbce+_0xc9b396(0x97));const _0x496f30=_0x2aaeb2['str']('appcode');if(!_0x496f30)throw CliErrors['flagMissing'](_0xc9b396(0x82),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x3ffbce+_0xc9b396(0x97));const _0x31ba77={'global':_0x2aaeb2[_0xc9b396(0x9c)]('global')},_0x2e2aa3=readConfig(_0x31ba77);if(!_0x2e2aa3[_0xc9b396(0x87)])_0x2e2aa3[_0xc9b396(0x87)]={};const _0x34647e={'appcode':_0x496f30,...collectAppProfileOverrides(_0x525cab=>_0x2aaeb2[_0xc9b396(0x7a)](_0x525cab))},_0x2e2bb3=_0x2e2aa3[_0xc9b396(0x87)],_0x43c9af=!!_0x2e2bb3[_0x12fd56];_0x2e2bb3[_0x12fd56]=_0x34647e;if(!_0x2e2aa3['defaultApp'])_0x2e2aa3[_0xc9b396(0x91)]=_0x12fd56;writeConfig(_0x2e2aa3,_0x31ba77);const _0x569423=!_0x43c9af&&_0x2e2aa3['defaultApp']===_0x12fd56?_0xc9b396(0x8f):'',_0x234437=(_0x43c9af?'Updated':_0xc9b396(0x85))+'\x20app\x20\x22'+_0x12fd56+'\x22\x20(appcode:\x20'+_0x496f30+')'+scopeLabel(_0x31ba77)+'.'+_0x569423;return{'ok':!![],'message':_0x234437};}function a44_0x17d0(_0x291c84,_0x1917d7){_0x291c84=_0x291c84-0x73;const _0x4809de=a44_0x4809();let _0x17d00f=_0x4809de[_0x291c84];return _0x17d00f;}export async function runAppRemove(_0x179313,_0x720bd7){const _0x11c1ec=a44_0x17d0,_0x1984c1=_0x179313['args'][0x0]?.[_0x11c1ec(0x76)]();if(!_0x1984c1)throw CliErrors[_0x11c1ec(0x93)]('Missing\x20app\x20name.',_0x11c1ec(0x8e)+CLI_BIN_NAME+'\x20'+_0x720bd7+_0x11c1ec(0x89));const _0x32e34c=_0x179313[_0x11c1ec(0x9c)](_0x11c1ec(0x81)),{config:_0x151793,layers:_0x1fc425}=readRawConfigWithLayers(),_0x4821ff=_0x151793[_0x11c1ec(0x87)]??{};if(!_0x4821ff[_0x1984c1])throw CliErrors[_0x11c1ec(0x93)](_0x11c1ec(0x90)+_0x1984c1+_0x11c1ec(0x9a));const _0x2b1a5a=_0x1fc425['globalConfig'][_0x11c1ec(0x87)]&&typeof _0x1fc425[_0x11c1ec(0x73)][_0x11c1ec(0x87)]==='object'?_0x1fc425[_0x11c1ec(0x73)]['apps']:{},_0xd02f1a=_0x1fc425['projectConfig']['apps']&&typeof _0x1fc425[_0x11c1ec(0x98)]['apps']===_0x11c1ec(0x96)?_0x1fc425['projectConfig'][_0x11c1ec(0x87)]:{},_0x463d5c=appDefinedIn(_0x1984c1,_0x2b1a5a,_0xd02f1a,_0x1fc425['projectConfig'][_0x11c1ec(0x8d)]===![]),_0x10e7bf=resolveAppScopeForWrite(_0x1984c1,_0x32e34c,_0x1fc425),_0x581126={'global':_0x10e7bf===_0x11c1ec(0x81)},_0xd0fffe=readConfig(_0x581126),_0x267c57=_0xd0fffe[_0x11c1ec(0x87)];if(!_0x267c57||!_0x267c57[_0x1984c1])throw CliErrors[_0x11c1ec(0x93)]('App\x20\x22'+_0x1984c1+_0x11c1ec(0x9a));delete _0x267c57[_0x1984c1];let _0x528268='';if(_0xd0fffe['defaultApp']===_0x1984c1){const _0x44848c=Object[_0x11c1ec(0x94)](_0x267c57);_0xd0fffe[_0x11c1ec(0x91)]=_0x44848c[_0x11c1ec(0x8b)]>0x0?_0x44848c[0x0]:undefined,_0xd0fffe[_0x11c1ec(0x91)]?_0x528268=_0x11c1ec(0x79)+_0xd0fffe[_0x11c1ec(0x91)]+'\x22.':delete _0xd0fffe['defaultApp'];}Object[_0x11c1ec(0x94)](_0x267c57)[_0x11c1ec(0x8b)]===0x0&&(delete _0xd0fffe[_0x11c1ec(0x87)],delete _0xd0fffe[_0x11c1ec(0x91)]);writeConfig(_0xd0fffe,_0x581126);const _0x28ce6e=_0x463d5c===_0x11c1ec(0x77)?_0x11c1ec(0x7c)+_0x1984c1+_0x11c1ec(0x78)+(_0x10e7bf===_0x11c1ec(0x84)?_0x11c1ec(0x81):_0x11c1ec(0x84))+_0x11c1ec(0x8a):'';return{'ok':!![],'message':_0x11c1ec(0x86)+_0x1984c1+'\x22'+scopeLabel(_0x581126)+'.'+_0x528268+_0x28ce6e};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2adfd8,_0x34da80){const _0x4b70aa=a45_0x2ab6,_0x798cce=_0x2adfd8();while(!![]){try{const _0x260d52=parseInt(_0x4b70aa(0x9d))/0x1+parseInt(_0x4b70aa(0xb6))/0x2*(parseInt(_0x4b70aa(0x9a))/0x3)+parseInt(_0x4b70aa(0x9f))/0x4+parseInt(_0x4b70aa(0x9c))/0x5*(-parseInt(_0x4b70aa(0xa8))/0x6)+-parseInt(_0x4b70aa(0xa0))/0x7*(parseInt(_0x4b70aa(0xaa))/0x8)+-parseInt(_0x4b70aa(0xa2))/0x9+-parseInt(_0x4b70aa(0x96))/0xa*(-parseInt(_0x4b70aa(0xab))/0xb);if(_0x260d52===_0x34da80)break;else _0x798cce['push'](_0x798cce['shift']());}catch(_0x419656){_0x798cce['push'](_0x798cce['shift']());}}}(a45_0x2415,0x40923));function a45_0x2415(){const _0x1c41d5=['includes','✎\x20自定义输入\x20appcode','message','未找到可用应用。','cyan','请选择要绑定的应用:','请输入\x20App\x20Code:','12598ALJCNV','length','正在获取可用应用列表...','gray','skip','90nRFJPg','appCode','yellow','valid','6qQkOGy','✎\x20手动输入','184305GulRfv','178119rlmJup','\x0a未找到可用应用。','946796aOriXs','7NuGeGs','appName','4720770zMtiGC','custom','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','\x0a无法获取远程应用列表,请手动输入。','map','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','18MYpxyH','Invalid\x20App\x20Code','3637336swFXCW','1132813wIOiLA','\x20\x20(','无法获取远程应用列表,请手动输入。','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'];a45_0x2415=function(){return _0x1c41d5;};return a45_0x2415();}import{input,checkbox,select}from'@inquirer/prompts';import a45_0x4fd34e from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x3e69b3=a45_0x2ab6,_0x321737=await input({'message':_0x3e69b3(0xb5),'validate':_0x21dfd1=>{const _0x4268ad=_0x3e69b3,_0x1ca3b6=validateAppcode(_0x21dfd1['trim']());return _0x1ca3b6[_0x4268ad(0x99)]||_0x1ca3b6['message']||_0x4268ad(0xa9);}});return _0x321737['trim']();}export async function promptAppSelection(_0x278169){const _0x5313cd=a45_0x2ab6,_0x581b02=[{'name':a45_0x4fd34e[_0x5313cd(0x98)](_0x5313cd(0xb0)),'value':-0x1},..._0x278169[_0x5313cd(0xa6)]((_0x268841,_0x20f6fe)=>({'name':_0x268841['appName']+'\x20\x20'+a45_0x4fd34e['gray']('('+_0x268841[_0x5313cd(0x97)]+')'),'value':_0x20f6fe}))],_0x5290da=await checkbox({'message':'获取到\x20'+a45_0x4fd34e[_0x5313cd(0xb3)](_0x278169[_0x5313cd(0xb7)])+_0x5313cd(0xa4),'choices':_0x581b02,'loop':![]});if(_0x5290da[_0x5313cd(0xaf)](-0x1))return _0x5313cd(0xa3);if(_0x5290da[_0x5313cd(0xb7)]===0x0)return _0x5313cd(0xa3);return _0x5290da[_0x5313cd(0xa6)](_0x1b54c8=>_0x278169[_0x1b54c8]);}function a45_0x2ab6(_0x21ca5c,_0xa35ef7){_0x21ca5c=_0x21ca5c-0x96;const _0x241549=a45_0x2415();let _0x2ab64c=_0x241549[_0x21ca5c];return _0x2ab64c;}export async function promptSingleAppSelection(_0xf190b){const _0x144893=a45_0x2ab6,_0x55d17e=[{'name':a45_0x4fd34e[_0x144893(0xb9)](_0x144893(0xae)),'value':_0x144893(0xba)},{'name':a45_0x4fd34e[_0x144893(0x98)]('✎\x20自定义输入\x20appcode'),'value':_0x144893(0xa3)},..._0xf190b[_0x144893(0xa6)](_0x5625ef=>({'name':_0x5625ef[_0x144893(0xa1)]+'\x20\x20'+a45_0x4fd34e['gray']('('+_0x5625ef[_0x144893(0x97)]+')'),'value':_0x5625ef[_0x144893(0x97)]}))],_0x2cdd41=await select({'message':_0x144893(0xb4),'choices':_0x55d17e});if(_0x2cdd41==='skip')return'skip';if(_0x2cdd41===_0x144893(0xa3))return _0x144893(0xa3);return _0xf190b['find'](_0x55bba5=>_0x55bba5[_0x144893(0x97)]===_0x2cdd41);}export async function selectSingleAppcode(_0x5d44c3){const _0x43aa6e=a45_0x2ab6;if(!_0x5d44c3)return writeCliSideChannelLine(a45_0x4fd34e[_0x43aa6e(0xb9)](_0x43aa6e(0xa7))),_fallbackOrSkip();writeCliSideChannelLine(_0x43aa6e(0xb8));let _0x4aa90a;try{_0x4aa90a=await withActiveCookie(_0x5d44c3,()=>listRemoteApps());}catch(_0x147e9d){writeCliSideChannelLine(a45_0x4fd34e['yellow'](_0x43aa6e(0xad)));if(_0x147e9d instanceof Error)writeCliSideChannelLine(a45_0x4fd34e[_0x43aa6e(0xb9)](_0x43aa6e(0xac)+_0x147e9d[_0x43aa6e(0xb1)]+')'));return _fallbackOrSkip();}if(_0x4aa90a[_0x43aa6e(0xb7)]===0x0)return writeCliSideChannelLine(a45_0x4fd34e[_0x43aa6e(0x98)](_0x43aa6e(0xb2))),_fallbackOrSkip();const _0x2dbe35=await promptSingleAppSelection(_0x4aa90a);if(_0x2dbe35===_0x43aa6e(0xba))return'';if(_0x2dbe35===_0x43aa6e(0xa3))return promptCustomAppcode();return _0x2dbe35['appCode'];}export async function selectMultipleApps(_0x1b9eee){const _0x313cdb=a45_0x2ab6;writeCliSideChannelLine(_0x313cdb(0xb8));let _0x1e0732;try{_0x1e0732=await withActiveCookie(_0x1b9eee,()=>listRemoteApps());}catch(_0xbd83f9){writeCliSideChannelLine(_0x313cdb(0xa5));if(_0xbd83f9 instanceof Error)writeCliSideChannelLine(_0x313cdb(0xac)+_0xbd83f9['message']+')');return'custom';}if(_0x1e0732[_0x313cdb(0xb7)]===0x0)return writeCliSideChannelLine(_0x313cdb(0x9e)),'custom';return promptAppSelection(_0x1e0732);}async function _fallbackOrSkip(){const _0x27c770=a45_0x2ab6,_0x104031=await select({'message':'App\x20Code:','choices':[{'name':a45_0x4fd34e[_0x27c770(0xb9)]('(跳过,稍后配置)'),'value':'skip'},{'name':a45_0x4fd34e[_0x27c770(0x98)](_0x27c770(0x9b)),'value':'manual'}]});if(_0x104031===_0x27c770(0xba))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x59f4b3,_0xb3bd36){var _0x3f15cc=a46_0x7f34,_0x323237=_0x59f4b3();while(!![]){try{var _0x24f5ca=-parseInt(_0x3f15cc(0xe6))/0x1*(parseInt(_0x3f15cc(0xea))/0x2)+parseInt(_0x3f15cc(0xe4))/0x3+parseInt(_0x3f15cc(0xe2))/0x4+-parseInt(_0x3f15cc(0xee))/0x5+-parseInt(_0x3f15cc(0xed))/0x6+parseInt(_0x3f15cc(0xe7))/0x7+-parseInt(_0x3f15cc(0xec))/0x8*(-parseInt(_0x3f15cc(0xeb))/0x9);if(_0x24f5ca===_0xb3bd36)break;else _0x323237['push'](_0x323237['shift']());}catch(_0x276d20){_0x323237['push'](_0x323237['shift']());}}}(a46_0x22ba,0x3f67b));function a46_0x7f34(_0x21f927,_0x5c70dc){_0x21f927=_0x21f927-0xe2;var _0x22baf0=a46_0x22ba();var _0x7f34db=_0x22baf0[_0x21f927];return _0x7f34db;}function a46_0x22ba(){var _0x4411dd=['145354kaHQEX','18OshgQJ','93736REmzli','1395024LjSueP','2502640BhJayc','1502828xpDBpP','url','1261173mwzbTj','defineProperties','1Mrjwlp','1721188CYmFeD','method','description'];a46_0x22ba=function(){return _0x4411dd;};return a46_0x22ba();}export function asDryRunResult(_0x117a96,_0xadae56){var _0x429d42=a46_0x7f34;return Object[_0x429d42(0xe5)](_0x117a96,{'method':{'value':_0xadae56[_0x429d42(0xe8)],'enumerable':![]},'url':{'value':_0xadae56[_0x429d42(0xe3)],'enumerable':![]},..._0xadae56[_0x429d42(0xe9)]?{'description':{'value':_0xadae56[_0x429d42(0xe9)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x268a3c=a47_0x1feb;(function(_0xd62ade,_0x33fe98){const _0x5ede8f=a47_0x1feb,_0x4324e2=_0xd62ade();while(!![]){try{const _0x3aed19=parseInt(_0x5ede8f(0xe0))/0x1*(-parseInt(_0x5ede8f(0xf2))/0x2)+parseInt(_0x5ede8f(0xe3))/0x3*(-parseInt(_0x5ede8f(0xe6))/0x4)+-parseInt(_0x5ede8f(0xf1))/0x5+-parseInt(_0x5ede8f(0xdd))/0x6*(parseInt(_0x5ede8f(0xf0))/0x7)+parseInt(_0x5ede8f(0xe7))/0x8+parseInt(_0x5ede8f(0xe1))/0x9*(-parseInt(_0x5ede8f(0xee))/0xa)+parseInt(_0x5ede8f(0xed))/0xb*(parseInt(_0x5ede8f(0xe5))/0xc);if(_0x3aed19===_0x33fe98)break;else _0x4324e2['push'](_0x4324e2['shift']());}catch(_0x160700){_0x4324e2['push'](_0x4324e2['shift']());}}}(a47_0x15d0,0x44385));function a47_0x1feb(_0x5eb2c8,_0x3d01f6){_0x5eb2c8=_0x5eb2c8-0xda;const _0x15d085=a47_0x15d0();let _0x1feb0=_0x15d085[_0x5eb2c8];return _0x1feb0;}export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a47_0x268a3c(0xda)};export const CODE_FLAG={'name':a47_0x268a3c(0xec),'type':a47_0x268a3c(0xe2),'required':!![],'description':a47_0x268a3c(0xea),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};function a47_0x15d0(){const _0x1f3c0f=['21310608AFeDxN','4dWtFbq','400832xiHfog','dbtype','datasetcode','Dataset\x20code\x20(32-char\x20hex\x20UUID)','appcode','code','11BTMJwq','1000MpcSFX','MYSQL','199591ybrvhQ','661600kvMRHv','2zKCpCN','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','POSTGRESQL','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','78aYBVYj','number','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','167047zHankp','45891PabWUX','string','1099869ZYKiBy','Database\x20product\x20type'];a47_0x15d0=function(){return _0x1f3c0f;};return a47_0x15d0();}export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x268a3c(0xe9),'description':a47_0x268a3c(0xea)};export const SQLCODE_FLAG={'name':'sqlcode','type':a47_0x268a3c(0xe2),'required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a47_0x268a3c(0xdf)}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x268a3c(0xeb),'type':a47_0x268a3c(0xe2),'required':![],'description':a47_0x268a3c(0xdc)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x268a3c(0xde),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':a47_0x268a3c(0xe8),'type':a47_0x268a3c(0xe2),'required':!![],'description':a47_0x268a3c(0xe4),'enum':[a47_0x268a3c(0xef),a47_0x268a3c(0xdb)]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a48_0x5729(){const _0x52e6e9=['265mLDWSB','14FZJiEu','length','test','6057vdzPsc','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','756DJODYH','App\x20Code\x20cannot\x20be\x20empty','347314GCMmJx','408hZWFwk','1293687wxVPjy','trim','20uUvHNI','89537YUKmTJ','3437416NFtAyG','App\x20Code\x20cannot\x20exceed\x20100\x20characters','1433217zqpEHB','28444nrbKzW'];a48_0x5729=function(){return _0x52e6e9;};return a48_0x5729();}(function(_0x35f43b,_0x408fb8){const _0x139db6=a48_0x2583,_0x543720=_0x35f43b();while(!![]){try{const _0x2bc6af=parseInt(_0x139db6(0x72))/0x1*(parseInt(_0x139db6(0x81))/0x2)+parseInt(_0x139db6(0x7e))/0x3+-parseInt(_0x139db6(0x7f))/0x4*(-parseInt(_0x139db6(0x80))/0x5)+parseInt(_0x139db6(0x77))/0x6*(parseInt(_0x139db6(0x7b))/0x7)+parseInt(_0x139db6(0x7c))/0x8+-parseInt(_0x139db6(0x78))/0x9*(-parseInt(_0x139db6(0x7a))/0xa)+-parseInt(_0x139db6(0x76))/0xb*(parseInt(_0x139db6(0x74))/0xc);if(_0x2bc6af===_0x408fb8)break;else _0x543720['push'](_0x543720['shift']());}catch(_0x2b6931){_0x543720['push'](_0x543720['shift']());}}}(a48_0x5729,0x78cda));function a48_0x2583(_0x3c116a,_0x10e162){_0x3c116a=_0x3c116a-0x72;const _0x57290b=a48_0x5729();let _0x258381=_0x57290b[_0x3c116a];return _0x258381;}export function validateAppcode(_0x22fdcd){const _0x5d1659=a48_0x2583,_0x38338e=_0x22fdcd[_0x5d1659(0x79)]();if(!_0x38338e)return{'valid':![],'message':_0x5d1659(0x75)};if(_0x38338e[_0x5d1659(0x82)]>0x64)return{'valid':![],'message':_0x5d1659(0x7d)};if(!/^[A-Za-z0-9_-]+$/[_0x5d1659(0x83)](_0x38338e))return{'valid':![],'message':_0x5d1659(0x73)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a49_0x5d56(_0x4e6623,_0x1c5f01){_0x4e6623=_0x4e6623-0xd5;const _0x316392=a49_0x3163();let _0x5d56b5=_0x316392[_0x4e6623];return _0x5d56b5;}const a49_0x585331=a49_0x5d56;(function(_0x32cad3,_0x4723ba){const _0x3f648b=a49_0x5d56,_0x25b2a4=_0x32cad3();while(!![]){try{const _0x506cb4=-parseInt(_0x3f648b(0xe1))/0x1*(-parseInt(_0x3f648b(0xe0))/0x2)+-parseInt(_0x3f648b(0xd6))/0x3+parseInt(_0x3f648b(0xd5))/0x4*(parseInt(_0x3f648b(0xdc))/0x5)+parseInt(_0x3f648b(0xdb))/0x6+parseInt(_0x3f648b(0xd7))/0x7*(-parseInt(_0x3f648b(0xd8))/0x8)+parseInt(_0x3f648b(0xe4))/0x9*(-parseInt(_0x3f648b(0xe7))/0xa)+-parseInt(_0x3f648b(0xe3))/0xb;if(_0x506cb4===_0x4723ba)break;else _0x25b2a4['push'](_0x25b2a4['shift']());}catch(_0x171743){_0x25b2a4['push'](_0x25b2a4['shift']());}}}(a49_0x3163,0xedfe8));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x54182d){const _0xe1a739=a49_0x5d56,_0x3c6b18=_0x54182d[_0xe1a739(0xdf)](_0xe1a739(0xeb));if(!_0x3c6b18)throw CliErrors['validation'](_0xe1a739(0xda),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x409f0e=readConfig(),_0x3347ed=_0x3c6b18===_0xe1a739(0xde)?_0xe1a739(0xea):_0x3c6b18,_0x5cf1b4=_0x409f0e[_0x3347ed];if(_0x5cf1b4===undefined)throw CliErrors['validation'](_0xe1a739(0xe9)+_0x3c6b18);return{'ok':!![],'data':typeof _0x5cf1b4===_0xe1a739(0xe8)?_0x5cf1b4:{[_0x3347ed]:_0x5cf1b4},'message':typeof _0x5cf1b4===_0xe1a739(0xe8)?undefined:String(_0x5cf1b4)};}function a49_0x3163(){const _0x1265e2=['3032kPCYBT','config','Missing\x20key.','2965914BClCug','440rHmKSj','Get\x20a\x20config\x20value\x20by\x20key','app','str','308402cTqMnn','11ofyUti','string','5490342UWgQQi','687663EhNwtJ','read','get','220hfpGiU','object','Key\x20not\x20found:\x20','appcode','key','86656hNRjjm','2163315RwZAkH','4081uliJDL'];a49_0x3163=function(){return _0x1265e2;};return a49_0x3163();}export const configGetDefinition={'service':a49_0x585331(0xd9),'command':a49_0x585331(0xe6),'description':a49_0x585331(0xdd),'risk':a49_0x585331(0xe5),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a49_0x585331(0xe2),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5b8e47,_0x31b6d1){const _0x32a771=a50_0x4458,_0x129aee=_0x5b8e47();while(!![]){try{const _0x500cc4=-parseInt(_0x32a771(0x8d))/0x1+-parseInt(_0x32a771(0x91))/0x2*(parseInt(_0x32a771(0x94))/0x3)+parseInt(_0x32a771(0x8b))/0x4*(-parseInt(_0x32a771(0x8f))/0x5)+-parseInt(_0x32a771(0x90))/0x6*(parseInt(_0x32a771(0x8e))/0x7)+parseInt(_0x32a771(0x92))/0x8+-parseInt(_0x32a771(0x93))/0x9+parseInt(_0x32a771(0x8c))/0xa;if(_0x500cc4===_0x31b6d1)break;else _0x129aee['push'](_0x129aee['shift']());}catch(_0x1b4a56){_0x129aee['push'](_0x129aee['shift']());}}}(a50_0xcd68,0x45178));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a50_0x4458(_0x3f4160,_0x5a264c){_0x3f4160=_0x3f4160-0x8b;const _0xcd68f0=a50_0xcd68();let _0x445883=_0xcd68f0[_0x3f4160];return _0x445883;}function a50_0xcd68(){const _0x5d735e=['66905VReVvG','164202HIIXws','16aRaQXI','2522696JutUAT','2982897iTYIXB','40368rDGBpD','20LhWjAV','10366150TnoSRA','535599hsWWmx','7xROwXc'];a50_0xcd68=function(){return _0x5d735e;};return a50_0xcd68();}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a51_0x115131=a51_0xdc9b;(function(_0x78e8a3,_0x538e15){const _0x2d20d7=a51_0xdc9b,_0x50d909=_0x78e8a3();while(!![]){try{const _0x2b65e9=-parseInt(_0x2d20d7(0x17f))/0x1+parseInt(_0x2d20d7(0x18a))/0x2*(parseInt(_0x2d20d7(0x183))/0x3)+-parseInt(_0x2d20d7(0x180))/0x4+-parseInt(_0x2d20d7(0x184))/0x5+-parseInt(_0x2d20d7(0x18e))/0x6+-parseInt(_0x2d20d7(0x18c))/0x7*(-parseInt(_0x2d20d7(0x188))/0x8)+parseInt(_0x2d20d7(0x189))/0x9*(parseInt(_0x2d20d7(0x182))/0xa);if(_0x2b65e9===_0x538e15)break;else _0x50d909['push'](_0x50d909['shift']());}catch(_0x3bfe38){_0x50d909['push'](_0x50d909['shift']());}}}(a51_0x4de5,0xe06d1));function a51_0x4de5(){const _0x322d28=['7198390oOKAfs','global','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','read','8ecKaVG','117EaoVdw','1289068IminuX','boolean','6669474ZrrquF','config','1192098CNqlIJ','1644211zRyiLw','4968936JYvIhS','List\x20all\x20config\x20values','2959030IJjPnV','3qAZbyj'];a51_0x4de5=function(){return _0x322d28;};return a51_0x4de5();}import{readScopedConfig}from'../../commands/config/shared.js';function a51_0xdc9b(_0x1ff5bf,_0x213aa4){_0x1ff5bf=_0x1ff5bf-0x17f;const _0x4de531=a51_0x4de5();let _0xdc9b1b=_0x4de531[_0x1ff5bf];return _0xdc9b1b;}import{readConfig}from'../../utils/config.js';async function execute(_0x5a1766){const _0x937b6b=a51_0xdc9b,_0x2ec423=_0x5a1766['bool'](_0x937b6b(0x185))?readScopedConfig(_0x937b6b(0x185)):readConfig();return{'ok':!![],'data':_0x2ec423};}export const configListDefinition={'service':a51_0x115131(0x18d),'command':'list','description':a51_0x115131(0x181),'risk':a51_0x115131(0x187),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'global','type':a51_0x115131(0x18b),'description':a51_0x115131(0x186),'default':![]}],'execute':execute};
|