@lovrabet/rabetbase-cli 2.3.7-beta.4 → 2.3.8-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/local-file.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/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.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/file/index.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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.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_0x36b9fb=a36_0x50f8;(function(_0x1c8488,_0x1cedae){const _0x11c118=a36_0x50f8,_0x20ed39=_0x1c8488();while(!![]){try{const _0xe638ae=-parseInt(_0x11c118(0xe5))/0x1+-parseInt(_0x11c118(0xef))/0x2*(-parseInt(_0x11c118(0xfe))/0x3)+-parseInt(_0x11c118(0x102))/0x4+-parseInt(_0x11c118(0xf7))/0x5+-parseInt(_0x11c118(0xc3))/0x6+-parseInt(_0x11c118(0xfa))/0x7+parseInt(_0x11c118(0xfb))/0x8;if(_0xe638ae===_0x1cedae)break;else _0x20ed39['push'](_0x20ed39['shift']());}catch(_0x59c024){_0x20ed39['push'](_0x20ed39['shift']());}}}(a36_0x402b,0xe7aee));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';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';function a36_0x50f8(_0x1c224b,_0x11f12){_0x1c224b=_0x1c224b-0xb8;const _0x402bfb=a36_0x402b();let _0x50f8a8=_0x402bfb[_0x1c224b];return _0x50f8a8;}import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x36b9fb(0xf3),'command':'pull','description':a36_0x36b9fb(0xc7),'risk':'write','flags':[{'name':a36_0x36b9fb(0xda),'type':'string','description':a36_0x36b9fb(0x101),'enum':[a36_0x36b9fb(0xdc),a36_0x36b9fb(0xc9),a36_0x36b9fb(0xeb)]},{'name':a36_0x36b9fb(0xd8),'type':a36_0x36b9fb(0xf8),'description':a36_0x36b9fb(0xf4)}],async 'dryRun'(_0x3ded7a){const _0x551fb8=a36_0x36b9fb,_0x4a2274=loadBffProjectConfig(_0x3ded7a[_0x551fb8(0xca)]),_0x29927f=await readBffLockFile(_0x4a2274[_0x551fb8(0xbf)]),{appLock:_0x19ea09}=ensureLockScope(_0x29927f??createEmptyBffLock(),_0x3ded7a['appCode'],_0x4a2274[_0x551fb8(0xf2)],_0x551fb8(0xc4)),_0x1ca496=normalizeBffType(_0x3ded7a[_0x551fb8(0xe1)](_0x551fb8(0xda)))??undefined,_0x28f224=buildDatasetCodeToAliasMap(_0x3ded7a[_0x551fb8(0xe9)],_0x3ded7a[_0x551fb8(0xca)]),[_0x2596dc,_0xd8a08e]=await Promise['all']([listBffScripts(_0x3ded7a['appCode'],_0x1ca496),getBffScriptStatistics(_0x3ded7a[_0x551fb8(0xca)])]),_0x4066ce=createHookLocationMap(_0xd8a08e),_0x2b069e=[];for(const _0x5af29a of _0x2596dc){const _0x1975c0=resolveRemoteScriptTarget(_0x4a2274,_0x5af29a,_0x4066ce,_0x19ea09[_0x551fb8(0xb9)],_0x28f224);if(!_0x1975c0){_0x2b069e[_0x551fb8(0xe2)]({'scriptType':_0x5af29a[_0x551fb8(0xde)],'functionName':_0x5af29a[_0x551fb8(0xc2)]??'','status':_0x551fb8(0xfc),'reason':'unresolvable\x20target\x20path'});continue;}const _0x4a359e=_0x19ea09[_0x551fb8(0xb9)][_0x1975c0[_0x551fb8(0xcd)]],_0x1d091d=_0x5af29a[_0x551fb8(0xd7)]!=null?computeContentHash(_0x5af29a[_0x551fb8(0xd7)]):undefined,_0xe20f69=await hasUnsyncedLocalChanges(_0x1975c0[_0x551fb8(0xcc)],_0x4a359e,_0x1d091d);_0x2b069e[_0x551fb8(0xe2)]({'lockKey':_0x1975c0[_0x551fb8(0xcd)],'filePath':_0x1975c0[_0x551fb8(0xcc)],'remoteId':_0x5af29a['id']??null,'status':_0xe20f69?'conflict':_0x551fb8(0xe6)});}return{'method':_0x551fb8(0xcf),'url':_0x551fb8(0x103)+_0x3ded7a[_0x551fb8(0xca)]+(_0x1ca496?_0x551fb8(0xf1)+_0x1ca496:''),'body':{'appCode':_0x3ded7a['appCode'],'filterType':_0x1ca496??null,'files':_0x2b069e},'description':_0x551fb8(0xd5)+_0x2b069e[_0x551fb8(0xec)]+_0x551fb8(0xbd)};},async 'execute'(_0x45e52c){const _0x37fa47=a36_0x36b9fb,_0x5e1a9a=loadBffProjectConfig(_0x45e52c['appCode']),_0x31b0d6=await readBffLockFile(_0x5e1a9a['lockFilePath']),{lockData:_0x468111,appLock:_0x560bbb}=ensureLockScope(_0x31b0d6??createEmptyBffLock(),_0x45e52c[_0x37fa47(0xca)],_0x5e1a9a[_0x37fa47(0xf2)],_0x37fa47(0xc4)),_0x5d9e35=normalizeBffType(_0x45e52c[_0x37fa47(0xe1)]('type'))??undefined;if(_0x45e52c['str'](_0x37fa47(0xda))&&!_0x5d9e35)throw CliErrors[_0x37fa47(0xe3)](_0x37fa47(0xd3));const [_0x136469,_0x178146]=await Promise[_0x37fa47(0xf9)]([listBffScripts(_0x45e52c[_0x37fa47(0xca)],_0x5d9e35),getBffScriptStatistics(_0x45e52c[_0x37fa47(0xca)])]);if(_0x136469[_0x37fa47(0xec)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x37fa47(0xbe)};const _0x48875d=_0x45e52c[_0x37fa47(0xc1)](_0x37fa47(0xd8));if(_0x48875d&&!_0x45e52c[_0x37fa47(0xea)]){const _0x490c44=await confirmForce();if(!_0x490c44)throw CliErrors[_0x37fa47(0xce)](_0x37fa47(0xe0));}if(_0x48875d&&_0x45e52c[_0x37fa47(0xea)]){}const _0x50cf09=buildDatasetCodeToAliasMap(_0x45e52c[_0x37fa47(0xe9)],_0x45e52c[_0x37fa47(0xca)]),_0x443600=createHookLocationMap(_0x178146),_0xc6a670=JSON[_0x37fa47(0xed)](JSON['stringify'](_0x468111)),_0x3118b0=_0x45e52c['appCode'],_0x29eab3=_0xc6a670['apps'][_0x3118b0];if(!_0x29eab3)throw new Error(_0x37fa47(0xb8)+_0x3118b0+_0x37fa47(0xf0));const _0x3f7c84=[],_0x2f17f9=[],_0x4bc9a5=[];for(const _0x7c00f4 of _0x136469){const _0x4ba865=resolveRemoteScriptTarget(_0x5e1a9a,_0x7c00f4,_0x443600,_0x560bbb[_0x37fa47(0xb9)],_0x50cf09);if(!_0x4ba865){_0x2f17f9[_0x37fa47(0xe2)]({'lockKey':_0x7c00f4['scriptType']+'/'+_0x7c00f4[_0x37fa47(0xc2)],'reason':_0x37fa47(0xd9)});continue;}const _0x8eca96=_0x560bbb['functions'][_0x4ba865[_0x37fa47(0xcd)]];try{if(!_0x7c00f4['id'])throw new Error(_0x37fa47(0xd0));if(_0x7c00f4[_0x37fa47(0xd7)]==null)throw new Error(_0x37fa47(0xcb));const _0x4a287f=_0x7c00f4[_0x37fa47(0xd7)],_0x110dfc=computeContentHash(_0x4a287f);if(!_0x48875d){const _0x451f34=await hasUnsyncedLocalChanges(_0x4ba865[_0x37fa47(0xcc)],_0x8eca96,_0x110dfc);if(_0x451f34){_0x2f17f9[_0x37fa47(0xe2)]({'lockKey':_0x4ba865[_0x37fa47(0xcd)],'reason':_0x37fa47(0xdd)});continue;}}await ensureParentDirectory(_0x4ba865[_0x37fa47(0xcc)]),await writeFile(_0x4ba865[_0x37fa47(0xcc)],_0x4a287f,'utf8');const _0x1ab70e={'hash':_0x110dfc,'remoteId':_0x7c00f4['id'],'version':_0x7c00f4[_0x37fa47(0xbb)]};_0x4ba865[_0x37fa47(0xda)]===_0x37fa47(0xeb)&&_0x4ba865['hookLocation']&&(_0x1ab70e[_0x37fa47(0x100)]=_0x4ba865[_0x37fa47(0xe8)][_0x37fa47(0x100)],_0x1ab70e['datasetCode']=_0x4ba865[_0x37fa47(0xe8)][_0x37fa47(0xdb)],_0x1ab70e[_0x37fa47(0xd4)]=_0x4ba865[_0x37fa47(0xe8)][_0x37fa47(0xd4)],_0x1ab70e[_0x37fa47(0xff)]=_0x4ba865[_0x37fa47(0xe8)][_0x37fa47(0xff)]),_0x29eab3[_0x37fa47(0xb9)][_0x4ba865[_0x37fa47(0xcd)]]=_0x1ab70e,_0x3f7c84[_0x37fa47(0xe2)]({'lockKey':_0x4ba865[_0x37fa47(0xcd)],'remoteId':_0x7c00f4['id']});}catch(_0x5a8c7c){_0x4bc9a5[_0x37fa47(0xe2)]({'lockKey':_0x4ba865[_0x37fa47(0xcd)],'error':_0x5a8c7c instanceof Error?_0x5a8c7c[_0x37fa47(0xdf)]:String(_0x5a8c7c)});}}return _0x29eab3[_0x37fa47(0xc0)]=new Date()[_0x37fa47(0xba)](),await writeBffLockFile(_0x5e1a9a[_0x37fa47(0xbf)],_0xc6a670),{'ok':_0x4bc9a5[_0x37fa47(0xec)]===0x0,'data':{'pulled':_0x3f7c84,'skipped':_0x2f17f9,'failed':_0x4bc9a5},'message':_0x37fa47(0xd1)+_0x3f7c84['length']+_0x37fa47(0xbc)+_0x2f17f9[_0x37fa47(0xec)]+_0x37fa47(0xf6)+_0x4bc9a5[_0x37fa47(0xec)]+_0x37fa47(0xfd)};}};async function hasUnsyncedLocalChanges(_0x49bea2,_0x3e1f02,_0x26cc8f){const _0x52c912=a36_0x36b9fb;if(!await fileExists(_0x49bea2))return![];const _0x271ae9=await computeFileHash(_0x49bea2);if(!_0x3e1f02)return _0x26cc8f?_0x271ae9!==_0x26cc8f:!![];return _0x271ae9!==_0x3e1f02[_0x52c912(0xd2)];}function buildDatasetCodeToAliasMap(_0xbbca5b,_0x2d989f){const _0x30d1e9=a36_0x36b9fb,_0x33b8fc=loadAliasMap(_0xbbca5b,undefined,resolveApiFilePath(_0xbbca5b,_0x2d989f));return new Map(_0x33b8fc['map'](_0x55b525=>[_0x55b525[_0x30d1e9(0xdb)],_0x55b525['alias']]));}function a36_0x402b(){const _0x5555b9=['type','datasetCode','COMMON','local\x20unsynced\x20changes','scriptType','message','Force\x20pull\x20cancelled.','str','push','validation','stderr','766658PGGyxE','would_pull','yes','hookLocation','apiDir','nonInteractive','HOOK','length','parse','stdin','2753886mNKSEy','\x22\x20not\x20found\x20after\x20ensureLockScope.','&type=','scriptsRoot','bff','Force\x20overwrite\x20local\x20unsynced\x20changes','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','\x20skipped,\x20','217580rTYzqq','boolean','all','7145558kaCpgX','28769560FQfLrr','skipped','\x20failed','3MNKQWS','functionNode','alias','Pull\x20only\x20this\x20script\x20type','5078228DkehjT','/api/management/library/scripts/list?appCode=','Lock\x20scope\x20for\x20app\x20\x22','functions','toISOString','version','\x20pulled,\x20','\x20remote\x20BFF\x20script(s)\x20for\x20pull','No\x20remote\x20BFF\x20scripts\x20found.','lockFilePath','lastSync','bool','functionName','5541834wtSLOX','pull','includes','toLowerCase','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','trim','ENDPOINT','appCode','Remote\x20script\x20missing\x20content.','filePath','lockKey','cancelled','GET','Remote\x20script\x20missing\x20id.','Pull\x20complete:\x20','hash','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','operationType','Would\x20inspect\x20','question','scriptContent','force','unresolvable\x20target\x20path'];a36_0x402b=function(){return _0x5555b9;};return a36_0x402b();}async function confirmForce(){const _0x4b2c4c=a36_0x36b9fb,_0x2d3106=createInterface({'input':process[_0x4b2c4c(0xee)],'output':process[_0x4b2c4c(0xe4)]}),_0x31e50f=await new Promise(_0x27d925=>{const _0x1c58dd=_0x4b2c4c;_0x2d3106[_0x1c58dd(0xd6)](_0x1c58dd(0xf5),_0x27d925);});return _0x2d3106['close'](),['y',_0x4b2c4c(0xe7)][_0x4b2c4c(0xc5)](_0x31e50f[_0x4b2c4c(0xc8)]()[_0x4b2c4c(0xc6)]());}
|
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a37_0x1853fa=a37_0xd1e0;(function(_0x373321,_0x43fc97){const _0x60fcd5=a37_0xd1e0,_0x2d5813=_0x373321();while(!![]){try{const _0x2843e3=parseInt(_0x60fcd5(0xf5))/0x1+-parseInt(_0x60fcd5(0xbc))/0x2*(parseInt(_0x60fcd5(0xf3))/0x3)+parseInt(_0x60fcd5(0xd2))/0x4*(parseInt(_0x60fcd5(0xb8))/0x5)+-parseInt(_0x60fcd5(0xb6))/0x6*(parseInt(_0x60fcd5(0xdf))/0x7)+parseInt(_0x60fcd5(0xc2))/0x8+parseInt(_0x60fcd5(0xa9))/0x9+parseInt(_0x60fcd5(0xb5))/0xa*(-parseInt(_0x60fcd5(0xe3))/0xb);if(_0x2843e3===_0x43fc97)break;else _0x2d5813['push'](_0x2d5813['shift']());}catch(_0x17bf54){_0x2d5813['push'](_0x2d5813['shift']());}}}(a37_0x2e62,0x54272));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';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';function a37_0x2e62(){const _0x222610=['lastSync','every','str','\x20skipped,\x20','update','4435974hsRwad','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','create','Force\x20push\x20ignoring\x20hash\x20protection','Incomplete\x20HOOK\x20path:\x20','join','some','datasetCode','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','appCode','message','bool','3210030abHPGa','2597964CBMuVS','functionNode','15iqgXvp','get','datasetId','type','2xzaAKl','name','length','stringify','scriptsRoot','has','4030408RMTQKQ','\x22\x20not\x20found\x20after\x20ensureLockScope.','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','lockFilePath','unchanged','operationType','functions','bff','description','runtime\x20cache\x20cleared','Runtime\x20script\x20cache\x20cleared.','\x20uploaded,\x20','Cannot\x20resolve\x20dataset\x20for\x20\x22','filter','runtime\x20cache\x20clear\x20failed','set','251148XPatrj','push','apiDir',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','values','Local\x20function\x20not\x20found:\x20','string','alias','status','HOOK','remoteId','attempted','toISOString','7emwpcU','high-risk-write','\x22.\x20','version','22CKbHxg','validation','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','boolean','filePath','datasetCodeToDataset','would_push','Run\x20`','map','apps','aliasToDatasetCode','\x20failed,\x20','code','Would\x20inspect\x20','POST','ENDPOINT','70323jEdepO','/api/management/library/scripts/save','258083cObfeH','lockKey','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.'];a37_0x2e62=function(){return _0x222610;};return a37_0x2e62();}const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;function a37_0xd1e0(_0x4a6350,_0xdac2d7){_0x4a6350=_0x4a6350-0xa9;const _0x2e6209=a37_0x2e62();let _0xd1e0c7=_0x2e6209[_0x4a6350];return _0xd1e0c7;}export const bffPush={'service':a37_0x1853fa(0xc9),'command':a37_0x1853fa(0xd3),'description':'Push\x20local\x20BFF\x20scripts\x20to\x20remote','risk':a37_0x1853fa(0xe0),'flags':[{'name':a37_0x1853fa(0xbb),'type':'string','description':'Push\x20only\x20this\x20script\x20type','enum':['COMMON',a37_0x1853fa(0xf2),a37_0x1853fa(0xdb)]},{'name':a37_0x1853fa(0xbd),'type':a37_0x1853fa(0xd8),'description':a37_0x1853fa(0xc4)},{'name':'force','type':a37_0x1853fa(0xe6),'description':a37_0x1853fa(0xac)}],async 'dryRun'(_0x3eaeac){const _0x273496=a37_0x1853fa,_0x244606=loadBffProjectConfig(_0x3eaeac[_0x273496(0xb2)]),_0xd5dcb4=await readBffLockFile(_0x244606[_0x273496(0xc5)]),{appLock:_0x1fed3c}=ensureLockScope(_0xd5dcb4??createEmptyBffLock(),_0x3eaeac['appCode'],_0x244606[_0x273496(0xc0)],_0x273496(0xd3)),_0x4df6fe=await getTargetFunctions(_0x244606,_0x3eaeac),_0x2304d9=_0x3eaeac[_0x273496(0xb4)]('force'),_0x27e6f5=[];for(const _0x1dca77 of _0x4df6fe){const _0x5c1552=await computeFileHash(_0x1dca77[_0x273496(0xe7)]),_0x1cbcce=_0x1fed3c[_0x273496(0xc8)][_0x1dca77[_0x273496(0xf6)]],_0x23410e=!!_0x1cbcce&&_0x1cbcce['hash']===_0x5c1552;_0x27e6f5[_0x273496(0xd3)]({'lockKey':_0x1dca77[_0x273496(0xf6)],'filePath':_0x1dca77[_0x273496(0xe7)],'remoteId':_0x1cbcce?.['remoteId']??null,'mode':_0x1cbcce?.[_0x273496(0xdc)]?_0x273496(0xfc):_0x273496(0xab),'status':!_0x2304d9&&_0x23410e?_0x273496(0xc6):'would_push'});}return{'method':_0x273496(0xf1),'url':_0x273496(0xf4),'body':{'appCode':_0x3eaeac[_0x273496(0xb2)],'force':_0x2304d9,'files':_0x27e6f5,'cacheClearAtRuntime':_0x27e6f5[_0x273496(0xaf)](_0x43bbb1=>_0x43bbb1[_0x273496(0xda)]===_0x273496(0xe9)),'cacheClearAtRuntimeTimes':_0x27e6f5[_0x273496(0xaf)](_0xced55c=>_0xced55c[_0x273496(0xda)]===_0x273496(0xe9))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x273496(0xf0)+_0x27e6f5['length']+_0x273496(0xaa)};},async 'execute'(_0x2aa497){const _0x4594a0=a37_0x1853fa,_0x1fae09=loadBffProjectConfig(_0x2aa497[_0x4594a0(0xb2)]),_0x5b8be6=await readBffLockFile(_0x1fae09[_0x4594a0(0xc5)]),{lockData:_0x438669,appLock:_0x650087}=ensureLockScope(_0x5b8be6??createEmptyBffLock(),_0x2aa497['appCode'],_0x1fae09[_0x4594a0(0xc0)],_0x4594a0(0xd3)),_0x7101f6=await getTargetFunctions(_0x1fae09,_0x2aa497);if(_0x7101f6[_0x4594a0(0xbe)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x33d020=_0x2aa497[_0x4594a0(0xb4)]('force'),_0x1e3300=JSON['parse'](JSON[_0x4594a0(0xbf)](_0x438669)),_0x588ea9=_0x1e3300[_0x4594a0(0xec)][_0x2aa497[_0x4594a0(0xb2)]];if(!_0x588ea9)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x2aa497['appCode']+_0x4594a0(0xc3));const _0x216a72=await buildHookMaps(_0x2aa497[_0x4594a0(0xb2)],_0x2aa497[_0x4594a0(0xd4)],_0x7101f6,_0x588ea9),_0x5937ff=[],_0xba4091=[],_0x4eda71=[];for(const _0x175a1c of _0x7101f6){const _0x15ee5f=await computeFileHash(_0x175a1c[_0x4594a0(0xe7)]),_0x3002b1=_0x588ea9['functions'][_0x175a1c[_0x4594a0(0xf6)]];if(!_0x33d020&&_0x3002b1&&_0x3002b1['hash']===_0x15ee5f){_0xba4091['push']({'lockKey':_0x175a1c[_0x4594a0(0xf6)],'reason':_0x4594a0(0xc6)});continue;}try{await uploadSingleFunction(_0x2aa497[_0x4594a0(0xb2)],_0x175a1c,_0x588ea9,_0x216a72);const _0x5cadb1=_0x588ea9[_0x4594a0(0xc8)][_0x175a1c['lockKey']];_0x5937ff['push']({'lockKey':_0x175a1c['lockKey'],'remoteId':_0x5cadb1?.[_0x4594a0(0xdc)]??0x0});}catch(_0x22c1c6){_0x4eda71[_0x4594a0(0xd3)]({'lockKey':_0x175a1c[_0x4594a0(0xf6)],'error':_0x22c1c6 instanceof Error?_0x22c1c6[_0x4594a0(0xb3)]:String(_0x22c1c6)});}}_0x588ea9[_0x4594a0(0xf8)]=new Date()[_0x4594a0(0xde)](),await writeBffLockFile(_0x1fae09[_0x4594a0(0xc5)],_0x1e3300),await waitForUploadedLockEntries(_0x1fae09[_0x4594a0(0xc5)],_0x2aa497[_0x4594a0(0xb2)],_0x5937ff['map'](_0x133488=>_0x133488[_0x4594a0(0xf6)]));let _0x2a6d5e={'attempted':![],'cleared':![]};if(_0x5937ff[_0x4594a0(0xbe)]>0x0)try{let _0x53915a='';for(let _0x4e4e68=0x0;_0x4e4e68<CACHE_CLEAR_ATTEMPTS;_0x4e4e68+=0x1){_0x53915a=await clearBffScriptCache(),_0x4e4e68<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x2a6d5e={'attempted':!![],'cleared':!![],'message':_0x53915a||_0x4594a0(0xcc)};}catch(_0x38a2d9){_0x2a6d5e={'attempted':!![],'cleared':![],'error':_0x38a2d9 instanceof Error?_0x38a2d9['message']:String(_0x38a2d9)};}const _0x4c57bc=_0x4eda71['length']===0x0&&(_0x2a6d5e['attempted']?_0x2a6d5e['cleared']:!![]),_0x132e29=_0x2a6d5e[_0x4594a0(0xdd)]?_0x2a6d5e['cleared']?_0x4594a0(0xcb):_0x4594a0(0xd0):'runtime\x20cache\x20not\x20needed';return{'ok':_0x4c57bc,'data':{'uploaded':_0x5937ff,'skipped':_0xba4091,'failed':_0x4eda71,'cacheClear':_0x2a6d5e},'message':'Push\x20complete:\x20'+_0x5937ff['length']+_0x4594a0(0xcd)+_0xba4091['length']+_0x4594a0(0xfb)+_0x4eda71[_0x4594a0(0xbe)]+_0x4594a0(0xee)+_0x132e29};}};async function getTargetFunctions(_0x1175c8,_0xb7a2a0){const _0x13db12=a37_0x1853fa,_0x4696af=_0xb7a2a0[_0x13db12(0xfa)](_0x13db12(0xbb)),_0x351365=_0xb7a2a0[_0x13db12(0xfa)](_0x13db12(0xbd)),_0x1be51c=normalizeBffType(_0x4696af)??undefined;if(_0x351365&&!_0x1be51c)throw CliErrors[_0x13db12(0xe4)](_0x13db12(0xf7));const _0x37cc88=await scanLocalBffFunctions(_0x1175c8,_0x1be51c);if(_0x351365){const _0x16ddf1=_0x37cc88[_0x13db12(0xcf)](_0x2ea046=>_0x2ea046[_0x13db12(0xbd)]===_0x351365);if(_0x16ddf1[_0x13db12(0xbe)]===0x0)throw CliErrors['validation'](_0x13db12(0xd7)+_0x1be51c+'/'+_0x351365);return _0x16ddf1;}return _0x37cc88;}async function buildHookMaps(_0x5a6dc4,_0x21fd8c,_0x44cc35,_0x53b8c0){const _0x330de5=a37_0x1853fa,_0x467dba=_0x44cc35['some'](_0x337762=>_0x337762[_0x330de5(0xbb)]===_0x330de5(0xdb));if(!_0x467dba)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x5030f5=loadAliasMap(_0x21fd8c,undefined,resolveApiFilePath(_0x21fd8c,_0x5a6dc4)),_0x44aaf9=new Map(_0x5030f5[_0x330de5(0xeb)](_0x4d3c9a=>[_0x4d3c9a['alias'],_0x4d3c9a[_0x330de5(0xb0)]]));for(const _0x80d3ef of Object[_0x330de5(0xd6)](_0x53b8c0[_0x330de5(0xc8)])){_0x80d3ef[_0x330de5(0xd9)]&&_0x80d3ef['datasetCode']&&!_0x44aaf9[_0x330de5(0xc1)](_0x80d3ef[_0x330de5(0xd9)])&&_0x44aaf9[_0x330de5(0xd1)](_0x80d3ef[_0x330de5(0xd9)],_0x80d3ef[_0x330de5(0xb0)]);}const _0x4ee837=await listDatasets(_0x5a6dc4),_0x17c5de=new Map(_0x4ee837['map'](_0x923ba=>[_0x923ba[_0x330de5(0xef)],_0x923ba]));return{'aliasToDatasetCode':_0x44aaf9,'datasetCodeToDataset':_0x17c5de};}async function uploadSingleFunction(_0x10b50e,_0x2a5044,_0x45d562,_0x229d92){const _0x305f09=a37_0x1853fa,_0x149b2a=await readFile(_0x2a5044[_0x305f09(0xe7)],'utf8'),_0x41560f=await computeFileHash(_0x2a5044['filePath']),_0x445db0=_0x45d562['functions'][_0x2a5044[_0x305f09(0xf6)]];if(_0x445db0?.[_0x305f09(0xdc)]&&_0x445db0[_0x305f09(0xe2)]==null)throw CliErrors[_0x305f09(0xe4)](_0x2a5044[_0x305f09(0xf6)]+_0x305f09(0xd5));let _0x5a688e=extractScriptDescription(_0x149b2a);if(!_0x5a688e&&_0x445db0?.[_0x305f09(0xdc)]){const _0x1c63dd=await getBffScriptInfo(_0x445db0['remoteId']);_0x5a688e=_0x1c63dd['description']||undefined;}const _0x1a99fd={'appCode':_0x10b50e,'functionName':_0x2a5044[_0x305f09(0xbd)],'scriptType':_0x2a5044[_0x305f09(0xbb)],'scriptContent':_0x149b2a};if(_0x445db0?.[_0x305f09(0xdc)])_0x1a99fd['id']=_0x445db0[_0x305f09(0xdc)];if(_0x445db0?.['version']!=null)_0x1a99fd['version']=_0x445db0[_0x305f09(0xe2)];if(_0x5a688e)_0x1a99fd[_0x305f09(0xca)]=_0x5a688e;if(_0x2a5044[_0x305f09(0xbb)]===_0x305f09(0xdb)){const _0x466f67=_0x2a5044['alias'];if(!_0x466f67||!_0x2a5044[_0x305f09(0xc7)]||!_0x2a5044[_0x305f09(0xb7)])throw CliErrors['validation'](_0x305f09(0xad)+_0x2a5044[_0x305f09(0xf6)]);const _0x268d78=_0x229d92['aliasToDatasetCode'][_0x305f09(0xb9)](_0x466f67)??_0x445db0?.['datasetCode']??_0x466f67,_0x55c018=_0x229d92[_0x305f09(0xe8)][_0x305f09(0xb9)](_0x268d78);if(!_0x55c018)throw CliErrors[_0x305f09(0xe4)](_0x305f09(0xce)+_0x466f67+_0x305f09(0xe1)+(_0x305f09(0xea)+CLI_BIN_NAME+_0x305f09(0xe5)));_0x1a99fd[_0x305f09(0xba)]=_0x55c018['id'],_0x1a99fd[_0x305f09(0xc7)]=_0x2a5044[_0x305f09(0xc7)],_0x1a99fd[_0x305f09(0xb7)]=_0x2a5044[_0x305f09(0xb7)];}const _0x34a2b8=await saveBffScript(_0x1a99fd),_0x31cf65=_0x34a2b8['id'],_0x7f3f81=_0x34a2b8['script']??await getBffScriptInfo(_0x31cf65),_0x5066c7={'hash':_0x41560f,'remoteId':_0x31cf65,'version':_0x7f3f81[_0x305f09(0xe2)]};if(_0x2a5044[_0x305f09(0xbb)]===_0x305f09(0xdb)){const _0xf61b65=_0x2a5044[_0x305f09(0xd9)],_0x197377=_0x229d92[_0x305f09(0xed)][_0x305f09(0xb9)](_0xf61b65)??_0x445db0?.[_0x305f09(0xb0)]??_0xf61b65;_0x229d92[_0x305f09(0xed)][_0x305f09(0xc1)](_0xf61b65)?_0x5066c7[_0x305f09(0xd9)]=_0xf61b65:_0x5066c7[_0x305f09(0xd9)]=_0x445db0?.['alias'],_0x5066c7[_0x305f09(0xb0)]=_0x197377,_0x5066c7[_0x305f09(0xc7)]=_0x2a5044[_0x305f09(0xc7)],_0x5066c7[_0x305f09(0xb7)]=_0x2a5044[_0x305f09(0xb7)];}_0x45d562[_0x305f09(0xc8)][_0x2a5044[_0x305f09(0xf6)]]=_0x5066c7;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x22f740,_0x45f75a,_0x43ab8b){const _0x27232a=a37_0x1853fa;if(_0x43ab8b[_0x27232a(0xbe)]===0x0)return;for(let _0x24f191=0x0;_0x24f191<LOCK_SETTLE_RETRY_COUNT;_0x24f191+=0x1){const _0x4ccc64=await readBffLockFile(_0x22f740),_0x380006=_0x4ccc64?.[_0x27232a(0xec)]?.[_0x45f75a]?.['functions']??{},_0x172ddc=_0x43ab8b[_0x27232a(0xf9)](_0x5c2c29=>!!_0x380006[_0x5c2c29]?.['remoteId']);if(_0x172ddc)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x27232a(0xb1)+_0x43ab8b[_0x27232a(0xae)](',\x20')+'.');}
|
|
1
|
+
const a37_0x2a1e70=a37_0x40b6;(function(_0x548b91,_0x2ca3be){const _0x555c13=a37_0x40b6,_0x5af861=_0x548b91();while(!![]){try{const _0x267fae=-parseInt(_0x555c13(0x148))/0x1*(parseInt(_0x555c13(0x163))/0x2)+-parseInt(_0x555c13(0x14f))/0x3*(-parseInt(_0x555c13(0x16e))/0x4)+parseInt(_0x555c13(0x162))/0x5+parseInt(_0x555c13(0x12b))/0x6+-parseInt(_0x555c13(0x147))/0x7*(-parseInt(_0x555c13(0x158))/0x8)+parseInt(_0x555c13(0x164))/0x9*(-parseInt(_0x555c13(0x14c))/0xa)+-parseInt(_0x555c13(0x12f))/0xb;if(_0x267fae===_0x2ca3be)break;else _0x5af861['push'](_0x5af861['shift']());}catch(_0x257b65){_0x5af861['push'](_0x5af861['shift']());}}}(a37_0x4285,0xe8186));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';function a37_0x40b6(_0x4a8d94,_0x40a2ae){_0x4a8d94=_0x4a8d94-0x127;const _0x42856f=a37_0x4285();let _0x40b69b=_0x42856f[_0x4a8d94];return _0x40b69b;}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_0x2a1e70(0x140),'command':a37_0x2a1e70(0x144),'description':a37_0x2a1e70(0x167),'risk':a37_0x2a1e70(0x127),'flags':[{'name':a37_0x2a1e70(0x13b),'type':'string','description':'Push\x20only\x20this\x20script\x20type','enum':['COMMON',a37_0x2a1e70(0x173),'HOOK']},{'name':'name','type':a37_0x2a1e70(0x150),'description':a37_0x2a1e70(0x176)},{'name':a37_0x2a1e70(0x133),'type':a37_0x2a1e70(0x12e),'description':a37_0x2a1e70(0x160)}],async 'dryRun'(_0x5f5223){const _0x15655c=a37_0x2a1e70,_0x54e982=loadBffProjectConfig(_0x5f5223[_0x15655c(0x13e)]),_0x5459ab=await readBffLockFile(_0x54e982[_0x15655c(0x153)]),{appLock:_0x395755}=ensureLockScope(_0x5459ab??createEmptyBffLock(),_0x5f5223[_0x15655c(0x13e)],_0x54e982['scriptsRoot'],_0x15655c(0x144)),_0x4bf979=await getTargetFunctions(_0x54e982,_0x5f5223),_0x3d4c61=_0x5f5223[_0x15655c(0x131)](_0x15655c(0x133)),_0x29bca0=[];for(const _0x1cb535 of _0x4bf979){const _0x3e65ae=await computeFileHash(_0x1cb535[_0x15655c(0x149)]),_0x1a2d45=_0x395755['functions'][_0x1cb535[_0x15655c(0x16a)]],_0x422e73=!!_0x1a2d45&&_0x1a2d45[_0x15655c(0x16b)]===_0x3e65ae;_0x29bca0[_0x15655c(0x144)]({'lockKey':_0x1cb535['lockKey'],'filePath':_0x1cb535[_0x15655c(0x149)],'remoteId':_0x1a2d45?.[_0x15655c(0x16c)]??null,'mode':_0x1a2d45?.['remoteId']?_0x15655c(0x172):_0x15655c(0x15b),'status':!_0x3d4c61&&_0x422e73?_0x15655c(0x15d):_0x15655c(0x157)});}return{'method':'POST','url':'/api/management/library/scripts/save','body':{'appCode':_0x5f5223[_0x15655c(0x13e)],'force':_0x3d4c61,'files':_0x29bca0,'cacheClearAtRuntime':_0x29bca0[_0x15655c(0x12d)](_0x577dd6=>_0x577dd6['status']===_0x15655c(0x157)),'cacheClearAtRuntimeTimes':_0x29bca0[_0x15655c(0x12d)](_0x1f298b=>_0x1f298b[_0x15655c(0x145)]===_0x15655c(0x157))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x15655c(0x169)+_0x29bca0[_0x15655c(0x170)]+'\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0x12532c){const _0x468e9a=a37_0x2a1e70,_0x9742d6=loadBffProjectConfig(_0x12532c['appCode']),_0x2ac109=await readBffLockFile(_0x9742d6['lockFilePath']),{lockData:_0x15cad6,appLock:_0x15e403}=ensureLockScope(_0x2ac109??createEmptyBffLock(),_0x12532c[_0x468e9a(0x13e)],_0x9742d6[_0x468e9a(0x14d)],'push'),_0x110d0d=await getTargetFunctions(_0x9742d6,_0x12532c);if(_0x110d0d[_0x468e9a(0x170)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x468e9a(0x159)};const _0x3bee4c=_0x12532c[_0x468e9a(0x131)]('force'),_0x4f33b0=JSON[_0x468e9a(0x129)](JSON[_0x468e9a(0x142)](_0x15cad6)),_0x7d52a7=_0x4f33b0['apps'][_0x12532c[_0x468e9a(0x13e)]];if(!_0x7d52a7)throw new Error(_0x468e9a(0x128)+_0x12532c[_0x468e9a(0x13e)]+_0x468e9a(0x14e));const _0x466ebf=await buildHookMaps(_0x12532c[_0x468e9a(0x13e)],_0x12532c[_0x468e9a(0x13c)],_0x110d0d,_0x7d52a7),_0x584fdf=[],_0x2a1912=[],_0x4c60a2=[];for(const _0x2abf35 of _0x110d0d){const _0x42f599=await computeFileHash(_0x2abf35[_0x468e9a(0x149)]),_0x51a85a=_0x7d52a7[_0x468e9a(0x16d)][_0x2abf35[_0x468e9a(0x16a)]];if(!_0x3bee4c&&_0x51a85a&&_0x51a85a[_0x468e9a(0x16b)]===_0x42f599){_0x2a1912['push']({'lockKey':_0x2abf35['lockKey'],'reason':_0x468e9a(0x15d)});continue;}try{await uploadSingleFunction(_0x12532c[_0x468e9a(0x13e)],_0x2abf35,_0x7d52a7,_0x466ebf);const _0x4435f2=_0x7d52a7['functions'][_0x2abf35[_0x468e9a(0x16a)]];_0x584fdf[_0x468e9a(0x144)]({'lockKey':_0x2abf35[_0x468e9a(0x16a)],'remoteId':_0x4435f2?.[_0x468e9a(0x16c)]??0x0});}catch(_0x3dd4c0){_0x4c60a2[_0x468e9a(0x144)]({'lockKey':_0x2abf35[_0x468e9a(0x16a)],'error':_0x3dd4c0 instanceof Error?_0x3dd4c0['message']:String(_0x3dd4c0)});}}_0x7d52a7[_0x468e9a(0x16f)]=new Date()[_0x468e9a(0x151)](),await writeBffLockFile(_0x9742d6[_0x468e9a(0x153)],_0x4f33b0),await waitForUploadedLockEntries(_0x9742d6[_0x468e9a(0x153)],_0x12532c[_0x468e9a(0x13e)],_0x584fdf[_0x468e9a(0x14b)](_0x5df7a7=>_0x5df7a7[_0x468e9a(0x16a)]));let _0x2c3c19={'attempted':![],'cleared':![]};if(_0x584fdf['length']>0x0)try{let _0x272158='';for(let _0x662692=0x0;_0x662692<CACHE_CLEAR_ATTEMPTS;_0x662692+=0x1){_0x272158=await clearBffScriptCache(),_0x662692<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x2c3c19={'attempted':!![],'cleared':!![],'message':_0x272158||_0x468e9a(0x171)};}catch(_0x5804da){_0x2c3c19={'attempted':!![],'cleared':![],'error':_0x5804da instanceof Error?_0x5804da['message']:String(_0x5804da)};}const _0x26e7aa=_0x4c60a2[_0x468e9a(0x170)]===0x0&&(_0x2c3c19[_0x468e9a(0x136)]?_0x2c3c19[_0x468e9a(0x15e)]:!![]),_0x14eedb=_0x2c3c19[_0x468e9a(0x136)]?_0x2c3c19[_0x468e9a(0x15e)]?_0x468e9a(0x13a):_0x468e9a(0x138):'runtime\x20cache\x20not\x20needed';return{'ok':_0x26e7aa,'data':{'uploaded':_0x584fdf,'skipped':_0x2a1912,'failed':_0x4c60a2,'cacheClear':_0x2c3c19},'message':_0x468e9a(0x141)+_0x584fdf[_0x468e9a(0x170)]+'\x20uploaded,\x20'+_0x2a1912[_0x468e9a(0x170)]+_0x468e9a(0x13d)+_0x4c60a2[_0x468e9a(0x170)]+'\x20failed,\x20'+_0x14eedb};}};async function getTargetFunctions(_0x218386,_0x28a83d){const _0x121b1f=a37_0x2a1e70,_0x3be5e3=_0x28a83d[_0x121b1f(0x137)]('type'),_0x140526=_0x28a83d[_0x121b1f(0x137)](_0x121b1f(0x15a)),_0x7fb7e=normalizeBffType(_0x3be5e3)??undefined;if(_0x140526&&!_0x7fb7e)throw CliErrors[_0x121b1f(0x154)](_0x121b1f(0x152));const _0x46f277=await scanLocalBffFunctions(_0x218386,_0x7fb7e);if(_0x140526){const _0x5d3bf3=_0x46f277['filter'](_0x4bd8d9=>_0x4bd8d9[_0x121b1f(0x15a)]===_0x140526);if(_0x5d3bf3[_0x121b1f(0x170)]===0x0)throw CliErrors['validation'](_0x121b1f(0x146)+_0x7fb7e+'/'+_0x140526);return _0x5d3bf3;}return _0x46f277;}function a37_0x4285(){const _0xf41619=['872199QoehuF','has','Run\x20`','Push\x20local\x20BFF\x20scripts\x20to\x20remote','functionNode','Would\x20inspect\x20','lockKey','hash','remoteId','functions','2105528RjMCaI','lastSync','length','Runtime\x20script\x20cache\x20cleared.','update','ENDPOINT','alias','code','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','description','datasetId','high-risk-write','Lock\x20scope\x20for\x20app\x20\x22','parse','HOOK','11116374RzicmC','aliasToDatasetCode','some','boolean','6882546jGMVlP','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','bool','datasetCode','force','apps','version','attempted','str','runtime\x20cache\x20clear\x20failed','operationType','runtime\x20cache\x20cleared','type','apiDir','\x20skipped,\x20','appCode','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','bff','Push\x20complete:\x20','stringify','get','push','status','Local\x20function\x20not\x20found:\x20','1804999wTHVOT','150901EFhTJY','filePath','join','map','50GrANyq','scriptsRoot','\x22\x20not\x20found\x20after\x20ensureLockScope.','3AAwFIS','string','toISOString','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','lockFilePath','validation','utf8',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','would_push','16uhJZYK','No\x20local\x20BFF\x20functions\x20found.','name','create','Cannot\x20resolve\x20dataset\x20for\x20\x22','unchanged','cleared','datasetCodeToDataset','Force\x20push\x20ignoring\x20hash\x20protection','every','357420fpITFx','12WhaLCT'];a37_0x4285=function(){return _0xf41619;};return a37_0x4285();}async function buildHookMaps(_0x47bcc9,_0x2194c9,_0x3652af,_0x41e3bf){const _0x3ba61e=a37_0x2a1e70,_0x12b93b=_0x3652af[_0x3ba61e(0x12d)](_0x9e6016=>_0x9e6016[_0x3ba61e(0x13b)]===_0x3ba61e(0x12a));if(!_0x12b93b)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x448f5a=loadAliasMap(_0x2194c9,undefined,resolveApiFilePath(_0x2194c9,_0x47bcc9)),_0x5f5b80=new Map(_0x448f5a['map'](_0x53546e=>[_0x53546e[_0x3ba61e(0x174)],_0x53546e[_0x3ba61e(0x132)]]));for(const _0x47605d of Object['values'](_0x41e3bf[_0x3ba61e(0x16d)])){_0x47605d[_0x3ba61e(0x174)]&&_0x47605d[_0x3ba61e(0x132)]&&!_0x5f5b80[_0x3ba61e(0x165)](_0x47605d[_0x3ba61e(0x174)])&&_0x5f5b80['set'](_0x47605d['alias'],_0x47605d[_0x3ba61e(0x132)]);}const _0x4c34a1=await listDatasets(_0x47bcc9),_0x2a46fb=new Map(_0x4c34a1[_0x3ba61e(0x14b)](_0xf13c8f=>[_0xf13c8f[_0x3ba61e(0x175)],_0xf13c8f]));return{'aliasToDatasetCode':_0x5f5b80,'datasetCodeToDataset':_0x2a46fb};}async function uploadSingleFunction(_0x29df0c,_0x570019,_0x14b732,_0x22d836){const _0x2ebaf5=a37_0x2a1e70,_0x287c58=await readFile(_0x570019[_0x2ebaf5(0x149)],_0x2ebaf5(0x155)),_0x3d6733=await computeFileHash(_0x570019[_0x2ebaf5(0x149)]),_0x3d2909=_0x14b732[_0x2ebaf5(0x16d)][_0x570019[_0x2ebaf5(0x16a)]];if(_0x3d2909?.[_0x2ebaf5(0x16c)]&&_0x3d2909[_0x2ebaf5(0x135)]==null)throw CliErrors[_0x2ebaf5(0x154)](_0x570019[_0x2ebaf5(0x16a)]+_0x2ebaf5(0x156));let _0x18b86a=extractScriptDescription(_0x287c58);if(!_0x18b86a&&_0x3d2909?.['remoteId']){const _0x18ccaa=await getBffScriptInfo(_0x3d2909['remoteId']);_0x18b86a=_0x18ccaa['description']||undefined;}const _0x2293de={'appCode':_0x29df0c,'functionName':_0x570019[_0x2ebaf5(0x15a)],'scriptType':_0x570019[_0x2ebaf5(0x13b)],'scriptContent':_0x287c58};if(_0x3d2909?.[_0x2ebaf5(0x16c)])_0x2293de['id']=_0x3d2909['remoteId'];if(_0x3d2909?.[_0x2ebaf5(0x135)]!=null)_0x2293de[_0x2ebaf5(0x135)]=_0x3d2909[_0x2ebaf5(0x135)];if(_0x18b86a)_0x2293de[_0x2ebaf5(0x177)]=_0x18b86a;if(_0x570019['type']===_0x2ebaf5(0x12a)){const _0x1122b=_0x570019['alias'];if(!_0x1122b||!_0x570019[_0x2ebaf5(0x139)]||!_0x570019[_0x2ebaf5(0x168)])throw CliErrors[_0x2ebaf5(0x154)]('Incomplete\x20HOOK\x20path:\x20'+_0x570019[_0x2ebaf5(0x16a)]);const _0x520aa7=_0x22d836[_0x2ebaf5(0x12c)][_0x2ebaf5(0x143)](_0x1122b)??_0x3d2909?.[_0x2ebaf5(0x132)]??_0x1122b,_0x3858f3=_0x22d836[_0x2ebaf5(0x15f)][_0x2ebaf5(0x143)](_0x520aa7);if(!_0x3858f3)throw CliErrors['validation'](_0x2ebaf5(0x15c)+_0x1122b+'\x22.\x20'+(_0x2ebaf5(0x166)+CLI_BIN_NAME+_0x2ebaf5(0x130)));_0x2293de[_0x2ebaf5(0x178)]=_0x3858f3['id'],_0x2293de['operationType']=_0x570019[_0x2ebaf5(0x139)],_0x2293de[_0x2ebaf5(0x168)]=_0x570019[_0x2ebaf5(0x168)];}const _0x443201=await saveBffScript(_0x2293de),_0x59cd84=_0x443201['id'],_0x5322e0=_0x443201['script']??await getBffScriptInfo(_0x59cd84),_0x2183d3={'hash':_0x3d6733,'remoteId':_0x59cd84,'version':_0x5322e0[_0x2ebaf5(0x135)]};if(_0x570019[_0x2ebaf5(0x13b)]===_0x2ebaf5(0x12a)){const _0x2a1f5e=_0x570019[_0x2ebaf5(0x174)],_0x513791=_0x22d836['aliasToDatasetCode']['get'](_0x2a1f5e)??_0x3d2909?.[_0x2ebaf5(0x132)]??_0x2a1f5e;_0x22d836[_0x2ebaf5(0x12c)][_0x2ebaf5(0x165)](_0x2a1f5e)?_0x2183d3[_0x2ebaf5(0x174)]=_0x2a1f5e:_0x2183d3[_0x2ebaf5(0x174)]=_0x3d2909?.[_0x2ebaf5(0x174)],_0x2183d3[_0x2ebaf5(0x132)]=_0x513791,_0x2183d3[_0x2ebaf5(0x139)]=_0x570019['operationType'],_0x2183d3[_0x2ebaf5(0x168)]=_0x570019[_0x2ebaf5(0x168)];}_0x14b732[_0x2ebaf5(0x16d)][_0x570019['lockKey']]=_0x2183d3;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x2dc3e4,_0x3de100,_0x356ffe){const _0x40dc73=a37_0x2a1e70;if(_0x356ffe['length']===0x0)return;for(let _0x5b7466=0x0;_0x5b7466<LOCK_SETTLE_RETRY_COUNT;_0x5b7466+=0x1){const _0x57fe9c=await readBffLockFile(_0x2dc3e4),_0x448f05=_0x57fe9c?.[_0x40dc73(0x134)]?.[_0x3de100]?.['functions']??{},_0x548127=_0x356ffe[_0x40dc73(0x161)](_0x1aa4e3=>!!_0x448f05[_0x1aa4e3]?.[_0x40dc73(0x16c)]);if(_0x548127)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x40dc73(0x13f)+_0x356ffe[_0x40dc73(0x14a)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a38_0x5cb7(_0x287ae8,_0x4794ab){_0x287ae8=_0x287ae8-0x189;const _0x1f280c=a38_0x1f28();let _0x5cb7f0=_0x1f280c[_0x287ae8];return _0x5cb7f0;}const a38_0x5a43ae=a38_0x5cb7;(function(_0x56be02,_0x3b706e){const _0xfa9800=a38_0x5cb7,_0x25af68=_0x56be02();while(!![]){try{const _0x1c8cef=-parseInt(_0xfa9800(0x197))/0x1+parseInt(_0xfa9800(0x18d))/0x2*(-parseInt(_0xfa9800(0x19c))/0x3)+-parseInt(_0xfa9800(0x19b))/0x4+parseInt(_0xfa9800(0x1ad))/0x5*(-parseInt(_0xfa9800(0x191))/0x6)+parseInt(_0xfa9800(0x19f))/0x7*(parseInt(_0xfa9800(0x195))/0x8)+-parseInt(_0xfa9800(0x18f))/0x9*(-parseInt(_0xfa9800(0x190))/0xa)+-parseInt(_0xfa9800(0x1a5))/0xb*(-parseInt(_0xfa9800(0x1a7))/0xc);if(_0x1c8cef===_0x3b706e)break;else _0x25af68['push'](_0x25af68['shift']());}catch(_0x18e59d){_0x25af68['push'](_0x25af68['shift']());}}}(a38_0x1f28,0x55543));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_0x1f28(){const _0x2d4f28=['10035UJdjRg','3440tIsLgv','4012674LPelGF','apiDir','\x20added,\x20','hash','29272YTIRiO','\x20modified,\x20','597227mEkLlh','map','all','appCode','2187404HiIZaL','1004727OFVyIJ','push','boolean','7amsQbU','read','bff','has','scriptsRoot','datasetCode','11LspCYz','functions','29339556lKmfjN','All\x20BFF\x20scripts\x20are\x20in\x20sync.','lockKey','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','length','lockFilePath','5wNtKKq','\x20unchanged','\x20remote-only','filePath','status','bool','4BGfyGn','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file'];a38_0x1f28=function(){return _0x2d4f28;};return a38_0x1f28();}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x5a43ae(0x1a1),'command':'status','description':a38_0x5a43ae(0x18e),'risk':a38_0x5a43ae(0x1a0),'flags':[{'name':'remote','type':a38_0x5a43ae(0x19e),'description':a38_0x5a43ae(0x1aa)}],async 'execute'(_0x5c2a2c){const _0x2868da=a38_0x5a43ae,_0x599dad=loadBffProjectConfig(_0x5c2a2c['appCode']),_0x506850=await readBffLockFile(_0x599dad[_0x2868da(0x1ac)]),{appLock:_0x99030c}=ensureLockScope(_0x506850??createEmptyBffLock(),_0x5c2a2c[_0x2868da(0x19a)],_0x599dad[_0x2868da(0x1a3)],_0x2868da(0x18b)),_0x5d614d=await scanLocalBffFunctions(_0x599dad),_0x1278b1=[],_0x22a10c=[],_0x1f7a79=[];for(const _0x3a211e of _0x5d614d){const _0x100594=await computeFileHash(_0x3a211e[_0x2868da(0x18a)]),_0x510c22=_0x99030c[_0x2868da(0x1a6)][_0x3a211e[_0x2868da(0x1a9)]];if(!_0x510c22)_0x1278b1[_0x2868da(0x19d)](_0x3a211e[_0x2868da(0x1a9)]);else _0x510c22[_0x2868da(0x194)]!==_0x100594?_0x22a10c[_0x2868da(0x19d)](_0x3a211e[_0x2868da(0x1a9)]):_0x1f7a79[_0x2868da(0x19d)](_0x3a211e['lockKey']);}const _0x6a956d=[];if(_0x5c2a2c[_0x2868da(0x18c)]('remote')){const _0x39bedb=loadAliasMap(_0x5c2a2c['apiDir'],undefined,resolveApiFilePath(_0x5c2a2c[_0x2868da(0x192)],_0x5c2a2c[_0x2868da(0x19a)])),_0x1f8801=new Map(_0x39bedb[_0x2868da(0x198)](_0x2e58c9=>[_0x2e58c9[_0x2868da(0x1a4)],_0x2e58c9['alias']])),[_0x2df156,_0x417d2d]=await Promise[_0x2868da(0x199)]([listBffScripts(_0x5c2a2c[_0x2868da(0x19a)]),getBffScriptStatistics(_0x5c2a2c[_0x2868da(0x19a)])]),_0x5f4995=createHookLocationMap(_0x417d2d),_0x5c77c2=new Set(_0x5d614d['map'](_0x2ef877=>_0x2ef877[_0x2868da(0x1a9)]));for(const _0x58e406 of _0x2df156){const _0x5f2e07=resolveRemoteScriptTarget(_0x599dad,_0x58e406,_0x5f4995,_0x99030c[_0x2868da(0x1a6)],_0x1f8801);_0x5f2e07&&!_0x5c77c2[_0x2868da(0x1a2)](_0x5f2e07[_0x2868da(0x1a9)])&&_0x6a956d[_0x2868da(0x19d)](_0x5f2e07[_0x2868da(0x1a9)]);}}const _0x2a3cf0=_0x1278b1[_0x2868da(0x1ab)]===0x0&&_0x22a10c[_0x2868da(0x1ab)]===0x0&&_0x6a956d[_0x2868da(0x1ab)]===0x0;return{'ok':!![],'data':{'added':_0x1278b1,'modified':_0x22a10c,'unchanged':_0x1f7a79,'remoteOnly':_0x6a956d},'message':_0x2a3cf0?_0x2868da(0x1a8):_0x1278b1[_0x2868da(0x1ab)]+_0x2868da(0x193)+_0x22a10c['length']+_0x2868da(0x196)+_0x1f7a79[_0x2868da(0x1ab)]+_0x2868da(0x1ae)+(_0x6a956d[_0x2868da(0x1ab)]>0x0?',\x20'+_0x6a956d[_0x2868da(0x1ab)]+_0x2868da(0x189):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a39_0x5dc2(){const _0xf02eae=['info','339712gHlCFZ','CLI\x20Built-in\x20Skill\x20installed','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','1174kyAEjC','nonInteractive','6727hKBqnd','9358830nnYzDO','../../skills/npx-skills-add.js','apiError',')...','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','cwd','cli-skill-install','5839944xAeDbi','cli-skill','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','install','setLogPath','42HJTHIB','2803esFwHB','write','3725145kqpivI','pipe','skipped','20anyWDC','log','6632SwujOR','3584410pZalVS','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20'];a39_0x5dc2=function(){return _0xf02eae;};return a39_0x5dc2();}const a39_0x414658=a39_0x424e;function a39_0x424e(_0x190e92,_0x28c652){_0x190e92=_0x190e92-0x123;const _0x5dc2eb=a39_0x5dc2();let _0x424e3b=_0x5dc2eb[_0x190e92];return _0x424e3b;}(function(_0x3cee1a,_0x95b38c){const _0x280072=a39_0x424e,_0x228924=_0x3cee1a();while(!![]){try{const _0x37f829=parseInt(_0x280072(0x12f))/0x1*(-parseInt(_0x280072(0x13d))/0x2)+parseInt(_0x280072(0x12e))/0x3*(parseInt(_0x280072(0x13a))/0x4)+-parseInt(_0x280072(0x137))/0x5+parseInt(_0x280072(0x140))/0x6+-parseInt(_0x280072(0x13f))/0x7*(parseInt(_0x280072(0x136))/0x8)+parseInt(_0x280072(0x131))/0x9*(parseInt(_0x280072(0x134))/0xa)+parseInt(_0x280072(0x129))/0xb;if(_0x37f829===_0x95b38c)break;else _0x228924['push'](_0x228924['shift']());}catch(_0x1bdde3){_0x228924['push'](_0x228924['shift']());}}}(a39_0x5dc2,0xe7977));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x414658(0x12a),'command':a39_0x414658(0x12c),'description':a39_0x414658(0x12b),'risk':a39_0x414658(0x130),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x16e30e){const _0x3be77e=a39_0x414658;logger[_0x3be77e(0x12d)](process['cwd']()),logger[_0x3be77e(0x139)](_0x3be77e(0x128),_0x3be77e(0x126));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x32ca24,RABETBASE_SKILL_SOURCE:_0x4b9d35,runNpxSkillsAddGlobal:_0x5ba4a1}=await import(_0x3be77e(0x141)),_0x18a770=_0x16e30e[_0x3be77e(0x13e)]?_0x3be77e(0x132):'inherit';console[_0x3be77e(0x135)](_0x3be77e(0x13c)+_0x32ca24+_0x3be77e(0x124));const _0x1d155b=_0x5ba4a1(process[_0x3be77e(0x127)](),_0x4b9d35,{'stdio':_0x18a770});if(_0x1d155b[_0x3be77e(0x133)])console[_0x3be77e(0x135)](_0x3be77e(0x125));else{if(_0x1d155b['ok'])console['log'](_0x3be77e(0x13b));else throw CliErrors[_0x3be77e(0x123)]('npx\x20skills\x20add\x20failed:\x20'+(_0x1d155b['error']||'unknown'),_0x3be77e(0x138)+_0x32ca24);}return{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a40_0x29440b=a40_0x3a9b;(function(_0x49e596,_0x4acd4b){const _0x41db13=a40_0x3a9b,_0x2abe83=_0x49e596();while(!![]){try{const _0x223cb0=-parseInt(_0x41db13(0x22f))/0x1*(-parseInt(_0x41db13(0x223))/0x2)+parseInt(_0x41db13(0x206))/0x3+-parseInt(_0x41db13(0x1e7))/0x4+parseInt(_0x41db13(0x209))/0x5+parseInt(_0x41db13(0x1fc))/0x6+parseInt(_0x41db13(0x219))/0x7*(-parseInt(_0x41db13(0x1e8))/0x8)+-parseInt(_0x41db13(0x21d))/0x9;if(_0x223cb0===_0x4acd4b)break;else _0x2abe83['push'](_0x2abe83['shift']());}catch(_0x363a25){_0x2abe83['push'](_0x2abe83['shift']());}}}(a40_0x3754,0xb55f3));import a40_0x3bed68 from'chalk';import a40_0x5cd4a2 from'ora';import a40_0x3713b4 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 _0x4336d9=a40_0x3a9b;return GIT_COMMIT!==_0x4336d9(0x1ee)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x4336d9(0x20b)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x3654a7=a40_0x3a9b,_0x30bb93=process[_0x3654a7(0x1f3)][_0x3654a7(0x216)]();if(_0x30bb93['includes'](_0x3654a7(0x21a)))return _0x3654a7(0x21a);return _0x3654a7(0x1e6);}const updateFlags=[{'name':a40_0x29440b(0x21c),'type':'boolean','description':a40_0x29440b(0x224),'default':![]},{'name':a40_0x29440b(0x1f6),'type':'string','description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':a40_0x29440b(0x226),'type':a40_0x29440b(0x217),'description':a40_0x29440b(0x214),'default':![]},{'name':a40_0x29440b(0x207),'type':a40_0x29440b(0x217),'description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x22e366){const _0x434568=a40_0x29440b;return _0x22e366[_0x434568(0x225)]('version')[_0x434568(0x228)]();}function shouldSkipCliSkill(_0x234da2){const _0x5f3430=a40_0x29440b;return _0x234da2[_0x5f3430(0x22d)](_0x5f3430(0x226))||_0x234da2[_0x5f3430(0x1ec)]('skills')===![];}async function validateUpdateFlags(_0x30b490){const _0x10f5a0=a40_0x29440b,_0x3db511=_0x30b490[_0x10f5a0(0x22d)]('beta'),_0x2d8652=getRequestedVersion(_0x30b490);if(_0x3db511&&_0x2d8652)throw CliErrors['validation']('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x10f5a0(0x1fd));if(_0x2d8652&&!a40_0x3713b4[_0x10f5a0(0x221)](_0x2d8652))throw CliErrors[_0x10f5a0(0x227)](_0x10f5a0(0x208)+_0x2d8652,_0x10f5a0(0x231));}async function fetchNpmDistTags(){const _0xc14cce=a40_0x29440b;try{const _0xe1c982=await fetch(_0xc14cce(0x20f)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0xc14cce(0x1ef)](0x2710)});if(!_0xe1c982['ok'])return null;const _0x272a0f=await _0xe1c982['json']();if(!_0x272a0f||typeof _0x272a0f!=='object')return null;return Object[_0xc14cce(0x222)](Object[_0xc14cce(0x202)](_0x272a0f)[_0xc14cce(0x204)](([,_0x2fd800])=>typeof _0x2fd800===_0xc14cce(0x20c)&&_0x2fd800['trim']()[_0xc14cce(0x1e3)]>0x0)[_0xc14cce(0x22e)](([_0x2fd122,_0x4ba7a0])=>[_0x2fd122,String(_0x4ba7a0)[_0xc14cce(0x228)]()]));}catch{return null;}}function a40_0x3754(){const _0x4b5514=['144vTTBnV','fail','...','Already\x20on\x20requested\x20version\x20(v','flag','message','unknown','timeout','warn','Current\x20version:\x20','update','execPath','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','succeed','version','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','start','\x20→\x20','run','5774376tafbue','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Updated\x20to\x20v','Version\x20comparison\x20failed','cwd','gray','entries','log','filter','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','2498184MhUkiZ','skills','Invalid\x20version:\x20','2734675xyLpWK','@latest','slice','string','latest','Updating\x20via\x20','https://registry.npmjs.org/-/package/','yellow','skipped','Beta\x20version:\x20','source','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','\x20install\x20-g\x20','toLowerCase','boolean','error','113806CxKxSC','bun','red','beta','15156675ZXjnrQ','Checking\x20CLI\x20Built-in\x20Skill...','green','\x20\x20Try\x20manually:\x20','valid','fromEntries','2100244QaXdLW','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','str','no-skills','validation','trim','Requested\x20version:\x20','info','inherit','\x20\x20Run\x20manually:\x20','bool','map','1oxrOvt','Checking\x20for\x20updates...','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','write','Update\x20available:\x20','nonInteractive','install','length','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','npm','2690252BasUSj'];a40_0x3754=function(){return _0x4b5514;};return a40_0x3754();}async function fetchNpmDistTagVersion(_0x3e37f9){const _0x38a7e8=await fetchNpmDistTags();return _0x38a7e8?.[_0x3e37f9]??null;}async function fetchLatestVersion(){const _0x4610f6=a40_0x29440b;return fetchNpmDistTagVersion(_0x4610f6(0x20d));}function a40_0x3a9b(_0x5a25db,_0x11ca28){_0x5a25db=_0x5a25db-0x1e0;const _0x375435=a40_0x3754();let _0x3a9b09=_0x375435[_0x5a25db];return _0x3a9b09;}async function resolveTargetVersion(_0x597ac1){const _0x159f01=a40_0x29440b,_0x2b9801=getRequestedVersion(_0x597ac1);if(_0x2b9801)return{'version':_0x2b9801,'source':_0x159f01(0x1f6)};if(_0x597ac1[_0x159f01(0x22d)](_0x159f01(0x21c))){const _0xe50ece=await fetchNpmDistTagVersion(_0x159f01(0x21c));if(!_0xe50ece)return null;return{'version':_0xe50ece,'source':_0x159f01(0x21c)};}const _0x18936e=await fetchLatestVersion();if(!_0x18936e)return null;return{'version':_0x18936e,'source':_0x159f01(0x20d)};}function shouldInstallTarget(_0x4e5b0c,_0x4af8d4){const _0xf2ea14=a40_0x29440b;if(_0x4af8d4[_0xf2ea14(0x213)]===_0xf2ea14(0x1f6)||_0x4af8d4[_0xf2ea14(0x213)]===_0xf2ea14(0x21c))return!a40_0x3713b4['eq'](_0x4e5b0c,_0x4af8d4[_0xf2ea14(0x1f6)]);return a40_0x3713b4['lt'](_0x4e5b0c,_0x4af8d4['version']);}function getInstallPlanLabel(_0x4dcffe,_0x55bf3a){const _0x10e850=a40_0x29440b;switch(_0x55bf3a[_0x10e850(0x213)]){case _0x10e850(0x21c):return _0x10e850(0x212)+a40_0x3bed68[_0x10e850(0x210)](_0x4dcffe)+'\x20→\x20'+a40_0x3bed68[_0x10e850(0x21f)](_0x55bf3a[_0x10e850(0x1f6)]);case _0x10e850(0x1f6):return _0x10e850(0x229)+a40_0x3bed68[_0x10e850(0x210)](_0x4dcffe)+_0x10e850(0x1fa)+a40_0x3bed68['green'](_0x55bf3a[_0x10e850(0x1f6)]);case _0x10e850(0x20d):default:return _0x10e850(0x1e0)+a40_0x3bed68[_0x10e850(0x210)](_0x4dcffe)+_0x10e850(0x1fa)+a40_0x3bed68[_0x10e850(0x21f)](_0x55bf3a[_0x10e850(0x1f6)]);}}async function installCliSkill(_0xf5f0b8){const _0x276c27=a40_0x29440b;console[_0x276c27(0x203)](a40_0x3bed68['gray'](_0x276c27(0x21e)));const _0x33cffb=runNpxSkillsAddGlobal(process[_0x276c27(0x200)](),RABETBASE_SKILL_SOURCE,{'stdio':_0xf5f0b8?'pipe':_0x276c27(0x22b)});if(_0x33cffb[_0x276c27(0x211)]){console[_0x276c27(0x203)](a40_0x3bed68['gray'](_0x276c27(0x205)));return;}if(_0x33cffb['ok']){console[_0x276c27(0x203)](a40_0x3bed68[_0x276c27(0x201)]('\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.'));return;}console[_0x276c27(0x1f0)](a40_0x3bed68[_0x276c27(0x210)]('\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20'+(_0x33cffb[_0x276c27(0x218)]||_0x276c27(0x1ee)))),console[_0x276c27(0x203)](a40_0x3bed68[_0x276c27(0x201)](_0x276c27(0x22c)+CLI_BIN_NAME+'\x20cli-skill\x20install'));}async function execute(_0x3d1f2b){const _0x2cc212=a40_0x29440b;await validateUpdateFlags(_0x3d1f2b);const _0xb5b778=getCurrentVersion();console[_0x2cc212(0x203)](_0x2cc212(0x1f1)+_0xb5b778);const _0x5d24df=a40_0x5cd4a2(_0x2cc212(0x230))[_0x2cc212(0x1f9)](),_0x7daa07=await resolveTargetVersion(_0x3d1f2b);if(!_0x7daa07){const _0x799a71=_0x3d1f2b['bool'](_0x2cc212(0x21c))?_0x2cc212(0x1f8):_0x2cc212(0x1e4);return _0x5d24df[_0x2cc212(0x1e9)](_0x799a71),console[_0x2cc212(0x203)](a40_0x3bed68[_0x2cc212(0x201)](_0x2cc212(0x1f4)+NPM_PACKAGE_NAME+_0x2cc212(0x20a))),{'ok':![],'message':_0x799a71};}const _0x204d37=a40_0x3713b4[_0x2cc212(0x221)](VERSION),_0x2b6bd1=a40_0x3713b4[_0x2cc212(0x221)](_0x7daa07['version']);if(!_0x204d37||!_0x2b6bd1)return _0x5d24df['fail']('Version\x20comparison\x20failed'),{'ok':![],'message':_0x2cc212(0x1ff)};if(!shouldInstallTarget(_0x204d37,_0x7daa07)){const _0x1c623e=_0x7daa07[_0x2cc212(0x213)]===_0x2cc212(0x1f6)?_0x2cc212(0x1eb)+_0x7daa07['version']+')':'Already\x20up\x20to\x20date\x20(v'+_0x7daa07[_0x2cc212(0x1f6)]+')';return _0x5d24df[_0x2cc212(0x1f5)](_0x1c623e),shouldSkipCliSkill(_0x3d1f2b)?console[_0x2cc212(0x203)](a40_0x3bed68[_0x2cc212(0x201)](_0x2cc212(0x1f7))):await installCliSkill(_0x3d1f2b[_0x2cc212(0x1e1)]),{'ok':!![]};}_0x5d24df[_0x2cc212(0x22a)](getInstallPlanLabel(_0xb5b778,_0x7daa07));const _0x3f6a6a=detectPackageManager(),_0x1b8d3d=_0x3f6a6a===_0x2cc212(0x1e6)?resolveNpmBin(_0x2cc212(0x1e6)):_0x3f6a6a,_0x40778e=a40_0x5cd4a2(_0x2cc212(0x20e)+_0x3f6a6a+_0x2cc212(0x1ea))[_0x2cc212(0x1f9)]();try{return await execa(_0x1b8d3d,[_0x2cc212(0x1e2),'-g',NPM_PACKAGE_NAME+'@'+_0x7daa07[_0x2cc212(0x1f6)]],{'stdio':'pipe'}),_0x40778e[_0x2cc212(0x1f5)](_0x2cc212(0x1fe)+_0x7daa07[_0x2cc212(0x1f6)]),console['log'](a40_0x3bed68[_0x2cc212(0x201)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipCliSkill(_0x3d1f2b)?console[_0x2cc212(0x203)](a40_0x3bed68[_0x2cc212(0x201)]('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).')):await installCliSkill(_0x3d1f2b[_0x2cc212(0x1e1)]),{'ok':!![]};}catch(_0x324bea){return _0x40778e['fail']('Update\x20failed'),console[_0x2cc212(0x218)](a40_0x3bed68[_0x2cc212(0x21b)]('\x20\x20'+_0x324bea['message'])),console[_0x2cc212(0x203)](a40_0x3bed68['gray'](_0x2cc212(0x220)+_0x3f6a6a+_0x2cc212(0x215)+NPM_PACKAGE_NAME+'@'+_0x7daa07[_0x2cc212(0x1f6)])),{'ok':![],'message':_0x324bea[_0x2cc212(0x1ed)]};}}export const updateDefinition={'service':a40_0x29440b(0x1f2),'command':a40_0x29440b(0x1fb),'description':a40_0x29440b(0x1e5),'risk':a40_0x29440b(0x232),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a40_0x11cb73=a40_0x3657;function a40_0x3657(_0x1d23ee,_0x54a01f){_0x1d23ee=_0x1d23ee-0x10f;const _0x5bd9b8=a40_0x5bd9();let _0x365778=_0x5bd9b8[_0x1d23ee];return _0x365778;}(function(_0x58bbd9,_0x189f0a){const _0x56f561=a40_0x3657,_0xb8bf9e=_0x58bbd9();while(!![]){try{const _0x5073c8=parseInt(_0x56f561(0x142))/0x1*(-parseInt(_0x56f561(0x14b))/0x2)+-parseInt(_0x56f561(0x151))/0x3*(-parseInt(_0x56f561(0x162))/0x4)+-parseInt(_0x56f561(0x147))/0x5*(parseInt(_0x56f561(0x155))/0x6)+parseInt(_0x56f561(0x148))/0x7+parseInt(_0x56f561(0x150))/0x8*(-parseInt(_0x56f561(0x129))/0x9)+parseInt(_0x56f561(0x144))/0xa*(parseInt(_0x56f561(0x118))/0xb)+parseInt(_0x56f561(0x14c))/0xc;if(_0x5073c8===_0x189f0a)break;else _0xb8bf9e['push'](_0xb8bf9e['shift']());}catch(_0x4bd462){_0xb8bf9e['push'](_0xb8bf9e['shift']());}}}(a40_0x5bd9,0x3ad73));import a40_0x296863 from'chalk';import a40_0x3846ca from'ora';import a40_0x31d99d 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 _0x293046=a40_0x3657;return GIT_COMMIT!==_0x293046(0x11e)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x3adf34=a40_0x3657,_0x5ad6c3=process[_0x3adf34(0x132)]['toLowerCase']();if(_0x5ad6c3[_0x3adf34(0x134)](_0x3adf34(0x113)))return _0x3adf34(0x113);return'npm';}const updateFlags=[{'name':'beta','type':'boolean','description':a40_0x11cb73(0x146),'default':![]},{'name':a40_0x11cb73(0x159),'type':'string','description':a40_0x11cb73(0x119)},{'name':'no-skills','type':a40_0x11cb73(0x13f),'description':a40_0x11cb73(0x13a),'default':![]},{'name':a40_0x11cb73(0x136),'type':a40_0x11cb73(0x13f),'description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x14ffbc){const _0x3e5f40=a40_0x11cb73;return _0x14ffbc[_0x3e5f40(0x112)](_0x3e5f40(0x159))['trim']();}function shouldSkipCliSkill(_0x4e55de){const _0x5b5c42=a40_0x11cb73;return _0x4e55de[_0x5b5c42(0x10f)](_0x5b5c42(0x158))||_0x4e55de[_0x5b5c42(0x115)]('skills')===![];}async function validateUpdateFlags(_0x3a5c02){const _0x1f7bcc=a40_0x11cb73,_0x2217db=_0x3a5c02[_0x1f7bcc(0x10f)](_0x1f7bcc(0x156)),_0x10dc31=getRequestedVersion(_0x3a5c02);if(_0x2217db&&_0x10dc31)throw CliErrors[_0x1f7bcc(0x116)](_0x1f7bcc(0x126),_0x1f7bcc(0x15e));if(_0x10dc31&&!a40_0x31d99d[_0x1f7bcc(0x122)](_0x10dc31))throw CliErrors['validation'](_0x1f7bcc(0x133)+_0x10dc31,_0x1f7bcc(0x153));}async function fetchNpmDistTags(){const _0x49e154=a40_0x11cb73;try{const _0x17b48a=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x49e154(0x12a),{'signal':AbortSignal[_0x49e154(0x13d)](0x2710)});if(!_0x17b48a['ok'])return null;const _0x5339b3=await _0x17b48a[_0x49e154(0x164)]();if(!_0x5339b3||typeof _0x5339b3!==_0x49e154(0x165))return null;return Object[_0x49e154(0x123)](Object['entries'](_0x5339b3)[_0x49e154(0x125)](([,_0x377eb0])=>typeof _0x377eb0==='string'&&_0x377eb0[_0x49e154(0x154)]()[_0x49e154(0x12f)]>0x0)[_0x49e154(0x13e)](([_0x3ae0d6,_0x3849b6])=>[_0x3ae0d6,String(_0x3849b6)[_0x49e154(0x154)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x9d7394){const _0x6867ad=await fetchNpmDistTags();return _0x6867ad?.[_0x9d7394]??null;}async function fetchLatestVersion(){const _0x354ad7=a40_0x11cb73;return fetchNpmDistTagVersion(_0x354ad7(0x11a));}async function resolveTargetVersion(_0x413ffa){const _0x439441=a40_0x11cb73,_0x176207=getRequestedVersion(_0x413ffa);if(_0x176207)return{'version':_0x176207,'source':_0x439441(0x159)};if(_0x413ffa[_0x439441(0x10f)](_0x439441(0x156))){const _0x436d7f=await fetchNpmDistTagVersion(_0x439441(0x156));if(!_0x436d7f)return null;return{'version':_0x436d7f,'source':_0x439441(0x156)};}const _0x3a4e93=await fetchLatestVersion();if(!_0x3a4e93)return null;return{'version':_0x3a4e93,'source':'latest'};}function shouldInstallTarget(_0x11ffcc,_0x3f8fd3){const _0xc17a38=a40_0x11cb73;if(_0x3f8fd3[_0xc17a38(0x12b)]===_0xc17a38(0x159)||_0x3f8fd3[_0xc17a38(0x12b)]==='beta')return!a40_0x31d99d['eq'](_0x11ffcc,_0x3f8fd3[_0xc17a38(0x159)]);return a40_0x31d99d['lt'](_0x11ffcc,_0x3f8fd3[_0xc17a38(0x159)]);}function getInstallPlanLabel(_0x15189d,_0x1a6b3c){const _0x49feee=a40_0x11cb73;switch(_0x1a6b3c[_0x49feee(0x12b)]){case'beta':return _0x49feee(0x127)+a40_0x296863[_0x49feee(0x117)](_0x15189d)+'\x20→\x20'+a40_0x296863[_0x49feee(0x14d)](_0x1a6b3c[_0x49feee(0x159)]);case _0x49feee(0x159):return _0x49feee(0x141)+a40_0x296863['yellow'](_0x15189d)+'\x20→\x20'+a40_0x296863[_0x49feee(0x14d)](_0x1a6b3c[_0x49feee(0x159)]);case'latest':default:return _0x49feee(0x12d)+a40_0x296863[_0x49feee(0x117)](_0x15189d)+_0x49feee(0x130)+a40_0x296863['green'](_0x1a6b3c['version']);}}async function installCliSkill(_0x17c682){const _0x530d8d=a40_0x11cb73;console['log'](a40_0x296863[_0x530d8d(0x14a)](_0x530d8d(0x15d)));const _0x5bda59=runNpxSkillsAddGlobal(process[_0x530d8d(0x121)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x17c682?'pipe':_0x530d8d(0x120)});if(_0x5bda59[_0x530d8d(0x137)]){console[_0x530d8d(0x139)](a40_0x296863[_0x530d8d(0x14a)](_0x530d8d(0x167)));return;}if(_0x5bda59['ok']){console[_0x530d8d(0x139)](a40_0x296863[_0x530d8d(0x14a)](_0x530d8d(0x11f)));return;}console['warn'](a40_0x296863['yellow'](_0x530d8d(0x14f)+(_0x5bda59[_0x530d8d(0x157)]||'unknown'))),console[_0x530d8d(0x139)](a40_0x296863[_0x530d8d(0x14a)](_0x530d8d(0x11d)+CLI_BIN_NAME+'\x20cli-skill\x20install'));}function a40_0x5bd9(){const _0x4aee52=['\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Requested\x20version:\x20','38783kVZWVw','Already\x20on\x20requested\x20version\x20(v','3940tVsJRv','nonInteractive','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','775845zlhufD','2274902rVZgya','\x20install\x20-g\x20','gray','18oHIzbN','7062756IgNpkO','green','write','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','8ClLZCQ','1734DCvCxF','Updating\x20via\x20','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','trim','6BDBnTN','beta','error','no-skills','version','pipe','succeed','Update\x20failed','Checking\x20CLI\x20Built-in\x20Skill...','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','...','Current\x20version:\x20','start','1504eXhSnu','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','json','object','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','bool','Checking\x20for\x20updates...','run','str','bun','update','flag','validation','yellow','737lvnpjh','Install\x20a\x20specific\x20CLI\x20version','latest','@latest','Version\x20comparison\x20failed','\x20\x20Run\x20manually:\x20','unknown','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','inherit','cwd','valid','fromEntries','message','filter','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Beta\x20version:\x20','Updated\x20to\x20v','3708432wkCatz','/dist-tags','source','red','Update\x20available:\x20','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','length','\x20→\x20','Already\x20up\x20to\x20date\x20(v','execPath','Invalid\x20version:\x20','includes','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','skills','skipped','npm','log','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','\x20\x20Try\x20manually:\x20','fail','timeout','map','boolean'];a40_0x5bd9=function(){return _0x4aee52;};return a40_0x5bd9();}async function execute(_0x4300ae){const _0x193427=a40_0x11cb73;await validateUpdateFlags(_0x4300ae);const _0x5e3658=getCurrentVersion();console['log'](_0x193427(0x160)+_0x5e3658);const _0x3b5a4b=a40_0x3846ca(_0x193427(0x110))[_0x193427(0x161)](),_0x303d4c=await resolveTargetVersion(_0x4300ae);if(!_0x303d4c){const _0x512d1e=_0x4300ae['bool']('beta')?_0x193427(0x166):_0x193427(0x135);return _0x3b5a4b[_0x193427(0x13c)](_0x512d1e),console['log'](a40_0x296863[_0x193427(0x14a)](_0x193427(0x140)+NPM_PACKAGE_NAME+_0x193427(0x11b))),{'ok':![],'message':_0x512d1e};}const _0x3928b2=a40_0x31d99d['valid'](VERSION),_0x3fdf62=a40_0x31d99d['valid'](_0x303d4c[_0x193427(0x159)]);if(!_0x3928b2||!_0x3fdf62)return _0x3b5a4b[_0x193427(0x13c)](_0x193427(0x11c)),{'ok':![],'message':_0x193427(0x11c)};if(!shouldInstallTarget(_0x3928b2,_0x303d4c)){const _0x488e9c=_0x303d4c[_0x193427(0x12b)]==='version'?_0x193427(0x143)+_0x303d4c['version']+')':_0x193427(0x131)+_0x303d4c[_0x193427(0x159)]+')';return _0x3b5a4b[_0x193427(0x15b)](_0x488e9c),shouldSkipCliSkill(_0x4300ae)?console[_0x193427(0x139)](a40_0x296863[_0x193427(0x14a)](_0x193427(0x12e))):await installCliSkill(_0x4300ae[_0x193427(0x145)]),{'ok':!![]};}_0x3b5a4b['info'](getInstallPlanLabel(_0x5e3658,_0x303d4c));const _0x55239c=detectPackageManager(),_0x11e054=_0x55239c===_0x193427(0x138)?resolveNpmBin(_0x193427(0x138)):_0x55239c,_0x983fa0=a40_0x3846ca(_0x193427(0x152)+_0x55239c+_0x193427(0x15f))[_0x193427(0x161)]();try{return await execa(_0x11e054,['install','-g',NPM_PACKAGE_NAME+'@'+_0x303d4c['version']],{'stdio':_0x193427(0x15a)}),_0x983fa0[_0x193427(0x15b)](_0x193427(0x128)+_0x303d4c[_0x193427(0x159)]),console[_0x193427(0x139)](a40_0x296863[_0x193427(0x14a)](_0x193427(0x163))),shouldSkipCliSkill(_0x4300ae)?console[_0x193427(0x139)](a40_0x296863[_0x193427(0x14a)](_0x193427(0x12e))):await installCliSkill(_0x4300ae[_0x193427(0x145)]),{'ok':!![]};}catch(_0x1b6660){return _0x983fa0[_0x193427(0x13c)](_0x193427(0x15c)),console['error'](a40_0x296863[_0x193427(0x12c)]('\x20\x20'+_0x1b6660[_0x193427(0x124)])),console['log'](a40_0x296863[_0x193427(0x14a)](_0x193427(0x13b)+_0x55239c+_0x193427(0x149)+NPM_PACKAGE_NAME+'@'+_0x303d4c[_0x193427(0x159)])),{'ok':![],'message':_0x1b6660[_0x193427(0x124)]};}}export const updateDefinition={'service':a40_0x11cb73(0x114),'command':a40_0x11cb73(0x111),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a40_0x11cb73(0x14e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x513e67,_0x5a413f){const _0x4bcb9f=a41_0x4343,_0x3d0f7d=_0x513e67();while(!![]){try{const _0x13be15=parseInt(_0x4bcb9f(0x13d))/0x1+-parseInt(_0x4bcb9f(0x13c))/0x2+parseInt(_0x4bcb9f(0x13e))/0x3+parseInt(_0x4bcb9f(0x13b))/0x4+parseInt(_0x4bcb9f(0x13f))/0x5+-parseInt(_0x4bcb9f(0x13a))/0x6*(-parseInt(_0x4bcb9f(0x138))/0x7)+-parseInt(_0x4bcb9f(0x139))/0x8;if(_0x13be15===_0x5a413f)break;else _0x3d0f7d['push'](_0x3d0f7d['shift']());}catch(_0x297fac){_0x3d0f7d['push'](_0x3d0f7d['shift']());}}}(a41_0x1279,0x7f5c8));import{codegenSdk}from'../../commands/codegen/sdk.js';function a41_0x4343(_0x57df5f,_0xecfc64){_0x57df5f=_0x57df5f-0x138;const _0x1279b4=a41_0x1279();let _0x4343df=_0x1279b4[_0x57df5f];return _0x4343df;}import{codegenSql}from'../../commands/codegen/sql.js';function a41_0x1279(){const _0x40b7af=['1606738BzoAGg','493842ezvLgC','1485330UMLzjD','280255PItIyk','1603ftjUlb','4040744LeFwGh','12006KhQJfm','1307608ZmbGzX'];a41_0x1279=function(){return _0x40b7af;};return a41_0x1279();}export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a42_0x402d(_0x504c76,_0x522e7f){_0x504c76=_0x504c76-0x70;const _0x2d10ef=a42_0x2d10();let _0x402d8c=_0x2d10ef[_0x504c76];return _0x402d8c;}const a42_0x1144cc=a42_0x402d;function a42_0x2d10(){const _0x2e283a=['Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','operation','46881hZvPaX','code','36BlMzCp','1247086MUUfYY','5514712xJEBNg','848jYsLMi','11676yQlUqT','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','str','boolean','tableName','alias','read','codegen','skip-imports','string','7352mNJHyM','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','690XrUsDd','14518gZjxjQ','Omit\x20import\x20statements\x20from\x20generated\x20code','42662213OERpnF','sdk','746915fcmYmr'];a42_0x2d10=function(){return _0x2e283a;};return a42_0x2d10();}(function(_0x3a953a,_0x5e604c){const _0x3cc7ec=a42_0x402d,_0x22a74d=_0x3a953a();while(!![]){try{const _0x1f5925=-parseInt(_0x3cc7ec(0x77))/0x1+-parseInt(_0x3cc7ec(0x79))/0x2*(parseInt(_0x3cc7ec(0x7a))/0x3)+-parseInt(_0x3cc7ec(0x78))/0x4+parseInt(_0x3cc7ec(0x71))/0x5*(-parseInt(_0x3cc7ec(0x76))/0x6)+parseInt(_0x3cc7ec(0x87))/0x7*(parseInt(_0x3cc7ec(0x84))/0x8)+-parseInt(_0x3cc7ec(0x74))/0x9*(-parseInt(_0x3cc7ec(0x86))/0xa)+parseInt(_0x3cc7ec(0x89))/0xb;if(_0x1f5925===_0x5e604c)break;else _0x22a74d['push'](_0x22a74d['shift']());}catch(_0x4fba45){_0x22a74d['push'](_0x22a74d['shift']());}}}(a42_0x2d10,0xed314));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0x1144cc(0x81),'command':a42_0x1144cc(0x70),'description':a42_0x1144cc(0x7b),'risk':a42_0x1144cc(0x80),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x1144cc(0x7f),'type':'string','description':a42_0x1144cc(0x85)},{'name':a42_0x1144cc(0x73),'type':a42_0x1144cc(0x83),'required':!![],'description':a42_0x1144cc(0x72)},{'name':'skip-imports','type':a42_0x1144cc(0x7d),'description':a42_0x1144cc(0x88)}],async 'execute'(_0x19e3de){const _0xd503da=a42_0x1144cc,{dataset:_0x2e8e95,operation:_0x101e2c}=await getOperationDetail(_0x19e3de['appCode'],_0x19e3de[_0xd503da(0x7c)]('code'),_0x19e3de['str']('operation')),_0x152b3b=generateSdkCode(_0x2e8e95,_0x101e2c,{'includeImports':!_0x19e3de['bool'](_0xd503da(0x82))});return{'ok':!![],'data':{'dataset':{'name':_0x2e8e95['name'],'code':_0x2e8e95[_0xd503da(0x75)],'tableName':_0x2e8e95[_0xd503da(0x7e)]},'operation':_0x19e3de['str']('operation'),'code':_0x152b3b}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a43_0x4c1a38=a43_0x2dc1;(function(_0x4855bf,_0x2a310c){const _0x4710a4=a43_0x2dc1,_0x110b5b=_0x4855bf();while(!![]){try{const _0x153ada=parseInt(_0x4710a4(0x118))/0x1+parseInt(_0x4710a4(0x121))/0x2*(parseInt(_0x4710a4(0x11f))/0x3)+parseInt(_0x4710a4(0x126))/0x4*(parseInt(_0x4710a4(0x125))/0x5)+-parseInt(_0x4710a4(0x12c))/0x6+parseInt(_0x4710a4(0x11a))/0x7+parseInt(_0x4710a4(0x119))/0x8+-parseInt(_0x4710a4(0x128))/0x9;if(_0x153ada===_0x2a310c)break;else _0x110b5b['push'](_0x110b5b['shift']());}catch(_0xb6c0fa){_0x110b5b['push'](_0x110b5b['shift']());}}}(a43_0x42bf,0xddc2a));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a43_0x42bf(){const _0xfcb626=['sql','str','sqlName','9723yFCnQF','bff','108fCDUEE','codegen','sqlCode','appCode','4490405hyFhHP','4XgOVXq','no-imports','23227560EKVJxn','sqlcode','read','Omit\x20import\x20statements\x20from\x20generated\x20code','5485938PSpCgv','bool','target','1745561BIemTn','6098448JMMlGE','5757717XbBstL','sdk'];a43_0x42bf=function(){return _0xfcb626;};return a43_0x42bf();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a43_0x2dc1(_0x154773,_0x108e37){_0x154773=_0x154773-0x116;const _0x42bf0e=a43_0x42bf();let _0x2dc143=_0x42bf0e[_0x154773];return _0x2dc143;}export const codegenSql={'service':a43_0x4c1a38(0x122),'command':a43_0x4c1a38(0x11c),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a43_0x4c1a38(0x12a),'flags':[SQLCODE_FLAG,{'name':'target','type':'string','description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a43_0x4c1a38(0x11b),'enum':[a43_0x4c1a38(0x11b),a43_0x4c1a38(0x120)]},{'name':a43_0x4c1a38(0x127),'type':'boolean','description':a43_0x4c1a38(0x12b)}],async 'execute'(_0x3dabf0){const _0xcc018=a43_0x4c1a38,_0x362f62=await getSqlQueryInfo(_0x3dabf0[_0xcc018(0x124)],_0x3dabf0[_0xcc018(0x11d)](_0xcc018(0x129))),_0x323143=_0x3dabf0[_0xcc018(0x11d)](_0xcc018(0x117))||'sdk',_0x567f6e=generateSqlCodeTemplate(_0x362f62,{'target':_0x323143,'includeImports':!_0x3dabf0[_0xcc018(0x116)](_0xcc018(0x127))});return{'ok':!![],'data':{'sqlCode':_0x362f62[_0xcc018(0x123)],'sqlName':_0x362f62[_0xcc018(0x11e)],'target':_0x323143,'code':_0x567f6e}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4ce2dc,_0x559ceb){const _0x30468d=a44_0x2282,_0x2925d9=_0x4ce2dc();while(!![]){try{const _0x5d5788=-parseInt(_0x30468d(0xeb))/0x1+-parseInt(_0x30468d(0xcd))/0x2+-parseInt(_0x30468d(0xed))/0x3*(-parseInt(_0x30468d(0xe0))/0x4)+parseInt(_0x30468d(0xee))/0x5+-parseInt(_0x30468d(0xe5))/0x6*(-parseInt(_0x30468d(0xd5))/0x7)+parseInt(_0x30468d(0xd1))/0x8*(parseInt(_0x30468d(0xd4))/0x9)+-parseInt(_0x30468d(0xd0))/0xa*(parseInt(_0x30468d(0xd8))/0xb);if(_0x5d5788===_0x559ceb)break;else _0x2925d9['push'](_0x2925d9['shift']());}catch(_0x4638e3){_0x2925d9['push'](_0x2925d9['shift']());}}}(a44_0x3468,0x85cbf));import{CliErrors}from'../../errors.js';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';function a44_0x2282(_0x166a2b,_0x234187){_0x166a2b=_0x166a2b-0xcb;const _0x346808=a44_0x3468();let _0x228299=_0x346808[_0x166a2b];return _0x228299;}export function buildAppAddFlags(){const _0xc4d227=a44_0x2282;return[{'name':_0xc4d227(0xec),'type':_0xc4d227(0xd2),'description':'App\x20code','required':!![]},{'name':_0xc4d227(0xd3),'type':_0xc4d227(0xe8),'description':_0xc4d227(0xef),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){return[{'name':'global','type':'boolean','description':'Use\x20global\x20config\x20scope','default':![]}];}export async function validateAppName(_0x2ab461,_0x59138e){const _0x5c0f50=a44_0x2282,_0x13c61c=_0x2ab461[_0x5c0f50(0xce)][0x0]?.['trim']();if(!_0x13c61c)throw CliErrors[_0x5c0f50(0xda)](_0x5c0f50(0xdb),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x59138e+_0x5c0f50(0xd9));}export async function runAppAdd(_0x38a846,_0x2f0004){const _0x968218=a44_0x2282,_0x14f908=_0x38a846[_0x968218(0xce)][0x0]?.[_0x968218(0xdd)]();if(!_0x14f908)throw CliErrors[_0x968218(0xda)]('Missing\x20app\x20name.',_0x968218(0xdc)+CLI_BIN_NAME+'\x20'+_0x2f0004+_0x968218(0xe1));const _0x5dd818=_0x38a846[_0x968218(0xe6)](_0x968218(0xec));if(!_0x5dd818)throw CliErrors[_0x968218(0xdf)](_0x968218(0xec),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x2f0004+_0x968218(0xe1));const _0x375577={'global':_0x38a846[_0x968218(0xe7)](_0x968218(0xd3))},_0x262069=readConfig(_0x375577);if(!_0x262069[_0x968218(0xd7)])_0x262069[_0x968218(0xd7)]={};const _0x219fcd={'appcode':_0x5dd818,...collectAppProfileOverrides(_0x5c2946=>_0x38a846[_0x968218(0xe6)](_0x5c2946))},_0x1ccfa5=_0x262069[_0x968218(0xd7)],_0xb9979a=!!_0x1ccfa5[_0x14f908];_0x1ccfa5[_0x14f908]=_0x219fcd;if(!_0x262069['defaultApp'])_0x262069[_0x968218(0xe3)]=_0x14f908;writeConfig(_0x262069,_0x375577);const _0x4cb356=!_0xb9979a&&_0x262069[_0x968218(0xe3)]===_0x14f908?'\x20Set\x20as\x20default\x20app.':'',_0x27b09a=(_0xb9979a?'Updated':'Added')+_0x968218(0xde)+_0x14f908+'\x22\x20(appcode:\x20'+_0x5dd818+')'+scopeLabel(_0x375577)+'.'+_0x4cb356;return{'ok':!![],'message':_0x27b09a};}function a44_0x3468(){const _0x422a47=['bool','boolean','\x20Note:\x20app\x20\x22','globalConfig','1055165qqvoao','appcode','246BIrwlR','5432170vuzYhm','Use\x20global\x20config\x20scope','keys','length','\x20<name>\x20[--global]','25926dSxmvk','args','project','294770zvUxVs','101616CNrMLp','string','global','189nIHjer','407722diVcID','App\x20\x22','apps','297FghsLZ','\x20<name>','validation','Missing\x20app\x20name.','Usage:\x20','trim','\x20app\x20\x22','flagMissing','43128DvOpIz','\x20<name>\x20--appcode\x20<code>','projectConfig','defaultApp','\x22\x20not\x20found.','18xUBdFp','str'];a44_0x3468=function(){return _0x422a47;};return a44_0x3468();}export async function runAppRemove(_0x1fdb67,_0x34c43a){const _0x1d98bd=a44_0x2282,_0xe2fa06=_0x1fdb67[_0x1d98bd(0xce)][0x0]?.['trim']();if(!_0xe2fa06)throw CliErrors[_0x1d98bd(0xda)](_0x1d98bd(0xdb),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x34c43a+_0x1d98bd(0xcc));const _0x4aca4e=_0x1fdb67[_0x1d98bd(0xe7)](_0x1d98bd(0xd3)),{config:_0x75d0d2,layers:_0x25862a}=readRawConfigWithLayers(),_0x54ce94=_0x75d0d2[_0x1d98bd(0xd7)]??{};if(!_0x54ce94[_0xe2fa06])throw CliErrors['validation'](_0x1d98bd(0xd6)+_0xe2fa06+'\x22\x20not\x20found.');const _0x5cac66=_0x25862a[_0x1d98bd(0xea)][_0x1d98bd(0xd7)]&&typeof _0x25862a['globalConfig'][_0x1d98bd(0xd7)]==='object'?_0x25862a['globalConfig']['apps']:{},_0x2331d2=_0x25862a[_0x1d98bd(0xe2)][_0x1d98bd(0xd7)]&&typeof _0x25862a['projectConfig']['apps']==='object'?_0x25862a[_0x1d98bd(0xe2)]['apps']:{},_0x22faec=appDefinedIn(_0xe2fa06,_0x5cac66,_0x2331d2,_0x25862a[_0x1d98bd(0xe2)]['inherit']===![]),_0x113f8b=resolveAppScopeForWrite(_0xe2fa06,_0x4aca4e,_0x25862a),_0x38735c={'global':_0x113f8b==='global'},_0xfbf923=readConfig(_0x38735c),_0x641a1=_0xfbf923[_0x1d98bd(0xd7)];if(!_0x641a1||!_0x641a1[_0xe2fa06])throw CliErrors['validation'](_0x1d98bd(0xd6)+_0xe2fa06+_0x1d98bd(0xe4));delete _0x641a1[_0xe2fa06];let _0x3d5a6a='';if(_0xfbf923['defaultApp']===_0xe2fa06){const _0x891b8e=Object[_0x1d98bd(0xf0)](_0x641a1);_0xfbf923['defaultApp']=_0x891b8e['length']>0x0?_0x891b8e[0x0]:undefined,_0xfbf923['defaultApp']?_0x3d5a6a='\x20Default\x20app\x20changed\x20to\x20\x22'+_0xfbf923[_0x1d98bd(0xe3)]+'\x22.':delete _0xfbf923[_0x1d98bd(0xe3)];}Object[_0x1d98bd(0xf0)](_0x641a1)[_0x1d98bd(0xcb)]===0x0&&(delete _0xfbf923[_0x1d98bd(0xd7)],delete _0xfbf923[_0x1d98bd(0xe3)]);writeConfig(_0xfbf923,_0x38735c);const _0x1c66c8=_0x22faec==='both'?_0x1d98bd(0xe9)+_0xe2fa06+'\x22\x20still\x20defined\x20in\x20'+(_0x113f8b===_0x1d98bd(0xcf)?_0x1d98bd(0xd3):_0x1d98bd(0xcf))+'\x20config.':'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0xe2fa06+'\x22'+scopeLabel(_0x38735c)+'.'+_0x3d5a6a+_0x1c66c8};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a45_0x25fc(_0x2b20f0,_0x28a5f7){_0x2b20f0=_0x2b20f0-0x183;const _0x113fa2=a45_0x113f();let _0x25fc07=_0x113fa2[_0x2b20f0];return _0x25fc07;}(function(_0x2d4256,_0xc7c774){const _0x3baaf4=a45_0x25fc,_0x14ce8f=_0x2d4256();while(!![]){try{const _0x29997d=parseInt(_0x3baaf4(0x184))/0x1+-parseInt(_0x3baaf4(0x198))/0x2*(parseInt(_0x3baaf4(0x186))/0x3)+-parseInt(_0x3baaf4(0x19d))/0x4*(-parseInt(_0x3baaf4(0x19b))/0x5)+-parseInt(_0x3baaf4(0x18b))/0x6*(-parseInt(_0x3baaf4(0x1a7))/0x7)+-parseInt(_0x3baaf4(0x18a))/0x8*(-parseInt(_0x3baaf4(0x18c))/0x9)+parseInt(_0x3baaf4(0x199))/0xa+parseInt(_0x3baaf4(0x188))/0xb*(-parseInt(_0x3baaf4(0x1a4))/0xc);if(_0x29997d===_0xc7c774)break;else _0x14ce8f['push'](_0x14ce8f['shift']());}catch(_0x3bb63f){_0x14ce8f['push'](_0x14ce8f['shift']());}}}(a45_0x113f,0x53fb0));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x90c460 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';function a45_0x113f(){const _0x3063b8=['获取到\x20','正在获取可用应用列表...','✎\x20手动输入','✎\x20自定义输入\x20appcode','\x0a无法获取远程应用列表,请手动输入。','map','includes','1187858DDoiiO','2407480yoZFUu','appName','2089390fBACtU','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','4gfZkqQ','gray','length','\x0a未找到可用应用。','yellow','manual','(跳过,稍后配置)','12DWejZr','请输入\x20App\x20Code:','custom','2227358qyXjeP','\x20\x20(','message','Invalid\x20App\x20Code','无法获取远程应用列表,请手动输入。','544741COGPMW','请选择要绑定的应用:','3DLwoxa','valid','8766868lcPVdA','appCode','341344TuBVfl','6KtxHer','45jokooC','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','skip','trim','find'];a45_0x113f=function(){return _0x3063b8;};return a45_0x113f();}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 _0x53adb3=a45_0x25fc,_0x20d644=await input({'message':_0x53adb3(0x1a5),'validate':_0x16daf7=>{const _0x27e326=_0x53adb3,_0x5afb24=validateAppcode(_0x16daf7[_0x27e326(0x18f)]());return _0x5afb24[_0x27e326(0x187)]||_0x5afb24[_0x27e326(0x1a9)]||_0x27e326(0x1aa);}});return _0x20d644[_0x53adb3(0x18f)]();}export async function promptAppSelection(_0x4bdfcd){const _0x1e2b92=a45_0x25fc,_0x1f45a4=[{'name':a45_0x90c460[_0x1e2b92(0x1a1)](_0x1e2b92(0x194)),'value':-0x1},..._0x4bdfcd[_0x1e2b92(0x196)]((_0x53d1f9,_0x5150d4)=>({'name':_0x53d1f9[_0x1e2b92(0x19a)]+'\x20\x20'+a45_0x90c460[_0x1e2b92(0x19e)]('('+_0x53d1f9[_0x1e2b92(0x189)]+')'),'value':_0x5150d4}))],_0x3a699d=await checkbox({'message':_0x1e2b92(0x191)+a45_0x90c460['cyan'](_0x4bdfcd[_0x1e2b92(0x19f)])+_0x1e2b92(0x18d),'choices':_0x1f45a4,'loop':![]});if(_0x3a699d[_0x1e2b92(0x197)](-0x1))return _0x1e2b92(0x1a6);if(_0x3a699d[_0x1e2b92(0x19f)]===0x0)return'custom';return _0x3a699d['map'](_0x1192c5=>_0x4bdfcd[_0x1192c5]);}export async function promptSingleAppSelection(_0x9b09e8){const _0x5b6e51=a45_0x25fc,_0x4023e1=[{'name':a45_0x90c460['gray']('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x5b6e51(0x18e)},{'name':a45_0x90c460['yellow'](_0x5b6e51(0x194)),'value':_0x5b6e51(0x1a6)},..._0x9b09e8[_0x5b6e51(0x196)](_0x1a94dc=>({'name':_0x1a94dc[_0x5b6e51(0x19a)]+'\x20\x20'+a45_0x90c460[_0x5b6e51(0x19e)]('('+_0x1a94dc['appCode']+')'),'value':_0x1a94dc[_0x5b6e51(0x189)]}))],_0x133d37=await select({'message':_0x5b6e51(0x185),'choices':_0x4023e1});if(_0x133d37===_0x5b6e51(0x18e))return'skip';if(_0x133d37===_0x5b6e51(0x1a6))return _0x5b6e51(0x1a6);return _0x9b09e8[_0x5b6e51(0x190)](_0x5ecdfa=>_0x5ecdfa[_0x5b6e51(0x189)]===_0x133d37);}export async function selectSingleAppcode(_0x94d82b){const _0x82abb0=a45_0x25fc;if(!_0x94d82b)return writeCliSideChannelLine(a45_0x90c460['gray'](_0x82abb0(0x19c))),_fallbackOrSkip();writeCliSideChannelLine(_0x82abb0(0x192));let _0x2f7968;try{_0x2f7968=await withActiveCookie(_0x94d82b,()=>listRemoteApps());}catch(_0xa3c7d){writeCliSideChannelLine(a45_0x90c460[_0x82abb0(0x1a1)](_0x82abb0(0x183)));if(_0xa3c7d instanceof Error)writeCliSideChannelLine(a45_0x90c460[_0x82abb0(0x19e)](_0x82abb0(0x1a8)+_0xa3c7d[_0x82abb0(0x1a9)]+')'));return _fallbackOrSkip();}if(_0x2f7968[_0x82abb0(0x19f)]===0x0)return writeCliSideChannelLine(a45_0x90c460['yellow']('未找到可用应用。')),_fallbackOrSkip();const _0x9c4608=await promptSingleAppSelection(_0x2f7968);if(_0x9c4608==='skip')return'';if(_0x9c4608===_0x82abb0(0x1a6))return promptCustomAppcode();return _0x9c4608[_0x82abb0(0x189)];}export async function selectMultipleApps(_0x34c7c1){const _0x5f01d8=a45_0x25fc;writeCliSideChannelLine(_0x5f01d8(0x192));let _0xade08;try{_0xade08=await withActiveCookie(_0x34c7c1,()=>listRemoteApps());}catch(_0x22bc47){writeCliSideChannelLine(_0x5f01d8(0x195));if(_0x22bc47 instanceof Error)writeCliSideChannelLine(_0x5f01d8(0x1a8)+_0x22bc47[_0x5f01d8(0x1a9)]+')');return _0x5f01d8(0x1a6);}if(_0xade08['length']===0x0)return writeCliSideChannelLine(_0x5f01d8(0x1a0)),_0x5f01d8(0x1a6);return promptAppSelection(_0xade08);}async function _fallbackOrSkip(){const _0x4dc2b1=a45_0x25fc,_0x303a4b=await select({'message':'App\x20Code:','choices':[{'name':a45_0x90c460[_0x4dc2b1(0x19e)](_0x4dc2b1(0x1a3)),'value':_0x4dc2b1(0x18e)},{'name':a45_0x90c460['yellow'](_0x4dc2b1(0x193)),'value':_0x4dc2b1(0x1a2)}]});if(_0x303a4b==='skip')return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1ca893,_0x3c0330){var _0xb593fb=a46_0x3a73,_0x2cec00=_0x1ca893();while(!![]){try{var _0x2c67a0=-parseInt(_0xb593fb(0x1dd))/0x1+-parseInt(_0xb593fb(0x1df))/0x2*(-parseInt(_0xb593fb(0x1d8))/0x3)+-parseInt(_0xb593fb(0x1e3))/0x4*(-parseInt(_0xb593fb(0x1d9))/0x5)+parseInt(_0xb593fb(0x1dc))/0x6+parseInt(_0xb593fb(0x1da))/0x7+parseInt(_0xb593fb(0x1e2))/0x8+parseInt(_0xb593fb(0x1e4))/0x9*(-parseInt(_0xb593fb(0x1e0))/0xa);if(_0x2c67a0===_0x3c0330)break;else _0x2cec00['push'](_0x2cec00['shift']());}catch(_0x4eaa52){_0x2cec00['push'](_0x2cec00['shift']());}}}(a46_0x25a7,0x92beb));export function asDryRunResult(_0x48860c,_0x301697){var _0x2f985f=a46_0x3a73;return Object[_0x2f985f(0x1e1)](_0x48860c,{'method':{'value':_0x301697[_0x2f985f(0x1de)],'enumerable':![]},'url':{'value':_0x301697['url'],'enumerable':![]},..._0x301697[_0x2f985f(0x1db)]?{'description':{'value':_0x301697[_0x2f985f(0x1db)],'enumerable':![]}}:{}});}function a46_0x3a73(_0x5dbb29,_0x42ae29){_0x5dbb29=_0x5dbb29-0x1d8;var _0x25a700=a46_0x25a7();var _0x3a7388=_0x25a700[_0x5dbb29];return _0x3a7388;}function a46_0x25a7(){var _0x52b6f8=['2401160VrtGqZ','defineProperties','3050056lGOYaR','8YHSdCI','45NDYJgN','21xNOKbO','986555VTiddP','3168466MBtcOu','description','6409554NvXehA','544318bAHOCR','method','14054lzSbVl'];a46_0x25a7=function(){return _0x52b6f8;};return a46_0x25a7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x451f60=a47_0x1968;(function(_0x1b922d,_0x5d0403){const _0x10e1c1=a47_0x1968,_0x29dc05=_0x1b922d();while(!![]){try{const _0x2fe638=-parseInt(_0x10e1c1(0x118))/0x1*(parseInt(_0x10e1c1(0x109))/0x2)+-parseInt(_0x10e1c1(0x100))/0x3*(parseInt(_0x10e1c1(0x114))/0x4)+-parseInt(_0x10e1c1(0xff))/0x5*(parseInt(_0x10e1c1(0x10b))/0x6)+-parseInt(_0x10e1c1(0x102))/0x7*(-parseInt(_0x10e1c1(0x113))/0x8)+parseInt(_0x10e1c1(0x104))/0x9+parseInt(_0x10e1c1(0x10d))/0xa+parseInt(_0x10e1c1(0x115))/0xb*(parseInt(_0x10e1c1(0x110))/0xc);if(_0x2fe638===_0x5d0403)break;else _0x29dc05['push'](_0x29dc05['shift']());}catch(_0x3b7a10){_0x29dc05['push'](_0x29dc05['shift']());}}}(a47_0x16bc,0x60b3e));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a47_0x451f60(0x10a)};export const CODE_FLAG={'name':a47_0x451f60(0x116),'type':a47_0x451f60(0x103),'required':!![],'description':a47_0x451f60(0x10f),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x451f60(0x117),'description':a47_0x451f60(0x10f)};export const SQLCODE_FLAG={'name':a47_0x451f60(0xfe),'type':a47_0x451f60(0x103),'required':!![],'description':a47_0x451f60(0x119),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a47_0x451f60(0x107)}};function a47_0x1968(_0xec702f,_0x58cfc8){_0xec702f=_0xec702f-0xfe;const _0x16bc32=a47_0x16bc();let _0x1968d0=_0x16bc32[_0xec702f];return _0x1968d0;}export const APPCODE_FLAG_OPTIONAL={'name':a47_0x451f60(0x10e),'type':a47_0x451f60(0x103),'required':![],'description':a47_0x451f60(0x108)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':'App\x20code\x20(e.g.\x20app-xxxxx)'};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x451f60(0x101),'required':!![],'description':a47_0x451f60(0x10c)};export const DB_TYPE_FLAG={'name':a47_0x451f60(0x105),'type':a47_0x451f60(0x103),'required':!![],'description':a47_0x451f60(0x111),'enum':[a47_0x451f60(0x106),a47_0x451f60(0x112)]};function a47_0x16bc(){const _0x122577=['Database\x20product\x20type','POSTGRESQL','4696368awUuXL','4BVQLaL','11uwpAwD','code','datasetcode','1093HqOyHv','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','sqlcode','10BQepaD','1006059iqmYhC','number','7CWRjoA','string','363663tUbURZ','dbtype','MYSQL','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','106eaMLIC','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','1039614XfhNzO','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','4871690IBvSIA','appcode','Dataset\x20code\x20(32-char\x20hex\x20UUID)','255504vlQVnv'];a47_0x16bc=function(){return _0x122577;};return a47_0x16bc();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5c7de7,_0x5b7eed){const _0xf22ae6=a48_0x51e9,_0x573417=_0x5c7de7();while(!![]){try{const _0x27b283=-parseInt(_0xf22ae6(0x1b4))/0x1*(parseInt(_0xf22ae6(0x1bd))/0x2)+-parseInt(_0xf22ae6(0x1be))/0x3+parseInt(_0xf22ae6(0x1b8))/0x4+-parseInt(_0xf22ae6(0x1b2))/0x5*(parseInt(_0xf22ae6(0x1bb))/0x6)+-parseInt(_0xf22ae6(0x1b6))/0x7+parseInt(_0xf22ae6(0x1b1))/0x8*(-parseInt(_0xf22ae6(0x1b3))/0x9)+parseInt(_0xf22ae6(0x1b5))/0xa;if(_0x27b283===_0x5b7eed)break;else _0x573417['push'](_0x573417['shift']());}catch(_0x20fbd1){_0x573417['push'](_0x573417['shift']());}}}(a48_0x2f16,0x61282));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a48_0x2f16(){const _0x23b011=['5AyHwbj','48456JHSGDN','2oMIkIA','17379640uLAgky','8617oYKHzg','validation','825480aPGOfA','File\x20not\x20found:\x20','\x20MB','2873202HqNECE','\x20path\x20is\x20required.','236194zJownT','955824dcZFfs','trim','toFixed','size','760wZEwzX'];a48_0x2f16=function(){return _0x23b011;};return a48_0x2f16();}const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a48_0x51e9(_0x193b96,_0x4d0b6b){_0x193b96=_0x193b96-0x1b1;const _0x2f16fd=a48_0x2f16();let _0x51e936=_0x2f16fd[_0x193b96];return _0x51e936;}function formatBytes(_0x2031e9){const _0x345651=a48_0x51e9;if(_0x2031e9>=BYTES_PER_MB){const _0x36bd86=Math['ceil'](_0x2031e9/BYTES_PER_MB*0x64)/0x64;return _0x36bd86[_0x345651(0x1c0)](0x2)+_0x345651(0x1ba);}return _0x2031e9+'\x20B';}export function requireDevelopmentUploadFile(_0x1bce9f,_0x2a3efd){const _0x2983a3=a48_0x51e9,_0x4abfac=_0x1bce9f[_0x2983a3(0x1bf)]();if(!_0x4abfac)throw CliErrors['validation'](_0x2a3efd+_0x2983a3(0x1bc));if(!existsSync(_0x4abfac))throw CliErrors[_0x2983a3(0x1b7)](_0x2983a3(0x1b9)+_0x4abfac);const _0x4818fd=statSync(_0x4abfac);if(!_0x4818fd['isFile']())throw CliErrors[_0x2983a3(0x1b7)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x4abfac);if(_0x4818fd[_0x2983a3(0x1c1)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x2983a3(0x1b7)]('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x4abfac+'\x20('+formatBytes(_0x4818fd[_0x2983a3(0x1c1)])+')');return{'path':_0x4abfac,'size':_0x4818fd[_0x2983a3(0x1c1)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4db59b,_0x4430d2){const _0x454e1b=a49_0x1e45,_0x2fe83e=_0x4db59b();while(!![]){try{const _0x127163=parseInt(_0x454e1b(0x1c2))/0x1+parseInt(_0x454e1b(0x1bd))/0x2+-parseInt(_0x454e1b(0x1bb))/0x3+parseInt(_0x454e1b(0x1bc))/0x4+parseInt(_0x454e1b(0x1ba))/0x5+-parseInt(_0x454e1b(0x1c0))/0x6+-parseInt(_0x454e1b(0x1b9))/0x7;if(_0x127163===_0x4430d2)break;else _0x2fe83e['push'](_0x2fe83e['shift']());}catch(_0x3389ec){_0x2fe83e['push'](_0x2fe83e['shift']());}}}(a49_0x10ce,0x20888));function a49_0x1e45(_0x14a26a,_0x48e47e){_0x14a26a=_0x14a26a-0x1b9;const _0x10cebd=a49_0x10ce();let _0x1e457f=_0x10cebd[_0x14a26a];return _0x1e457f;}function a49_0x10ce(){const _0x3f23ee=['624288GhiSox','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','54021IXZvUs','1279950YOavYk','927965NlTFAV','60993vgLANH','223124wSlyge','290180gwgiiS','App\x20Code\x20cannot\x20exceed\x20100\x20characters','trim'];a49_0x10ce=function(){return _0x3f23ee;};return a49_0x10ce();}export function validateAppcode(_0x37f3b7){const _0x53564b=a49_0x1e45,_0x59d7d8=_0x37f3b7[_0x53564b(0x1bf)]();if(!_0x59d7d8)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x59d7d8['length']>0x64)return{'valid':![],'message':_0x53564b(0x1be)};if(!/^[A-Za-z0-9_-]+$/['test'](_0x59d7d8))return{'valid':![],'message':_0x53564b(0x1c1)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a50_0x4b999b=a50_0x16dd;function a50_0x16dd(_0x3bc431,_0x386f7b){_0x3bc431=_0x3bc431-0x169;const _0x1fc388=a50_0x1fc3();let _0x16dd9a=_0x1fc388[_0x3bc431];return _0x16dd9a;}(function(_0x782044,_0xe21a5d){const _0x713fd9=a50_0x16dd,_0x4ffcd7=_0x782044();while(!![]){try{const _0x217e66=-parseInt(_0x713fd9(0x16d))/0x1*(-parseInt(_0x713fd9(0x175))/0x2)+parseInt(_0x713fd9(0x17d))/0x3+parseInt(_0x713fd9(0x174))/0x4+parseInt(_0x713fd9(0x17a))/0x5*(-parseInt(_0x713fd9(0x17b))/0x6)+parseInt(_0x713fd9(0x179))/0x7*(parseInt(_0x713fd9(0x170))/0x8)+parseInt(_0x713fd9(0x171))/0x9+-parseInt(_0x713fd9(0x172))/0xa*(parseInt(_0x713fd9(0x173))/0xb);if(_0x217e66===_0xe21a5d)break;else _0x4ffcd7['push'](_0x4ffcd7['shift']());}catch(_0x20d561){_0x4ffcd7['push'](_0x4ffcd7['shift']());}}}(a50_0x1fc3,0x18d40));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a50_0x1fc3(){const _0x167b57=['399156KwPOti','str','Get\x20a\x20config\x20value\x20by\x20key','\x20config\x20get\x20--key\x20<key>','string','appcode','read','258jlmHaS','validation','key','32520ACIewQ','687915RGDluG','41590AvxLOW','1331IJbjtl','767100JNZELJ','1298yMhLoQ','object','Missing\x20key.','config','133aAEyLx','670AewvRp','1836RKgvqH','Key\x20not\x20found:\x20'];a50_0x1fc3=function(){return _0x167b57;};return a50_0x1fc3();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x4e076f){const _0x115e21=a50_0x16dd,_0x4882e6=_0x4e076f[_0x115e21(0x17e)]('key');if(!_0x4882e6)throw CliErrors[_0x115e21(0x16e)](_0x115e21(0x177),'Usage:\x20'+CLI_BIN_NAME+_0x115e21(0x169));const _0x3625b2=readConfig(),_0x1a6654=_0x4882e6==='app'?_0x115e21(0x16b):_0x4882e6,_0x50c4ba=_0x3625b2[_0x1a6654];if(_0x50c4ba===undefined)throw CliErrors[_0x115e21(0x16e)](_0x115e21(0x17c)+_0x4882e6);return{'ok':!![],'data':typeof _0x50c4ba===_0x115e21(0x176)?_0x50c4ba:{[_0x1a6654]:_0x50c4ba},'message':typeof _0x50c4ba==='object'?undefined:String(_0x50c4ba)};}export const configGetDefinition={'service':a50_0x4b999b(0x178),'command':'get','description':a50_0x4b999b(0x17f),'risk':a50_0x4b999b(0x16c),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a50_0x4b999b(0x16f),'type':a50_0x4b999b(0x16a),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x22a052,_0x5e673b){const _0x3449d8=a51_0x3d02,_0x54cea7=_0x22a052();while(!![]){try{const _0x5f1386=-parseInt(_0x3449d8(0x162))/0x1+-parseInt(_0x3449d8(0x15e))/0x2+parseInt(_0x3449d8(0x163))/0x3+-parseInt(_0x3449d8(0x15c))/0x4+-parseInt(_0x3449d8(0x160))/0x5*(parseInt(_0x3449d8(0x15f))/0x6)+-parseInt(_0x3449d8(0x161))/0x7+parseInt(_0x3449d8(0x15d))/0x8;if(_0x5f1386===_0x5e673b)break;else _0x54cea7['push'](_0x54cea7['shift']());}catch(_0x21b006){_0x54cea7['push'](_0x54cea7['shift']());}}}(a51_0x10fd,0xd54e4));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a51_0x3d02(_0x521600,_0x41fb15){_0x521600=_0x521600-0x15c;const _0x10fdb8=a51_0x10fd();let _0x3d0205=_0x10fdb8[_0x521600];return _0x3d0205;}function a51_0x10fd(){const _0x17fd50=['3411976jabhGe','37447576vRYeuv','722416vbGand','168sOxBoe','123995QiNnuG','6601917ENYMea','1394736Jfwgsj','1317582sKPKxd'];a51_0x10fd=function(){return _0x17fd50;};return a51_0x10fd();}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a52_0x3929(_0xc8ac4a,_0x278789){_0xc8ac4a=_0xc8ac4a-0x1a3;const _0xcf3a2e=a52_0xcf3a();let _0x39291e=_0xcf3a2e[_0xc8ac4a];return _0x39291e;}const a52_0xdc8002=a52_0x3929;function a52_0xcf3a(){const _0xe7ca03=['list','3243681TUjkmy','2184928ikohXp','global','read','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','boolean','List\x20all\x20config\x20values','950784VzCkCo','3981546xuXpfb','bool','21QzsVnO','4038652VyOiOv','4494uTPSIo','15298XmVunO','5015KZQTXv','10GyxlhZ'];a52_0xcf3a=function(){return _0xe7ca03;};return a52_0xcf3a();}(function(_0x2113b2,_0x1a2945){const _0xf8fc2c=a52_0x3929,_0x543a35=_0x2113b2();while(!![]){try{const _0x575f76=parseInt(_0xf8fc2c(0x1ac))/0x1+parseInt(_0xf8fc2c(0x1b2))/0x2*(-parseInt(_0xf8fc2c(0x1af))/0x3)+parseInt(_0xf8fc2c(0x1b0))/0x4+parseInt(_0xf8fc2c(0x1b3))/0x5*(-parseInt(_0xf8fc2c(0x1b1))/0x6)+-parseInt(_0xf8fc2c(0x1a5))/0x7+parseInt(_0xf8fc2c(0x1a6))/0x8+parseInt(_0xf8fc2c(0x1ad))/0x9*(-parseInt(_0xf8fc2c(0x1a3))/0xa);if(_0x575f76===_0x1a2945)break;else _0x543a35['push'](_0x543a35['shift']());}catch(_0x53b8cd){_0x543a35['push'](_0x543a35['shift']());}}}(a52_0xcf3a,0x7faf4));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x19aa4d){const _0x5c3e58=a52_0x3929,_0x193d09=_0x19aa4d[_0x5c3e58(0x1ae)](_0x5c3e58(0x1a7))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x193d09};}export const configListDefinition={'service':'config','command':a52_0xdc8002(0x1a4),'description':a52_0xdc8002(0x1ab),'risk':a52_0xdc8002(0x1a8),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0xdc8002(0x1a7),'type':a52_0xdc8002(0x1aa),'description':a52_0xdc8002(0x1a9),'default':![]}],'execute':execute};
|