@lovrabet/rabetbase-cli 2.3.9-beta.1 → 2.3.9-beta.2
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_0x3737ae=a36_0x51dc;(function(_0x4b67e4,_0x29f27f){const _0x3c2071=a36_0x51dc,_0x3889d9=_0x4b67e4();while(!![]){try{const _0xcfe0da=-parseInt(_0x3c2071(0x96))/0x1+parseInt(_0x3c2071(0xb6))/0x2*(-parseInt(_0x3c2071(0x95))/0x3)+-parseInt(_0x3c2071(0x85))/0x4+-parseInt(_0x3c2071(0x8e))/0x5+-parseInt(_0x3c2071(0x92))/0x6*(-parseInt(_0x3c2071(0xbc))/0x7)+-parseInt(_0x3c2071(0xb0))/0x8*(-parseInt(_0x3c2071(0x8f))/0x9)+parseInt(_0x3c2071(0x91))/0xa;if(_0xcfe0da===_0x29f27f)break;else _0x3889d9['push'](_0x3889d9['shift']());}catch(_0x440820){_0x3889d9['push'](_0x3889d9['shift']());}}}(a36_0x2248,0x9e90e));function a36_0x51dc(_0x3443d5,_0x40fdcc){_0x3443d5=_0x3443d5-0x77;const _0x224844=a36_0x2248();let _0x51dcb8=_0x224844[_0x3443d5];return _0x51dcb8;}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';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x3737ae(0xb3),'command':a36_0x3737ae(0xa9),'description':a36_0x3737ae(0x9a),'risk':a36_0x3737ae(0xbe),'flags':[{'name':a36_0x3737ae(0xb9),'type':a36_0x3737ae(0x7e),'description':a36_0x3737ae(0xb7),'enum':[a36_0x3737ae(0x87),a36_0x3737ae(0xae),a36_0x3737ae(0xb8)]},{'name':'force','type':'boolean','description':a36_0x3737ae(0x8b)}],async 'dryRun'(_0x75217){const _0x459798=a36_0x3737ae,_0x5be681=loadBffProjectConfig(_0x75217[_0x459798(0xba)]),_0x22c6bf=await readBffLockFile(_0x5be681[_0x459798(0xb4)]),{appLock:_0x23cecb}=ensureLockScope(_0x22c6bf??createEmptyBffLock(),_0x75217[_0x459798(0xba)],_0x5be681[_0x459798(0xbb)],_0x459798(0xa9)),_0x558d40=normalizeBffType(_0x75217[_0x459798(0xa7)](_0x459798(0xb9)))??undefined,_0x1fa694=buildDatasetCodeToAliasMap(_0x75217['apiDir'],_0x75217[_0x459798(0xba)]),[_0x431069,_0xad3b0d]=await Promise[_0x459798(0xa3)]([listBffScripts(_0x75217[_0x459798(0xba)],_0x558d40),getBffScriptStatistics(_0x75217[_0x459798(0xba)])]),_0x489796=createHookLocationMap(_0xad3b0d),_0x220909=[];for(const _0x2ee864 of _0x431069){const _0x5a8098=resolveRemoteScriptTarget(_0x5be681,_0x2ee864,_0x489796,_0x23cecb['functions'],_0x1fa694);if(!_0x5a8098){_0x220909[_0x459798(0x83)]({'scriptType':_0x2ee864[_0x459798(0x9f)],'functionName':_0x2ee864['functionName']??'','status':'skipped','reason':_0x459798(0x97)});continue;}const _0x18ef98=_0x23cecb[_0x459798(0x9e)][_0x5a8098[_0x459798(0xb2)]],_0xbcde26=_0x2ee864[_0x459798(0x7f)]!=null?computeContentHash(_0x2ee864[_0x459798(0x7f)]):undefined,_0x20fcc1=await hasUnsyncedLocalChanges(_0x5a8098['filePath'],_0x18ef98,_0xbcde26);_0x220909[_0x459798(0x83)]({'lockKey':_0x5a8098[_0x459798(0xb2)],'filePath':_0x5a8098[_0x459798(0x82)],'remoteId':_0x2ee864['id']??null,'status':_0x20fcc1?_0x459798(0x9d):_0x459798(0x78)});}return{'method':'GET','url':_0x459798(0x79)+_0x75217[_0x459798(0xba)]+(_0x558d40?_0x459798(0x8a)+_0x558d40:''),'body':{'appCode':_0x75217[_0x459798(0xba)],'filterType':_0x558d40??null,'files':_0x220909},'description':_0x459798(0x8c)+_0x220909['length']+_0x459798(0x7b)};},async 'execute'(_0x10f666){const _0xe89a22=a36_0x3737ae,_0x442261=loadBffProjectConfig(_0x10f666['appCode']),_0xbcc85a=await readBffLockFile(_0x442261[_0xe89a22(0xb4)]),{lockData:_0x42b8d0,appLock:_0x3f3ff3}=ensureLockScope(_0xbcc85a??createEmptyBffLock(),_0x10f666['appCode'],_0x442261[_0xe89a22(0xbb)],_0xe89a22(0xa9)),_0x5ef32f=normalizeBffType(_0x10f666[_0xe89a22(0xa7)](_0xe89a22(0xb9)))??undefined;if(_0x10f666[_0xe89a22(0xa7)](_0xe89a22(0xb9))&&!_0x5ef32f)throw CliErrors[_0xe89a22(0xab)]('--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.');const [_0x3de38c,_0x4e1742]=await Promise['all']([listBffScripts(_0x10f666['appCode'],_0x5ef32f),getBffScriptStatistics(_0x10f666['appCode'])]);if(_0x3de38c['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20BFF\x20scripts\x20found.'};const _0x4fca09=_0x10f666['bool']('force');if(_0x4fca09&&!_0x10f666[_0xe89a22(0xa4)]){const _0x5790b5=await confirmForce();if(!_0x5790b5)throw CliErrors[_0xe89a22(0x93)](_0xe89a22(0x81));}if(_0x4fca09&&_0x10f666[_0xe89a22(0xa4)]){}const _0x20cba6=buildDatasetCodeToAliasMap(_0x10f666[_0xe89a22(0xbd)],_0x10f666[_0xe89a22(0xba)]),_0x259dcf=createHookLocationMap(_0x4e1742),_0xff659c=JSON['parse'](JSON[_0xe89a22(0x9c)](_0x42b8d0)),_0xdc46d7=_0x10f666[_0xe89a22(0xba)],_0x38eb55=_0xff659c[_0xe89a22(0x86)][_0xdc46d7];if(!_0x38eb55)throw new Error(_0xe89a22(0xa5)+_0xdc46d7+_0xe89a22(0x84));const _0x42764e=[],_0x448005=[],_0x18363f=[];for(const _0x306528 of _0x3de38c){const _0x2a9c47=resolveRemoteScriptTarget(_0x442261,_0x306528,_0x259dcf,_0x3f3ff3[_0xe89a22(0x9e)],_0x20cba6);if(!_0x2a9c47){_0x448005[_0xe89a22(0x83)]({'lockKey':_0x306528[_0xe89a22(0x9f)]+'/'+_0x306528[_0xe89a22(0xa2)],'reason':'unresolvable\x20target\x20path'});continue;}const _0x4c1ee7=_0x3f3ff3['functions'][_0x2a9c47[_0xe89a22(0xb2)]];try{if(!_0x306528['id'])throw new Error(_0xe89a22(0x80));if(_0x306528[_0xe89a22(0x7f)]==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x122ac4=_0x306528[_0xe89a22(0x7f)],_0xd4d349=computeContentHash(_0x122ac4);if(!_0x4fca09){const _0x2d320a=await hasUnsyncedLocalChanges(_0x2a9c47[_0xe89a22(0x82)],_0x4c1ee7,_0xd4d349);if(_0x2d320a){_0x448005[_0xe89a22(0x83)]({'lockKey':_0x2a9c47[_0xe89a22(0xb2)],'reason':_0xe89a22(0xaf)});continue;}}await ensureParentDirectory(_0x2a9c47[_0xe89a22(0x82)]),await writeFile(_0x2a9c47[_0xe89a22(0x82)],_0x122ac4,'utf8');const _0x391e77={'hash':_0xd4d349,'remoteId':_0x306528['id'],'version':_0x306528[_0xe89a22(0x7a)]};_0x2a9c47[_0xe89a22(0xb9)]===_0xe89a22(0xb8)&&_0x2a9c47[_0xe89a22(0x98)]&&(_0x391e77[_0xe89a22(0xa1)]=_0x2a9c47[_0xe89a22(0x98)][_0xe89a22(0xa1)],_0x391e77['datasetCode']=_0x2a9c47['hookLocation'][_0xe89a22(0xa8)],_0x391e77[_0xe89a22(0x77)]=_0x2a9c47[_0xe89a22(0x98)][_0xe89a22(0x77)],_0x391e77[_0xe89a22(0x7d)]=_0x2a9c47['hookLocation'][_0xe89a22(0x7d)]),_0x38eb55['functions'][_0x2a9c47[_0xe89a22(0xb2)]]=_0x391e77,_0x42764e['push']({'lockKey':_0x2a9c47[_0xe89a22(0xb2)],'remoteId':_0x306528['id']});}catch(_0x91e04e){_0x18363f[_0xe89a22(0x83)]({'lockKey':_0x2a9c47[_0xe89a22(0xb2)],'error':_0x91e04e instanceof Error?_0x91e04e[_0xe89a22(0x88)]:String(_0x91e04e)});}}return _0x38eb55[_0xe89a22(0xbf)]=new Date()[_0xe89a22(0x89)](),await writeBffLockFile(_0x442261[_0xe89a22(0xb4)],_0xff659c),{'ok':_0x18363f['length']===0x0,'data':{'pulled':_0x42764e,'skipped':_0x448005,'failed':_0x18363f},'message':_0xe89a22(0x7c)+_0x42764e[_0xe89a22(0xb1)]+_0xe89a22(0xaa)+_0x448005[_0xe89a22(0xb1)]+_0xe89a22(0xa0)+_0x18363f[_0xe89a22(0xb1)]+_0xe89a22(0x9b)};}};function a36_0x2248(){const _0x576478=['local\x20unsynced\x20changes','16Ynzirr','length','lockKey','bff','lockFilePath','stderr','14QOikPn','Pull\x20only\x20this\x20script\x20type','HOOK','type','appCode','scriptsRoot','30639jLLFby','apiDir','write','lastSync','operationType','would_pull','/api/management/library/scripts/list?appCode=','version','\x20remote\x20BFF\x20script(s)\x20for\x20pull','Pull\x20complete:\x20','functionNode','string','scriptContent','Remote\x20script\x20missing\x20id.','Force\x20pull\x20cancelled.','filePath','push','\x22\x20not\x20found\x20after\x20ensureLockScope.','1842824WbzzMV','apps','COMMON','message','toISOString','&type=','Force\x20overwrite\x20local\x20unsynced\x20changes','Would\x20inspect\x20','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','2137760roYjIc','833994lnBpid','map','18381260jkgrWJ','318xVXTtk','cancelled','close','65649PSkivJ','564514diNOVw','unresolvable\x20target\x20path','hookLocation','trim','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','\x20failed','stringify','conflict','functions','scriptType','\x20skipped,\x20','alias','functionName','all','nonInteractive','Lock\x20scope\x20for\x20app\x20\x22','yes','str','datasetCode','pull','\x20pulled,\x20','validation','question','toLowerCase','ENDPOINT'];a36_0x2248=function(){return _0x576478;};return a36_0x2248();}async function hasUnsyncedLocalChanges(_0x1a0e12,_0x3877b7,_0x340f99){if(!await fileExists(_0x1a0e12))return![];const _0x3b2a80=await computeFileHash(_0x1a0e12);if(!_0x3877b7)return _0x340f99?_0x3b2a80!==_0x340f99:!![];return _0x3b2a80!==_0x3877b7['hash'];}function buildDatasetCodeToAliasMap(_0x367852,_0x3f580d){const _0x565998=a36_0x3737ae,_0x21a7f4=loadAliasMap(_0x367852,undefined,resolveApiFilePath(_0x367852,_0x3f580d));return new Map(_0x21a7f4[_0x565998(0x90)](_0x2e3171=>[_0x2e3171[_0x565998(0xa8)],_0x2e3171['alias']]));}async function confirmForce(){const _0x586b35=a36_0x3737ae,_0x462983=createInterface({'input':process['stdin'],'output':process[_0x586b35(0xb5)]}),_0xfde636=await new Promise(_0x20c3ae=>{const _0x5dea1d=_0x586b35;_0x462983[_0x5dea1d(0xac)](_0x5dea1d(0x8d),_0x20c3ae);});return _0x462983[_0x586b35(0x94)](),['y',_0x586b35(0xa6)]['includes'](_0xfde636[_0x586b35(0x99)]()[_0x586b35(0xad)]());}
|
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a37_0x380763=a37_0x4a28;(function(_0x49807e,_0x1b0dbb){const _0x2cd230=a37_0x4a28,_0x1c5477=_0x49807e();while(!![]){try{const _0x5b3d3f=parseInt(_0x2cd230(0x8c))/0x1+-parseInt(_0x2cd230(0xa6))/0x2+-parseInt(_0x2cd230(0xb6))/0x3+-parseInt(_0x2cd230(0x7b))/0x4*(parseInt(_0x2cd230(0xa0))/0x5)+-parseInt(_0x2cd230(0xa8))/0x6*(-parseInt(_0x2cd230(0x92))/0x7)+parseInt(_0x2cd230(0x79))/0x8+parseInt(_0x2cd230(0x9a))/0x9;if(_0x5b3d3f===_0x1b0dbb)break;else _0x1c5477['push'](_0x1c5477['shift']());}catch(_0x58e41a){_0x1c5477['push'](_0x1c5477['shift']());}}}(a37_0x197e,0xf0e30));function a37_0x197e(){const _0x1671c3=['datasetCode','parse','has','type','str','Push\x20only\x20this\x20script\x20type','runtime\x20cache\x20clear\x20failed','Would\x20inspect\x20','5849883eIiLAx','every','/api/management/library/scripts/save','\x20uploaded,\x20','get','Incomplete\x20HOOK\x20path:\x20','toISOString','\x20skipped,\x20','string','description','hash','apiDir','script','operationType','datasetCodeToDataset','create','apps','some','name','7311544uolWfD','datasetId','1507276xofXak','values','cleared','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','push','\x22\x20not\x20found\x20after\x20ensureLockScope.','message','COMMON','status','Push\x20complete:\x20','attempted','scriptsRoot','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','join','remoteId','appCode','1580745ZzROsd','No\x20local\x20BFF\x20functions\x20found.','Push\x20local\x20BFF\x20scripts\x20to\x20remote','lockKey','alias','Force\x20push\x20ignoring\x20hash\x20protection','63HippYL','map','bool','aliasToDatasetCode','HOOK','filePath','boolean','code','22485888sotUla',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','runtime\x20cache\x20not\x20needed','length','runtime\x20cache\x20cleared','high-risk-write','15FgRZIq','lockFilePath','functions','Lock\x20scope\x20for\x20app\x20\x22','validation','bff','2727598CuJrww','functionNode','291846SiAnps','update','version','Local\x20function\x20not\x20found:\x20','would_push','ENDPOINT'];a37_0x197e=function(){return _0x1671c3;};return a37_0x197e();}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';function a37_0x4a28(_0x4963ee,_0x483836){_0x4963ee=_0x4963ee-0x6d;const _0x197e0=a37_0x197e();let _0x4a28ed=_0x197e0[_0x4963ee];return _0x4a28ed;}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_0x380763(0xa5),'command':a37_0x380763(0x7f),'description':a37_0x380763(0x8e),'risk':a37_0x380763(0x9f),'flags':[{'name':a37_0x380763(0xb1),'type':a37_0x380763(0x6e),'description':a37_0x380763(0xb3),'enum':[a37_0x380763(0x82),a37_0x380763(0xad),a37_0x380763(0x96)]},{'name':a37_0x380763(0x78),'type':'string','description':a37_0x380763(0x87)},{'name':'force','type':a37_0x380763(0x98),'description':a37_0x380763(0x91)}],async 'dryRun'(_0x140409){const _0x4ce3c2=a37_0x380763,_0x1a8fe4=loadBffProjectConfig(_0x140409['appCode']),_0x6deb24=await readBffLockFile(_0x1a8fe4[_0x4ce3c2(0xa1)]),{appLock:_0x11a207}=ensureLockScope(_0x6deb24??createEmptyBffLock(),_0x140409[_0x4ce3c2(0x8b)],_0x1a8fe4['scriptsRoot'],_0x4ce3c2(0x7f)),_0x8ad77d=await getTargetFunctions(_0x1a8fe4,_0x140409),_0x43b16d=_0x140409['bool']('force'),_0x3d27a9=[];for(const _0x3c8230 of _0x8ad77d){const _0x176d2d=await computeFileHash(_0x3c8230[_0x4ce3c2(0x97)]),_0x3f81bb=_0x11a207[_0x4ce3c2(0xa2)][_0x3c8230[_0x4ce3c2(0x8f)]],_0x20923c=!!_0x3f81bb&&_0x3f81bb['hash']===_0x176d2d;_0x3d27a9[_0x4ce3c2(0x7f)]({'lockKey':_0x3c8230['lockKey'],'filePath':_0x3c8230[_0x4ce3c2(0x97)],'remoteId':_0x3f81bb?.[_0x4ce3c2(0x8a)]??null,'mode':_0x3f81bb?.[_0x4ce3c2(0x8a)]?_0x4ce3c2(0xa9):_0x4ce3c2(0x75),'status':!_0x43b16d&&_0x20923c?'unchanged':_0x4ce3c2(0xac)});}return{'method':'POST','url':_0x4ce3c2(0xb8),'body':{'appCode':_0x140409[_0x4ce3c2(0x8b)],'force':_0x43b16d,'files':_0x3d27a9,'cacheClearAtRuntime':_0x3d27a9[_0x4ce3c2(0x77)](_0x13ce2f=>_0x13ce2f[_0x4ce3c2(0x83)]===_0x4ce3c2(0xac)),'cacheClearAtRuntimeTimes':_0x3d27a9[_0x4ce3c2(0x77)](_0xa8e6d6=>_0xa8e6d6[_0x4ce3c2(0x83)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x4ce3c2(0xb5)+_0x3d27a9[_0x4ce3c2(0x9d)]+_0x4ce3c2(0x88)};},async 'execute'(_0x4feb99){const _0xc19dad=a37_0x380763,_0x232b43=loadBffProjectConfig(_0x4feb99[_0xc19dad(0x8b)]),_0x4b0821=await readBffLockFile(_0x232b43['lockFilePath']),{lockData:_0x451903,appLock:_0x51c3e6}=ensureLockScope(_0x4b0821??createEmptyBffLock(),_0x4feb99[_0xc19dad(0x8b)],_0x232b43[_0xc19dad(0x86)],'push'),_0x43c903=await getTargetFunctions(_0x232b43,_0x4feb99);if(_0x43c903[_0xc19dad(0x9d)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0xc19dad(0x8d)};const _0x230d9b=_0x4feb99[_0xc19dad(0x94)]('force'),_0x75567=JSON[_0xc19dad(0xaf)](JSON['stringify'](_0x451903)),_0x3ec58b=_0x75567[_0xc19dad(0x76)][_0x4feb99[_0xc19dad(0x8b)]];if(!_0x3ec58b)throw new Error(_0xc19dad(0xa3)+_0x4feb99[_0xc19dad(0x8b)]+_0xc19dad(0x80));const _0x57db70=await buildHookMaps(_0x4feb99[_0xc19dad(0x8b)],_0x4feb99[_0xc19dad(0x71)],_0x43c903,_0x3ec58b),_0x47ea53=[],_0x45816b=[],_0x3351cb=[];for(const _0xb1e013 of _0x43c903){const _0x79c26d=await computeFileHash(_0xb1e013[_0xc19dad(0x97)]),_0x369a2c=_0x3ec58b[_0xc19dad(0xa2)][_0xb1e013[_0xc19dad(0x8f)]];if(!_0x230d9b&&_0x369a2c&&_0x369a2c[_0xc19dad(0x70)]===_0x79c26d){_0x45816b['push']({'lockKey':_0xb1e013[_0xc19dad(0x8f)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x4feb99[_0xc19dad(0x8b)],_0xb1e013,_0x3ec58b,_0x57db70);const _0x34fedb=_0x3ec58b[_0xc19dad(0xa2)][_0xb1e013[_0xc19dad(0x8f)]];_0x47ea53[_0xc19dad(0x7f)]({'lockKey':_0xb1e013[_0xc19dad(0x8f)],'remoteId':_0x34fedb?.[_0xc19dad(0x8a)]??0x0});}catch(_0x1c8c53){_0x3351cb[_0xc19dad(0x7f)]({'lockKey':_0xb1e013['lockKey'],'error':_0x1c8c53 instanceof Error?_0x1c8c53[_0xc19dad(0x81)]:String(_0x1c8c53)});}}_0x3ec58b['lastSync']=new Date()[_0xc19dad(0xbc)](),await writeBffLockFile(_0x232b43[_0xc19dad(0xa1)],_0x75567),await waitForUploadedLockEntries(_0x232b43['lockFilePath'],_0x4feb99[_0xc19dad(0x8b)],_0x47ea53['map'](_0x18df07=>_0x18df07[_0xc19dad(0x8f)]));let _0x3bf0cd={'attempted':![],'cleared':![]};if(_0x47ea53[_0xc19dad(0x9d)]>0x0)try{let _0x53f9fc='';for(let _0x324834=0x0;_0x324834<CACHE_CLEAR_ATTEMPTS;_0x324834+=0x1){_0x53f9fc=await clearBffScriptCache(),_0x324834<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x3bf0cd={'attempted':!![],'cleared':!![],'message':_0x53f9fc||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x296a07){_0x3bf0cd={'attempted':!![],'cleared':![],'error':_0x296a07 instanceof Error?_0x296a07[_0xc19dad(0x81)]:String(_0x296a07)};}const _0xeb0795=_0x3351cb[_0xc19dad(0x9d)]===0x0&&(_0x3bf0cd['attempted']?_0x3bf0cd[_0xc19dad(0x7d)]:!![]),_0x154844=_0x3bf0cd[_0xc19dad(0x85)]?_0x3bf0cd[_0xc19dad(0x7d)]?_0xc19dad(0x9e):_0xc19dad(0xb4):_0xc19dad(0x9c);return{'ok':_0xeb0795,'data':{'uploaded':_0x47ea53,'skipped':_0x45816b,'failed':_0x3351cb,'cacheClear':_0x3bf0cd},'message':_0xc19dad(0x84)+_0x47ea53[_0xc19dad(0x9d)]+_0xc19dad(0xb9)+_0x45816b[_0xc19dad(0x9d)]+_0xc19dad(0x6d)+_0x3351cb[_0xc19dad(0x9d)]+'\x20failed,\x20'+_0x154844};}};async function getTargetFunctions(_0x3244a7,_0xd7b1b5){const _0x41ed51=a37_0x380763,_0x30aa5f=_0xd7b1b5[_0x41ed51(0xb2)]('type'),_0x288652=_0xd7b1b5['str'](_0x41ed51(0x78)),_0x11ec74=normalizeBffType(_0x30aa5f)??undefined;if(_0x288652&&!_0x11ec74)throw CliErrors['validation']('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x1fb033=await scanLocalBffFunctions(_0x3244a7,_0x11ec74);if(_0x288652){const _0x187936=_0x1fb033['filter'](_0x3f22b9=>_0x3f22b9[_0x41ed51(0x78)]===_0x288652);if(_0x187936[_0x41ed51(0x9d)]===0x0)throw CliErrors[_0x41ed51(0xa4)](_0x41ed51(0xab)+_0x11ec74+'/'+_0x288652);return _0x187936;}return _0x1fb033;}async function buildHookMaps(_0x3d9ae5,_0x1d3f86,_0x28b9c5,_0x3bddaa){const _0x13b4dc=a37_0x380763,_0x225147=_0x28b9c5[_0x13b4dc(0x77)](_0x4d8bde=>_0x4d8bde[_0x13b4dc(0xb1)]==='HOOK');if(!_0x225147)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x5f543c=loadAliasMap(_0x1d3f86,undefined,resolveApiFilePath(_0x1d3f86,_0x3d9ae5)),_0x22bb67=new Map(_0x5f543c[_0x13b4dc(0x93)](_0x3aca70=>[_0x3aca70[_0x13b4dc(0x90)],_0x3aca70[_0x13b4dc(0xae)]]));for(const _0xaaace7 of Object[_0x13b4dc(0x7c)](_0x3bddaa[_0x13b4dc(0xa2)])){_0xaaace7['alias']&&_0xaaace7[_0x13b4dc(0xae)]&&!_0x22bb67[_0x13b4dc(0xb0)](_0xaaace7[_0x13b4dc(0x90)])&&_0x22bb67['set'](_0xaaace7[_0x13b4dc(0x90)],_0xaaace7['datasetCode']);}const _0x1e6f8a=await listDatasets(_0x3d9ae5),_0x283dc3=new Map(_0x1e6f8a['map'](_0x37dcb1=>[_0x37dcb1[_0x13b4dc(0x99)],_0x37dcb1]));return{'aliasToDatasetCode':_0x22bb67,'datasetCodeToDataset':_0x283dc3};}async function uploadSingleFunction(_0x1a2066,_0x3e6161,_0x1e9250,_0x3e87eb){const _0x294014=a37_0x380763,_0x2fdbdf=await readFile(_0x3e6161[_0x294014(0x97)],'utf8'),_0x249c01=await computeFileHash(_0x3e6161['filePath']),_0x2c6fdb=_0x1e9250[_0x294014(0xa2)][_0x3e6161[_0x294014(0x8f)]];if(_0x2c6fdb?.[_0x294014(0x8a)]&&_0x2c6fdb[_0x294014(0xaa)]==null)throw CliErrors[_0x294014(0xa4)](_0x3e6161[_0x294014(0x8f)]+_0x294014(0x9b));let _0x2264a6=extractScriptDescription(_0x2fdbdf);if(!_0x2264a6&&_0x2c6fdb?.[_0x294014(0x8a)]){const _0x402cd2=await getBffScriptInfo(_0x2c6fdb[_0x294014(0x8a)]);_0x2264a6=_0x402cd2[_0x294014(0x6f)]||undefined;}const _0x2b6f60={'appCode':_0x1a2066,'functionName':_0x3e6161['name'],'scriptType':_0x3e6161[_0x294014(0xb1)],'scriptContent':_0x2fdbdf};if(_0x2c6fdb?.[_0x294014(0x8a)])_0x2b6f60['id']=_0x2c6fdb[_0x294014(0x8a)];if(_0x2c6fdb?.[_0x294014(0xaa)]!=null)_0x2b6f60['version']=_0x2c6fdb[_0x294014(0xaa)];if(_0x2264a6)_0x2b6f60[_0x294014(0x6f)]=_0x2264a6;if(_0x3e6161['type']===_0x294014(0x96)){const _0x4e34aa=_0x3e6161[_0x294014(0x90)];if(!_0x4e34aa||!_0x3e6161[_0x294014(0x73)]||!_0x3e6161[_0x294014(0xa7)])throw CliErrors[_0x294014(0xa4)](_0x294014(0xbb)+_0x3e6161[_0x294014(0x8f)]);const _0x239e22=_0x3e87eb[_0x294014(0x95)][_0x294014(0xba)](_0x4e34aa)??_0x2c6fdb?.[_0x294014(0xae)]??_0x4e34aa,_0x2c5a27=_0x3e87eb[_0x294014(0x74)]['get'](_0x239e22);if(!_0x2c5a27)throw CliErrors['validation']('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x4e34aa+'\x22.\x20'+('Run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x2b6f60[_0x294014(0x7a)]=_0x2c5a27['id'],_0x2b6f60[_0x294014(0x73)]=_0x3e6161[_0x294014(0x73)],_0x2b6f60[_0x294014(0xa7)]=_0x3e6161[_0x294014(0xa7)];}const _0x5ea9ae=await saveBffScript(_0x2b6f60),_0x457857=_0x5ea9ae['id'],_0x353bb4=_0x5ea9ae[_0x294014(0x72)]??await getBffScriptInfo(_0x457857),_0x53eef6={'hash':_0x249c01,'remoteId':_0x457857,'version':_0x353bb4[_0x294014(0xaa)]};if(_0x3e6161['type']===_0x294014(0x96)){const _0x5af475=_0x3e6161[_0x294014(0x90)],_0x5334f9=_0x3e87eb[_0x294014(0x95)][_0x294014(0xba)](_0x5af475)??_0x2c6fdb?.[_0x294014(0xae)]??_0x5af475;_0x3e87eb[_0x294014(0x95)][_0x294014(0xb0)](_0x5af475)?_0x53eef6[_0x294014(0x90)]=_0x5af475:_0x53eef6['alias']=_0x2c6fdb?.[_0x294014(0x90)],_0x53eef6[_0x294014(0xae)]=_0x5334f9,_0x53eef6[_0x294014(0x73)]=_0x3e6161[_0x294014(0x73)],_0x53eef6['functionNode']=_0x3e6161[_0x294014(0xa7)];}_0x1e9250[_0x294014(0xa2)][_0x3e6161['lockKey']]=_0x53eef6;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0xf850eb,_0x742618,_0x39bcba){const _0x5846a9=a37_0x380763;if(_0x39bcba[_0x5846a9(0x9d)]===0x0)return;for(let _0x186ba8=0x0;_0x186ba8<LOCK_SETTLE_RETRY_COUNT;_0x186ba8+=0x1){const _0x166e0e=await readBffLockFile(_0xf850eb),_0x149269=_0x166e0e?.[_0x5846a9(0x76)]?.[_0x742618]?.[_0x5846a9(0xa2)]??{},_0x21a2de=_0x39bcba[_0x5846a9(0xb7)](_0x420021=>!!_0x149269[_0x420021]?.[_0x5846a9(0x8a)]);if(_0x21a2de)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x5846a9(0x7e)+_0x39bcba[_0x5846a9(0x89)](',\x20')+'.');}
|
|
1
|
+
const a37_0x45d673=a37_0xd34f;(function(_0x54e34e,_0x2a91af){const _0x33f753=a37_0xd34f,_0x3eec80=_0x54e34e();while(!![]){try{const _0x3bc192=-parseInt(_0x33f753(0xe2))/0x1+parseInt(_0x33f753(0xdb))/0x2+parseInt(_0x33f753(0xb3))/0x3*(parseInt(_0x33f753(0xc9))/0x4)+-parseInt(_0x33f753(0xc2))/0x5+-parseInt(_0x33f753(0xe1))/0x6+parseInt(_0x33f753(0xab))/0x7+parseInt(_0x33f753(0xaa))/0x8*(parseInt(_0x33f753(0xbd))/0x9);if(_0x3bc192===_0x2a91af)break;else _0x3eec80['push'](_0x3eec80['shift']());}catch(_0x17ca11){_0x3eec80['push'](_0x3eec80['shift']());}}}(a37_0xe541,0x65116));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a37_0xe541(){const _0x3781ec=['length','aliasToDatasetCode','datasetCode','attempted','description','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','COMMON','1035537SCuhVN','push','No\x20local\x20BFF\x20functions\x20found.','hash','Push\x20only\x20this\x20script\x20type','string','message','filter','toISOString','boolean','36ygFuTd','name','Run\x20`','\x20skipped,\x20','datasetId','2437980ejLlYn','runtime\x20cache\x20clear\x20failed','lockKey','functionNode','code','Push\x20local\x20BFF\x20scripts\x20to\x20remote','lockFilePath','4oKYHPU','\x20failed,\x20','apps','create','Push\x20complete:\x20','validation','map','some','get','alias','POST','Local\x20function\x20not\x20found:\x20','script','Cannot\x20resolve\x20dataset\x20for\x20\x22','runtime\x20cache\x20not\x20needed','has','stringify','\x22\x20not\x20found\x20after\x20ensureLockScope.','1021916klQfop','would_push','remoteId','force','Incomplete\x20HOOK\x20path:\x20','operationType','604146EvhrrM','147466IriTAD','bool','cleared','lastSync','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','filePath','appCode','type','version','status','utf8','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','scriptsRoot','Force\x20push\x20ignoring\x20hash\x20protection','bff','datasetCodeToDataset','str','set','functions','unchanged','HOOK','values','155840OrGyli','1509690DWjgiO'];a37_0xe541=function(){return _0x3781ec;};return a37_0xe541();}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';function a37_0xd34f(_0x29bd3a,_0xd4a983){_0x29bd3a=_0x29bd3a-0xaa;const _0xe5418f=a37_0xe541();let _0xd34f42=_0xe5418f[_0x29bd3a];return _0xd34f42;}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_0x45d673(0xf1),'command':'push','description':a37_0x45d673(0xc7),'risk':'high-risk-write','flags':[{'name':a37_0x45d673(0xe9),'type':a37_0x45d673(0xb8),'description':a37_0x45d673(0xb7),'enum':[a37_0x45d673(0xb2),'ENDPOINT',a37_0x45d673(0xf7)]},{'name':a37_0x45d673(0xbe),'type':a37_0x45d673(0xb8),'description':a37_0x45d673(0xed)},{'name':'force','type':a37_0x45d673(0xbc),'description':a37_0x45d673(0xf0)}],async 'dryRun'(_0x5e982a){const _0xfc2b42=a37_0x45d673,_0x3d5d70=loadBffProjectConfig(_0x5e982a['appCode']),_0x49db4e=await readBffLockFile(_0x3d5d70[_0xfc2b42(0xc8)]),{appLock:_0x2483af}=ensureLockScope(_0x49db4e??createEmptyBffLock(),_0x5e982a[_0xfc2b42(0xe8)],_0x3d5d70[_0xfc2b42(0xef)],_0xfc2b42(0xb4)),_0x2aca36=await getTargetFunctions(_0x3d5d70,_0x5e982a),_0x17b75e=_0x5e982a[_0xfc2b42(0xe3)](_0xfc2b42(0xde)),_0x8b522b=[];for(const _0x93830d of _0x2aca36){const _0xda414e=await computeFileHash(_0x93830d[_0xfc2b42(0xe7)]),_0x35acc5=_0x2483af[_0xfc2b42(0xf5)][_0x93830d[_0xfc2b42(0xc4)]],_0x10bd6d=!!_0x35acc5&&_0x35acc5[_0xfc2b42(0xb6)]===_0xda414e;_0x8b522b['push']({'lockKey':_0x93830d[_0xfc2b42(0xc4)],'filePath':_0x93830d[_0xfc2b42(0xe7)],'remoteId':_0x35acc5?.['remoteId']??null,'mode':_0x35acc5?.[_0xfc2b42(0xdd)]?'update':_0xfc2b42(0xcc),'status':!_0x17b75e&&_0x10bd6d?'unchanged':_0xfc2b42(0xdc)});}return{'method':_0xfc2b42(0xd3),'url':'/api/management/library/scripts/save','body':{'appCode':_0x5e982a['appCode'],'force':_0x17b75e,'files':_0x8b522b,'cacheClearAtRuntime':_0x8b522b[_0xfc2b42(0xd0)](_0x37c95a=>_0x37c95a[_0xfc2b42(0xeb)]===_0xfc2b42(0xdc)),'cacheClearAtRuntimeTimes':_0x8b522b['some'](_0x5a4139=>_0x5a4139[_0xfc2b42(0xeb)]===_0xfc2b42(0xdc))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x8b522b['length']+_0xfc2b42(0xee)};},async 'execute'(_0x35ff4a){const _0x4a8fcb=a37_0x45d673,_0x24542c=loadBffProjectConfig(_0x35ff4a[_0x4a8fcb(0xe8)]),_0x3e0ce6=await readBffLockFile(_0x24542c['lockFilePath']),{lockData:_0x33dc29,appLock:_0x213e09}=ensureLockScope(_0x3e0ce6??createEmptyBffLock(),_0x35ff4a[_0x4a8fcb(0xe8)],_0x24542c[_0x4a8fcb(0xef)],_0x4a8fcb(0xb4)),_0x4534a9=await getTargetFunctions(_0x24542c,_0x35ff4a);if(_0x4534a9[_0x4a8fcb(0xac)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x4a8fcb(0xb5)};const _0x2e1f68=_0x35ff4a[_0x4a8fcb(0xe3)](_0x4a8fcb(0xde)),_0x4764e5=JSON['parse'](JSON[_0x4a8fcb(0xd9)](_0x33dc29)),_0x59e0ad=_0x4764e5[_0x4a8fcb(0xcb)][_0x35ff4a[_0x4a8fcb(0xe8)]];if(!_0x59e0ad)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x35ff4a[_0x4a8fcb(0xe8)]+_0x4a8fcb(0xda));const _0x361501=await buildHookMaps(_0x35ff4a[_0x4a8fcb(0xe8)],_0x35ff4a['apiDir'],_0x4534a9,_0x59e0ad),_0x1e37fd=[],_0x22f09f=[],_0x59b95e=[];for(const _0x16f8d8 of _0x4534a9){const _0x148a4c=await computeFileHash(_0x16f8d8[_0x4a8fcb(0xe7)]),_0x48ed44=_0x59e0ad[_0x4a8fcb(0xf5)][_0x16f8d8[_0x4a8fcb(0xc4)]];if(!_0x2e1f68&&_0x48ed44&&_0x48ed44['hash']===_0x148a4c){_0x22f09f['push']({'lockKey':_0x16f8d8[_0x4a8fcb(0xc4)],'reason':_0x4a8fcb(0xf6)});continue;}try{await uploadSingleFunction(_0x35ff4a[_0x4a8fcb(0xe8)],_0x16f8d8,_0x59e0ad,_0x361501);const _0x5bb235=_0x59e0ad[_0x4a8fcb(0xf5)][_0x16f8d8[_0x4a8fcb(0xc4)]];_0x1e37fd[_0x4a8fcb(0xb4)]({'lockKey':_0x16f8d8['lockKey'],'remoteId':_0x5bb235?.['remoteId']??0x0});}catch(_0x3f9c00){_0x59b95e[_0x4a8fcb(0xb4)]({'lockKey':_0x16f8d8['lockKey'],'error':_0x3f9c00 instanceof Error?_0x3f9c00[_0x4a8fcb(0xb9)]:String(_0x3f9c00)});}}_0x59e0ad[_0x4a8fcb(0xe5)]=new Date()[_0x4a8fcb(0xbb)](),await writeBffLockFile(_0x24542c[_0x4a8fcb(0xc8)],_0x4764e5),await waitForUploadedLockEntries(_0x24542c[_0x4a8fcb(0xc8)],_0x35ff4a[_0x4a8fcb(0xe8)],_0x1e37fd[_0x4a8fcb(0xcf)](_0x323c8a=>_0x323c8a['lockKey']));let _0x314768={'attempted':![],'cleared':![]};if(_0x1e37fd[_0x4a8fcb(0xac)]>0x0)try{let _0x282b9c='';for(let _0x3f239b=0x0;_0x3f239b<CACHE_CLEAR_ATTEMPTS;_0x3f239b+=0x1){_0x282b9c=await clearBffScriptCache(),_0x3f239b<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x314768={'attempted':!![],'cleared':!![],'message':_0x282b9c||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x4cfca5){_0x314768={'attempted':!![],'cleared':![],'error':_0x4cfca5 instanceof Error?_0x4cfca5['message']:String(_0x4cfca5)};}const _0x93d4cc=_0x59b95e[_0x4a8fcb(0xac)]===0x0&&(_0x314768[_0x4a8fcb(0xaf)]?_0x314768[_0x4a8fcb(0xe4)]:!![]),_0x560933=_0x314768[_0x4a8fcb(0xaf)]?_0x314768[_0x4a8fcb(0xe4)]?'runtime\x20cache\x20cleared':_0x4a8fcb(0xc3):_0x4a8fcb(0xd7);return{'ok':_0x93d4cc,'data':{'uploaded':_0x1e37fd,'skipped':_0x22f09f,'failed':_0x59b95e,'cacheClear':_0x314768},'message':_0x4a8fcb(0xcd)+_0x1e37fd[_0x4a8fcb(0xac)]+'\x20uploaded,\x20'+_0x22f09f['length']+_0x4a8fcb(0xc0)+_0x59b95e['length']+_0x4a8fcb(0xca)+_0x560933};}};async function getTargetFunctions(_0x45a592,_0x501fe7){const _0x20e264=a37_0x45d673,_0xceb716=_0x501fe7[_0x20e264(0xf3)]('type'),_0x4663cb=_0x501fe7[_0x20e264(0xf3)]('name'),_0x10de4a=normalizeBffType(_0xceb716)??undefined;if(_0x4663cb&&!_0x10de4a)throw CliErrors[_0x20e264(0xce)](_0x20e264(0xe6));const _0x4aa47f=await scanLocalBffFunctions(_0x45a592,_0x10de4a);if(_0x4663cb){const _0x37fc27=_0x4aa47f[_0x20e264(0xba)](_0x41baf5=>_0x41baf5['name']===_0x4663cb);if(_0x37fc27[_0x20e264(0xac)]===0x0)throw CliErrors[_0x20e264(0xce)](_0x20e264(0xd4)+_0x10de4a+'/'+_0x4663cb);return _0x37fc27;}return _0x4aa47f;}async function buildHookMaps(_0x17522b,_0x33d86f,_0x219955,_0x5993fe){const _0x8205ff=a37_0x45d673,_0x24d64a=_0x219955['some'](_0x467f69=>_0x467f69[_0x8205ff(0xe9)]===_0x8205ff(0xf7));if(!_0x24d64a)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x21a5b4=loadAliasMap(_0x33d86f,undefined,resolveApiFilePath(_0x33d86f,_0x17522b)),_0x56e32a=new Map(_0x21a5b4[_0x8205ff(0xcf)](_0x162c51=>[_0x162c51[_0x8205ff(0xd2)],_0x162c51['datasetCode']]));for(const _0x7054e9 of Object[_0x8205ff(0xf8)](_0x5993fe['functions'])){_0x7054e9[_0x8205ff(0xd2)]&&_0x7054e9[_0x8205ff(0xae)]&&!_0x56e32a[_0x8205ff(0xd8)](_0x7054e9['alias'])&&_0x56e32a[_0x8205ff(0xf4)](_0x7054e9['alias'],_0x7054e9[_0x8205ff(0xae)]);}const _0x68d9fd=await listDatasets(_0x17522b),_0x3302b7=new Map(_0x68d9fd['map'](_0x221c00=>[_0x221c00[_0x8205ff(0xc6)],_0x221c00]));return{'aliasToDatasetCode':_0x56e32a,'datasetCodeToDataset':_0x3302b7};}async function uploadSingleFunction(_0x290e7e,_0x5e553f,_0x370da6,_0x46dc7d){const _0x2dd04f=a37_0x45d673,_0x19ce5c=await readFile(_0x5e553f[_0x2dd04f(0xe7)],_0x2dd04f(0xec)),_0xd23465=await computeFileHash(_0x5e553f[_0x2dd04f(0xe7)]),_0x1f9c1c=_0x370da6[_0x2dd04f(0xf5)][_0x5e553f[_0x2dd04f(0xc4)]];if(_0x1f9c1c?.[_0x2dd04f(0xdd)]&&_0x1f9c1c['version']==null)throw CliErrors[_0x2dd04f(0xce)](_0x5e553f['lockKey']+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x431351=extractScriptDescription(_0x19ce5c);if(!_0x431351&&_0x1f9c1c?.['remoteId']){const _0x592a16=await getBffScriptInfo(_0x1f9c1c['remoteId']);_0x431351=_0x592a16[_0x2dd04f(0xb0)]||undefined;}const _0x590654={'appCode':_0x290e7e,'functionName':_0x5e553f[_0x2dd04f(0xbe)],'scriptType':_0x5e553f[_0x2dd04f(0xe9)],'scriptContent':_0x19ce5c};if(_0x1f9c1c?.[_0x2dd04f(0xdd)])_0x590654['id']=_0x1f9c1c[_0x2dd04f(0xdd)];if(_0x1f9c1c?.[_0x2dd04f(0xea)]!=null)_0x590654[_0x2dd04f(0xea)]=_0x1f9c1c[_0x2dd04f(0xea)];if(_0x431351)_0x590654[_0x2dd04f(0xb0)]=_0x431351;if(_0x5e553f[_0x2dd04f(0xe9)]===_0x2dd04f(0xf7)){const _0x22a98c=_0x5e553f['alias'];if(!_0x22a98c||!_0x5e553f[_0x2dd04f(0xe0)]||!_0x5e553f[_0x2dd04f(0xc5)])throw CliErrors['validation'](_0x2dd04f(0xdf)+_0x5e553f[_0x2dd04f(0xc4)]);const _0x555b1d=_0x46dc7d['aliasToDatasetCode']['get'](_0x22a98c)??_0x1f9c1c?.[_0x2dd04f(0xae)]??_0x22a98c,_0x59dc89=_0x46dc7d[_0x2dd04f(0xf2)][_0x2dd04f(0xd1)](_0x555b1d);if(!_0x59dc89)throw CliErrors['validation'](_0x2dd04f(0xd6)+_0x22a98c+'\x22.\x20'+(_0x2dd04f(0xbf)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x590654[_0x2dd04f(0xc1)]=_0x59dc89['id'],_0x590654[_0x2dd04f(0xe0)]=_0x5e553f[_0x2dd04f(0xe0)],_0x590654[_0x2dd04f(0xc5)]=_0x5e553f[_0x2dd04f(0xc5)];}const _0x3eb078=await saveBffScript(_0x590654),_0x523189=_0x3eb078['id'],_0x527960=_0x3eb078[_0x2dd04f(0xd5)]??await getBffScriptInfo(_0x523189),_0x3cae7f={'hash':_0xd23465,'remoteId':_0x523189,'version':_0x527960['version']};if(_0x5e553f['type']===_0x2dd04f(0xf7)){const _0x32dc44=_0x5e553f[_0x2dd04f(0xd2)],_0x51514=_0x46dc7d[_0x2dd04f(0xad)][_0x2dd04f(0xd1)](_0x32dc44)??_0x1f9c1c?.[_0x2dd04f(0xae)]??_0x32dc44;_0x46dc7d['aliasToDatasetCode']['has'](_0x32dc44)?_0x3cae7f['alias']=_0x32dc44:_0x3cae7f[_0x2dd04f(0xd2)]=_0x1f9c1c?.[_0x2dd04f(0xd2)],_0x3cae7f[_0x2dd04f(0xae)]=_0x51514,_0x3cae7f[_0x2dd04f(0xe0)]=_0x5e553f[_0x2dd04f(0xe0)],_0x3cae7f[_0x2dd04f(0xc5)]=_0x5e553f[_0x2dd04f(0xc5)];}_0x370da6['functions'][_0x5e553f[_0x2dd04f(0xc4)]]=_0x3cae7f;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x18ca83,_0x22cfc6,_0x437ff1){const _0x4f0077=a37_0x45d673;if(_0x437ff1[_0x4f0077(0xac)]===0x0)return;for(let _0x6834dd=0x0;_0x6834dd<LOCK_SETTLE_RETRY_COUNT;_0x6834dd+=0x1){const _0x1d0a33=await readBffLockFile(_0x18ca83),_0x4edb4a=_0x1d0a33?.[_0x4f0077(0xcb)]?.[_0x22cfc6]?.[_0x4f0077(0xf5)]??{},_0x31fdeb=_0x437ff1['every'](_0x102dbd=>!!_0x4edb4a[_0x102dbd]?.['remoteId']);if(_0x31fdeb)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x4f0077(0xb1)+_0x437ff1['join'](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a38_0x44a6(_0x3bcbdc,_0x500a3c){_0x3bcbdc=_0x3bcbdc-0x1d1;const _0xc6a7fa=a38_0xc6a7();let _0x44a639=_0xc6a7fa[_0x3bcbdc];return _0x44a639;}const a38_0x48f8e1=a38_0x44a6;(function(_0x5f531d,_0x4dbe38){const _0x1d9e8f=a38_0x44a6,_0x35981c=_0x5f531d();while(!![]){try{const _0x12c0ff=parseInt(_0x1d9e8f(0x1ec))/0x1+parseInt(_0x1d9e8f(0x1e2))/0x2*(parseInt(_0x1d9e8f(0x1de))/0x3)+-parseInt(_0x1d9e8f(0x1dc))/0x4+parseInt(_0x1d9e8f(0x1d6))/0x5+-parseInt(_0x1d9e8f(0x1d7))/0x6+parseInt(_0x1d9e8f(0x1e5))/0x7+-parseInt(_0x1d9e8f(0x1d8))/0x8;if(_0x12c0ff===_0x4dbe38)break;else _0x35981c['push'](_0x35981c['shift']());}catch(_0x458ae9){_0x35981c['push'](_0x35981c['shift']());}}}(a38_0xc6a7,0x44b90));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';import{computeFileHash}from'../../core/bff/hash.js';function a38_0xc6a7(){const _0x88d5c2=['bool','7698PGcxrV','lockFilePath','datasetCode','2832480WmzRaZ','scriptsRoot','map','length','read','lockKey','\x20added,\x20','284750myJQyA','appCode','boolean','remote','\x20remote-only','push','filePath','alias','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','2181290hJFTmG','478590UYQVAd','5545504LsDxAR','all','status','hash','1193192bGaVGJ','\x20unchanged','177tzixsM','bff','apiDir'];a38_0xc6a7=function(){return _0x88d5c2;};return a38_0xc6a7();}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x48f8e1(0x1df),'command':a38_0x48f8e1(0x1da),'description':a38_0x48f8e1(0x1d5),'risk':a38_0x48f8e1(0x1e9),'flags':[{'name':a38_0x48f8e1(0x1ef),'type':a38_0x48f8e1(0x1ee),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x30eb53){const _0x565415=a38_0x48f8e1,_0x4ddb6c=loadBffProjectConfig(_0x30eb53[_0x565415(0x1ed)]),_0x5596f8=await readBffLockFile(_0x4ddb6c[_0x565415(0x1e3)]),{appLock:_0x550e3b}=ensureLockScope(_0x5596f8??createEmptyBffLock(),_0x30eb53['appCode'],_0x4ddb6c[_0x565415(0x1e6)],_0x565415(0x1da)),_0x5a04ce=await scanLocalBffFunctions(_0x4ddb6c),_0x2c3a8d=[],_0x52e7d5=[],_0xe72509=[];for(const _0x7b7462 of _0x5a04ce){const _0x42f9f5=await computeFileHash(_0x7b7462[_0x565415(0x1d3)]),_0x50a0ad=_0x550e3b['functions'][_0x7b7462[_0x565415(0x1ea)]];if(!_0x50a0ad)_0x2c3a8d['push'](_0x7b7462[_0x565415(0x1ea)]);else _0x50a0ad[_0x565415(0x1db)]!==_0x42f9f5?_0x52e7d5[_0x565415(0x1d2)](_0x7b7462[_0x565415(0x1ea)]):_0xe72509['push'](_0x7b7462[_0x565415(0x1ea)]);}const _0x237f60=[];if(_0x30eb53[_0x565415(0x1e1)](_0x565415(0x1ef))){const _0x5f18bc=loadAliasMap(_0x30eb53[_0x565415(0x1e0)],undefined,resolveApiFilePath(_0x30eb53[_0x565415(0x1e0)],_0x30eb53[_0x565415(0x1ed)])),_0x414b3f=new Map(_0x5f18bc[_0x565415(0x1e7)](_0x54b913=>[_0x54b913[_0x565415(0x1e4)],_0x54b913[_0x565415(0x1d4)]])),[_0x5cdada,_0x1c1a66]=await Promise[_0x565415(0x1d9)]([listBffScripts(_0x30eb53[_0x565415(0x1ed)]),getBffScriptStatistics(_0x30eb53[_0x565415(0x1ed)])]),_0xf4b5fc=createHookLocationMap(_0x1c1a66),_0x30c6dd=new Set(_0x5a04ce['map'](_0x1a205c=>_0x1a205c[_0x565415(0x1ea)]));for(const _0x5d8553 of _0x5cdada){const _0x393ef1=resolveRemoteScriptTarget(_0x4ddb6c,_0x5d8553,_0xf4b5fc,_0x550e3b['functions'],_0x414b3f);_0x393ef1&&!_0x30c6dd['has'](_0x393ef1['lockKey'])&&_0x237f60[_0x565415(0x1d2)](_0x393ef1[_0x565415(0x1ea)]);}}const _0x3d62f6=_0x2c3a8d['length']===0x0&&_0x52e7d5[_0x565415(0x1e8)]===0x0&&_0x237f60[_0x565415(0x1e8)]===0x0;return{'ok':!![],'data':{'added':_0x2c3a8d,'modified':_0x52e7d5,'unchanged':_0xe72509,'remoteOnly':_0x237f60},'message':_0x3d62f6?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x2c3a8d[_0x565415(0x1e8)]+_0x565415(0x1eb)+_0x52e7d5[_0x565415(0x1e8)]+'\x20modified,\x20'+_0xe72509[_0x565415(0x1e8)]+_0x565415(0x1dd)+(_0x237f60[_0x565415(0x1e8)]>0x0?',\x20'+_0x237f60['length']+_0x565415(0x1d1):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a39_0x1122(_0x562b05,_0x46234c){_0x562b05=_0x562b05-0x180;const _0x3ca4db=a39_0x3ca4();let _0x11225c=_0x3ca4db[_0x562b05];return _0x11225c;}const a39_0x2be050=a39_0x1122;(function(_0x5c9d5e,_0x118429){const _0x724a19=a39_0x1122,_0xf5db84=_0x5c9d5e();while(!![]){try{const _0x319852=parseInt(_0x724a19(0x19d))/0x1+parseInt(_0x724a19(0x183))/0x2*(parseInt(_0x724a19(0x18c))/0x3)+-parseInt(_0x724a19(0x19a))/0x4*(-parseInt(_0x724a19(0x196))/0x5)+-parseInt(_0x724a19(0x186))/0x6*(-parseInt(_0x724a19(0x18a))/0x7)+-parseInt(_0x724a19(0x18f))/0x8+parseInt(_0x724a19(0x198))/0x9*(parseInt(_0x724a19(0x187))/0xa)+-parseInt(_0x724a19(0x190))/0xb;if(_0x319852===_0x118429)break;else _0xf5db84['push'](_0xf5db84['shift']());}catch(_0x25359a){_0xf5db84['push'](_0xf5db84['shift']());}}}(a39_0x3ca4,0x1c68c));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x2be050(0x18b),'command':a39_0x2be050(0x188),'description':'Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','risk':a39_0x2be050(0x19b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1b4c27){const _0x3fd7f6=a39_0x2be050;logger['setLogPath'](process[_0x3fd7f6(0x192)]()),logger[_0x3fd7f6(0x193)](_0x3fd7f6(0x181),_0x3fd7f6(0x180));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x1de0ac,RABETBASE_SKILL_SOURCE:_0x94d7dd,runNpxSkillsAddGlobal:_0x246417}=await import(_0x3fd7f6(0x182)),_0x2c7ba7=_0x1b4c27[_0x3fd7f6(0x19c)]?_0x3fd7f6(0x189):_0x3fd7f6(0x18e);console[_0x3fd7f6(0x194)](_0x3fd7f6(0x197)+_0x1de0ac+_0x3fd7f6(0x18d));const _0x4c3288=_0x246417(process['cwd'](),_0x94d7dd,{'stdio':_0x2c7ba7});if(_0x4c3288[_0x3fd7f6(0x199)])console[_0x3fd7f6(0x194)](_0x3fd7f6(0x185));else{if(_0x4c3288['ok'])console['log']('CLI\x20Built-in\x20Skill\x20installed');else throw CliErrors[_0x3fd7f6(0x184)]('npx\x20skills\x20add\x20failed:\x20'+(_0x4c3288[_0x3fd7f6(0x19e)]||_0x3fd7f6(0x195)),_0x3fd7f6(0x191)+_0x1de0ac);}return{'ok':!![]};}}];function a39_0x3ca4(){const _0x5a774c=['119eiZnHH','cli-skill','3brjcsJ',')...','inherit','1056024VbIOIw','2040555zxoTob','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','cwd','info','log','unknown','650WsULgO','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','9DioyBV','skipped','5716PKHoCC','write','nonInteractive','79463yUVftP','error','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','cli-skill-install','../../skills/npx-skills-add.js','55544mwncCM','apiError','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','20862vcsAXo','817580VdGwle','install','pipe'];a39_0x3ca4=function(){return _0x5a774c;};return a39_0x3ca4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a40_0x4150fc=a40_0x1763;(function(_0x4e94a2,_0x55e7b8){const _0x2a3e24=a40_0x1763,_0x454838=_0x4e94a2();while(!![]){try{const _0x3d71e5=parseInt(_0x2a3e24(0x1de))/0x1+-parseInt(_0x2a3e24(0x19e))/0x2*(-parseInt(_0x2a3e24(0x1af))/0x3)+parseInt(_0x2a3e24(0x1a1))/0x4*(-parseInt(_0x2a3e24(0x1b2))/0x5)+-parseInt(_0x2a3e24(0x1d0))/0x6*(-parseInt(_0x2a3e24(0x1d3))/0x7)+-parseInt(_0x2a3e24(0x1c1))/0x8+parseInt(_0x2a3e24(0x1ab))/0x9*(-parseInt(_0x2a3e24(0x1c3))/0xa)+-parseInt(_0x2a3e24(0x1b0))/0xb;if(_0x3d71e5===_0x55e7b8)break;else _0x454838['push'](_0x454838['shift']());}catch(_0x2df918){_0x454838['push'](_0x454838['shift']());}}}(a40_0x4fe1,0x1ce78));import a40_0x548ba0 from'chalk';import a40_0xc8211f from'ora';import a40_0x21d9e0 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 _0x56797b=a40_0x1763;return GIT_COMMIT!==_0x56797b(0x1cf)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x56797b(0x19d)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x8700b8=a40_0x1763,_0x452a4b=process['execPath']['toLowerCase']();if(_0x452a4b[_0x8700b8(0x1e1)](_0x8700b8(0x19c)))return _0x8700b8(0x19c);return _0x8700b8(0x1ca);}const updateFlags=[{'name':a40_0x4150fc(0x199),'type':a40_0x4150fc(0x1a7),'description':a40_0x4150fc(0x1b4),'default':![]},{'name':'version','type':a40_0x4150fc(0x1d8),'description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':'no-skills','type':a40_0x4150fc(0x1a7),'description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':'skills','type':a40_0x4150fc(0x1a7),'description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x413625){const _0x33da55=a40_0x4150fc;return _0x413625[_0x33da55(0x1d4)]('version')[_0x33da55(0x1db)]();}function shouldSkipCliSkill(_0x3df0aa){const _0x46c7a3=a40_0x4150fc;return _0x3df0aa[_0x46c7a3(0x1dc)](_0x46c7a3(0x1da))||_0x3df0aa[_0x46c7a3(0x19b)]('skills')===![];}async function validateUpdateFlags(_0x341aff){const _0x3d318a=a40_0x4150fc,_0x2292e3=_0x341aff['bool'](_0x3d318a(0x199)),_0x2aa33d=getRequestedVersion(_0x341aff);if(_0x2292e3&&_0x2aa33d)throw CliErrors[_0x3d318a(0x1d9)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x2aa33d&&!a40_0x21d9e0[_0x3d318a(0x1c4)](_0x2aa33d))throw CliErrors['validation']('Invalid\x20version:\x20'+_0x2aa33d,_0x3d318a(0x1a3));}function a40_0x4fe1(){const _0x58e88a=['Current\x20version:\x20','version','yellow','beta','pipe','flag','bun','slice','118918UMntap','green','skipped','804srxDUy','red','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','Updating\x20via\x20','succeed','fail','boolean','gray','Update\x20failed','Checking\x20CLI\x20Built-in\x20Skill...','14643zNPOdw','start','cwd','source','9zJincp','2319977YOdTUH','run','2685WVGsjJ','\x20\x20Try\x20manually:\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','object','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','info','Updated\x20to\x20v','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','warn','Beta\x20version:\x20','Version\x20comparison\x20failed','update','install','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Already\x20on\x20requested\x20version\x20(v','709552YottCE','Update\x20available:\x20','400WcBJQk','valid','log','...','Already\x20up\x20to\x20date\x20(v','Requested\x20version:\x20','entries','npm','latest','map','filter','inherit','unknown','6eXtGWP','@latest','error','1247393HdBSqE','str','https://registry.npmjs.org/-/package/','fromEntries','json','string','validation','no-skills','trim','bool','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','234434lqANhd','/dist-tags','message','includes','Checking\x20for\x20updates...','timeout','\x20install\x20-g\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','\x20cli-skill\x20install'];a40_0x4fe1=function(){return _0x58e88a;};return a40_0x4fe1();}async function fetchNpmDistTags(){const _0x860b27=a40_0x4150fc;try{const _0x467bb1=await fetch(_0x860b27(0x1d5)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x860b27(0x1df),{'signal':AbortSignal[_0x860b27(0x1e3)](0x2710)});if(!_0x467bb1['ok'])return null;const _0x1b1356=await _0x467bb1[_0x860b27(0x1d7)]();if(!_0x1b1356||typeof _0x1b1356!==_0x860b27(0x1b5))return null;return Object[_0x860b27(0x1d6)](Object[_0x860b27(0x1c9)](_0x1b1356)[_0x860b27(0x1cd)](([,_0x11a2b6])=>typeof _0x11a2b6===_0x860b27(0x1d8)&&_0x11a2b6[_0x860b27(0x1db)]()['length']>0x0)[_0x860b27(0x1cc)](([_0x5f54fa,_0xabef54])=>[_0x5f54fa,String(_0xabef54)[_0x860b27(0x1db)]()]));}catch{return null;}}function a40_0x1763(_0x5efb50,_0x563f2a){_0x5efb50=_0x5efb50-0x194;const _0x4fe1d1=a40_0x4fe1();let _0x176312=_0x4fe1d1[_0x5efb50];return _0x176312;}async function fetchNpmDistTagVersion(_0x4b245b){const _0x1e169e=await fetchNpmDistTags();return _0x1e169e?.[_0x4b245b]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x25c40a){const _0x21dd21=a40_0x4150fc,_0x7692b9=getRequestedVersion(_0x25c40a);if(_0x7692b9)return{'version':_0x7692b9,'source':_0x21dd21(0x197)};if(_0x25c40a[_0x21dd21(0x1dc)](_0x21dd21(0x199))){const _0x48b353=await fetchNpmDistTagVersion('beta');if(!_0x48b353)return null;return{'version':_0x48b353,'source':_0x21dd21(0x199)};}const _0x2936dc=await fetchLatestVersion();if(!_0x2936dc)return null;return{'version':_0x2936dc,'source':_0x21dd21(0x1cb)};}function shouldInstallTarget(_0x18ecbc,_0x1f95ca){const _0x3b564c=a40_0x4150fc;if(_0x1f95ca[_0x3b564c(0x1ae)]===_0x3b564c(0x197)||_0x1f95ca['source']===_0x3b564c(0x199))return!a40_0x21d9e0['eq'](_0x18ecbc,_0x1f95ca[_0x3b564c(0x197)]);return a40_0x21d9e0['lt'](_0x18ecbc,_0x1f95ca[_0x3b564c(0x197)]);}function getInstallPlanLabel(_0x37b331,_0xb51267){const _0xc33d1f=a40_0x4150fc;switch(_0xb51267[_0xc33d1f(0x1ae)]){case _0xc33d1f(0x199):return _0xc33d1f(0x1bb)+a40_0x548ba0[_0xc33d1f(0x198)](_0x37b331)+'\x20→\x20'+a40_0x548ba0['green'](_0xb51267[_0xc33d1f(0x197)]);case _0xc33d1f(0x197):return _0xc33d1f(0x1c8)+a40_0x548ba0[_0xc33d1f(0x198)](_0x37b331)+'\x20→\x20'+a40_0x548ba0['green'](_0xb51267[_0xc33d1f(0x197)]);case'latest':default:return _0xc33d1f(0x1c2)+a40_0x548ba0[_0xc33d1f(0x198)](_0x37b331)+'\x20→\x20'+a40_0x548ba0[_0xc33d1f(0x19f)](_0xb51267[_0xc33d1f(0x197)]);}}async function installCliSkill(_0x4d6aaf){const _0x22d9e5=a40_0x4150fc;console[_0x22d9e5(0x1c5)](a40_0x548ba0['gray'](_0x22d9e5(0x1aa)));const _0x611b49=runNpxSkillsAddGlobal(process[_0x22d9e5(0x1ad)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x4d6aaf?_0x22d9e5(0x19a):_0x22d9e5(0x1ce)});if(_0x611b49[_0x22d9e5(0x1a0)]){console[_0x22d9e5(0x1c5)](a40_0x548ba0[_0x22d9e5(0x1a8)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x611b49['ok']){console[_0x22d9e5(0x1c5)](a40_0x548ba0[_0x22d9e5(0x1a8)]('\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.'));return;}console[_0x22d9e5(0x1ba)](a40_0x548ba0[_0x22d9e5(0x198)]('\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20'+(_0x611b49['error']||_0x22d9e5(0x1cf)))),console[_0x22d9e5(0x1c5)](a40_0x548ba0[_0x22d9e5(0x1a8)]('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+_0x22d9e5(0x195)));}async function execute(_0xf0125){const _0x605bce=a40_0x4150fc;await validateUpdateFlags(_0xf0125);const _0x4a719c=getCurrentVersion();console['log'](_0x605bce(0x196)+_0x4a719c);const _0x44b732=a40_0xc8211f(_0x605bce(0x1e2))[_0x605bce(0x1ac)](),_0x17d667=await resolveTargetVersion(_0xf0125);if(!_0x17d667){const _0x193b70=_0xf0125[_0x605bce(0x1dc)](_0x605bce(0x199))?_0x605bce(0x1b6):_0x605bce(0x194);return _0x44b732[_0x605bce(0x1a6)](_0x193b70),console[_0x605bce(0x1c5)](a40_0x548ba0[_0x605bce(0x1a8)](_0x605bce(0x1bf)+NPM_PACKAGE_NAME+_0x605bce(0x1d1))),{'ok':![],'message':_0x193b70};}const _0x5ecc59=a40_0x21d9e0[_0x605bce(0x1c4)](VERSION),_0x51faa1=a40_0x21d9e0['valid'](_0x17d667['version']);if(!_0x5ecc59||!_0x51faa1)return _0x44b732[_0x605bce(0x1a6)](_0x605bce(0x1bc)),{'ok':![],'message':_0x605bce(0x1bc)};if(!shouldInstallTarget(_0x5ecc59,_0x17d667)){const _0x594ac2=_0x17d667[_0x605bce(0x1ae)]===_0x605bce(0x197)?_0x605bce(0x1c0)+_0x17d667[_0x605bce(0x197)]+')':_0x605bce(0x1c7)+_0x17d667[_0x605bce(0x197)]+')';return _0x44b732['succeed'](_0x594ac2),shouldSkipCliSkill(_0xf0125)?console[_0x605bce(0x1c5)](a40_0x548ba0[_0x605bce(0x1a8)](_0x605bce(0x1dd))):await installCliSkill(_0xf0125['nonInteractive']),{'ok':!![]};}_0x44b732[_0x605bce(0x1b7)](getInstallPlanLabel(_0x4a719c,_0x17d667));const _0x5279e1=detectPackageManager(),_0x4b1882=_0x5279e1===_0x605bce(0x1ca)?resolveNpmBin(_0x605bce(0x1ca)):_0x5279e1,_0x1935c7=a40_0xc8211f(_0x605bce(0x1a4)+_0x5279e1+_0x605bce(0x1c6))['start']();try{return await execa(_0x4b1882,[_0x605bce(0x1be),'-g',NPM_PACKAGE_NAME+'@'+_0x17d667[_0x605bce(0x197)]],{'stdio':_0x605bce(0x19a)}),_0x1935c7[_0x605bce(0x1a5)](_0x605bce(0x1b8)+_0x17d667[_0x605bce(0x197)]),console[_0x605bce(0x1c5)](a40_0x548ba0[_0x605bce(0x1a8)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipCliSkill(_0xf0125)?console['log'](a40_0x548ba0[_0x605bce(0x1a8)](_0x605bce(0x1dd))):await installCliSkill(_0xf0125['nonInteractive']),{'ok':!![]};}catch(_0x45f03){return _0x1935c7[_0x605bce(0x1a6)](_0x605bce(0x1a9)),console[_0x605bce(0x1d2)](a40_0x548ba0[_0x605bce(0x1a2)]('\x20\x20'+_0x45f03[_0x605bce(0x1e0)])),console[_0x605bce(0x1c5)](a40_0x548ba0['gray'](_0x605bce(0x1b3)+_0x5279e1+_0x605bce(0x1e4)+NPM_PACKAGE_NAME+'@'+_0x17d667[_0x605bce(0x197)])),{'ok':![],'message':_0x45f03[_0x605bce(0x1e0)]};}}export const updateDefinition={'service':a40_0x4150fc(0x1bd),'command':a40_0x4150fc(0x1b1),'description':a40_0x4150fc(0x1b9),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a40_0x9c653c=a40_0x39e4;(function(_0x6ab443,_0x4c27d8){const _0x1068fa=a40_0x39e4,_0x4f0509=_0x6ab443();while(!![]){try{const _0x3743e9=parseInt(_0x1068fa(0x175))/0x1*(parseInt(_0x1068fa(0x19c))/0x2)+parseInt(_0x1068fa(0x167))/0x3+parseInt(_0x1068fa(0x15a))/0x4*(-parseInt(_0x1068fa(0x1ab))/0x5)+-parseInt(_0x1068fa(0x162))/0x6*(parseInt(_0x1068fa(0x182))/0x7)+-parseInt(_0x1068fa(0x194))/0x8*(-parseInt(_0x1068fa(0x15c))/0x9)+-parseInt(_0x1068fa(0x191))/0xa+parseInt(_0x1068fa(0x16c))/0xb;if(_0x3743e9===_0x4c27d8)break;else _0x4f0509['push'](_0x4f0509['shift']());}catch(_0x24ae2e){_0x4f0509['push'](_0x4f0509['shift']());}}}(a40_0x30d7,0xd58e2));import a40_0x5d7dd1 from'chalk';import a40_0x5b580d from'ora';import a40_0x34da58 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 _0x372454=a40_0x39e4;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x372454(0x1a9)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x2f4333=a40_0x39e4,_0x56cbed=process[_0x2f4333(0x184)]['toLowerCase']();if(_0x56cbed[_0x2f4333(0x15d)](_0x2f4333(0x17e)))return _0x2f4333(0x17e);return _0x2f4333(0x190);}const updateFlags=[{'name':a40_0x9c653c(0x16b),'type':a40_0x9c653c(0x169),'description':a40_0x9c653c(0x185),'default':![]},{'name':a40_0x9c653c(0x1a1),'type':a40_0x9c653c(0x192),'description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':a40_0x9c653c(0x183),'type':a40_0x9c653c(0x169),'description':a40_0x9c653c(0x18b),'default':![]},{'name':a40_0x9c653c(0x17b),'type':'boolean','description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x1f2ac2){const _0x1ce7ee=a40_0x9c653c;return _0x1f2ac2[_0x1ce7ee(0x188)](_0x1ce7ee(0x1a1))[_0x1ce7ee(0x1a5)]();}function shouldSkipCliSkill(_0x135d16){const _0xed6c47=a40_0x9c653c;return _0x135d16[_0xed6c47(0x186)](_0xed6c47(0x183))||_0x135d16['flag'](_0xed6c47(0x17b))===![];}async function validateUpdateFlags(_0x3f037c){const _0x1ec349=a40_0x9c653c,_0x16216b=_0x3f037c['bool'](_0x1ec349(0x16b)),_0x56211e=getRequestedVersion(_0x3f037c);if(_0x16216b&&_0x56211e)throw CliErrors['validation']('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x1ec349(0x174));if(_0x56211e&&!a40_0x34da58[_0x1ec349(0x19d)](_0x56211e))throw CliErrors[_0x1ec349(0x17f)](_0x1ec349(0x19f)+_0x56211e,_0x1ec349(0x1ad));}async function fetchNpmDistTags(){const _0x3cead2=a40_0x9c653c;try{const _0x43fb2b=await fetch(_0x3cead2(0x18c)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x3cead2(0x172),{'signal':AbortSignal[_0x3cead2(0x198)](0x2710)});if(!_0x43fb2b['ok'])return null;const _0x204021=await _0x43fb2b['json']();if(!_0x204021||typeof _0x204021!==_0x3cead2(0x16d))return null;return Object[_0x3cead2(0x1a2)](Object[_0x3cead2(0x1a8)](_0x204021)[_0x3cead2(0x17a)](([,_0x4c8c38])=>typeof _0x4c8c38===_0x3cead2(0x192)&&_0x4c8c38['trim']()[_0x3cead2(0x193)]>0x0)['map'](([_0x55aad5,_0x29f395])=>[_0x55aad5,String(_0x29f395)[_0x3cead2(0x1a5)]()]));}catch{return null;}}function a40_0x30d7(){const _0x478a3f=['update','\x20install\x20-g\x20','timeout','@latest','latest','Update\x20available:\x20','6LTTHUl','valid','\x20cli-skill\x20install','Invalid\x20version:\x20','run','version','fromEntries','red','message','trim','Already\x20on\x20requested\x20version\x20(v','gray','entries','slice','Beta\x20version:\x20','3087745kYhXpm','install','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','Version\x20comparison\x20failed','4gcJehv','start','2277plQKKf','includes','\x20→\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','succeed','12ejsONN','Checking\x20CLI\x20Built-in\x20Skill...','warn','Updated\x20to\x20v','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','2988381NAbNgs','Updating\x20via\x20','boolean','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','beta','732996txcfdu','object','\x20\x20Try\x20manually:\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Already\x20up\x20to\x20date\x20(v','...','/dist-tags','log','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','490612AXgUOg','error','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','\x20\x20Run\x20manually:\x20','fail','filter','skills','Checking\x20for\x20updates...','green','bun','validation','inherit','pipe','5021933FSWOIX','no-skills','execPath','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','bool','Current\x20version:\x20','str','yellow','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','https://registry.npmjs.org/-/package/','source','cwd','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','npm','11728010EBVhxV','string','length','49496IDCgqq','unknown'];a40_0x30d7=function(){return _0x478a3f;};return a40_0x30d7();}async function fetchNpmDistTagVersion(_0x2b933f){const _0xdfce0f=await fetchNpmDistTags();return _0xdfce0f?.[_0x2b933f]??null;}async function fetchLatestVersion(){const _0x1a9394=a40_0x9c653c;return fetchNpmDistTagVersion(_0x1a9394(0x19a));}async function resolveTargetVersion(_0x41660c){const _0x58ef43=a40_0x9c653c,_0x36b105=getRequestedVersion(_0x41660c);if(_0x36b105)return{'version':_0x36b105,'source':'version'};if(_0x41660c[_0x58ef43(0x186)](_0x58ef43(0x16b))){const _0x2d31ed=await fetchNpmDistTagVersion(_0x58ef43(0x16b));if(!_0x2d31ed)return null;return{'version':_0x2d31ed,'source':_0x58ef43(0x16b)};}const _0x32103e=await fetchLatestVersion();if(!_0x32103e)return null;return{'version':_0x32103e,'source':_0x58ef43(0x19a)};}function a40_0x39e4(_0x161e1e,_0x20551b){_0x161e1e=_0x161e1e-0x159;const _0x30d7bb=a40_0x30d7();let _0x39e4e6=_0x30d7bb[_0x161e1e];return _0x39e4e6;}function shouldInstallTarget(_0x295ab1,_0x3b80e1){const _0x6d4125=a40_0x9c653c;if(_0x3b80e1['source']===_0x6d4125(0x1a1)||_0x3b80e1[_0x6d4125(0x18d)]===_0x6d4125(0x16b))return!a40_0x34da58['eq'](_0x295ab1,_0x3b80e1['version']);return a40_0x34da58['lt'](_0x295ab1,_0x3b80e1[_0x6d4125(0x1a1)]);}function getInstallPlanLabel(_0x2a077a,_0x5e4110){const _0x304621=a40_0x9c653c;switch(_0x5e4110[_0x304621(0x18d)]){case'beta':return _0x304621(0x1aa)+a40_0x5d7dd1[_0x304621(0x189)](_0x2a077a)+_0x304621(0x15e)+a40_0x5d7dd1[_0x304621(0x17d)](_0x5e4110['version']);case _0x304621(0x1a1):return'Requested\x20version:\x20'+a40_0x5d7dd1['yellow'](_0x2a077a)+_0x304621(0x15e)+a40_0x5d7dd1['green'](_0x5e4110[_0x304621(0x1a1)]);case'latest':default:return _0x304621(0x19b)+a40_0x5d7dd1['yellow'](_0x2a077a)+_0x304621(0x15e)+a40_0x5d7dd1[_0x304621(0x17d)](_0x5e4110[_0x304621(0x1a1)]);}}async function installCliSkill(_0xeac0){const _0x22574a=a40_0x9c653c;console[_0x22574a(0x173)](a40_0x5d7dd1['gray'](_0x22574a(0x163)));const _0x9ae546=runNpxSkillsAddGlobal(process[_0x22574a(0x18e)](),RABETBASE_SKILL_SOURCE,{'stdio':_0xeac0?'pipe':_0x22574a(0x180)});if(_0x9ae546['skipped']){console[_0x22574a(0x173)](a40_0x5d7dd1[_0x22574a(0x1a7)](_0x22574a(0x160)));return;}if(_0x9ae546['ok']){console[_0x22574a(0x173)](a40_0x5d7dd1[_0x22574a(0x1a7)](_0x22574a(0x18f)));return;}console[_0x22574a(0x164)](a40_0x5d7dd1['yellow'](_0x22574a(0x18a)+(_0x9ae546[_0x22574a(0x176)]||_0x22574a(0x195)))),console[_0x22574a(0x173)](a40_0x5d7dd1[_0x22574a(0x1a7)](_0x22574a(0x178)+CLI_BIN_NAME+_0x22574a(0x19e)));}async function execute(_0x4d8d80){const _0x14638d=a40_0x9c653c;await validateUpdateFlags(_0x4d8d80);const _0x31a10f=getCurrentVersion();console[_0x14638d(0x173)](_0x14638d(0x187)+_0x31a10f);const _0xef6e1b=a40_0x5b580d(_0x14638d(0x17c))['start'](),_0x2d0977=await resolveTargetVersion(_0x4d8d80);if(!_0x2d0977){const _0x3858da=_0x4d8d80[_0x14638d(0x186)](_0x14638d(0x16b))?_0x14638d(0x177):_0x14638d(0x15f);return _0xef6e1b[_0x14638d(0x179)](_0x3858da),console[_0x14638d(0x173)](a40_0x5d7dd1[_0x14638d(0x1a7)](_0x14638d(0x16f)+NPM_PACKAGE_NAME+_0x14638d(0x199))),{'ok':![],'message':_0x3858da};}const _0x5833a8=a40_0x34da58['valid'](VERSION),_0x33469c=a40_0x34da58[_0x14638d(0x19d)](_0x2d0977[_0x14638d(0x1a1)]);if(!_0x5833a8||!_0x33469c)return _0xef6e1b[_0x14638d(0x179)](_0x14638d(0x159)),{'ok':![],'message':_0x14638d(0x159)};if(!shouldInstallTarget(_0x5833a8,_0x2d0977)){const _0x529bf5=_0x2d0977[_0x14638d(0x18d)]==='version'?_0x14638d(0x1a6)+_0x2d0977[_0x14638d(0x1a1)]+')':_0x14638d(0x170)+_0x2d0977['version']+')';return _0xef6e1b[_0x14638d(0x161)](_0x529bf5),shouldSkipCliSkill(_0x4d8d80)?console[_0x14638d(0x173)](a40_0x5d7dd1[_0x14638d(0x1a7)](_0x14638d(0x16a))):await installCliSkill(_0x4d8d80['nonInteractive']),{'ok':!![]};}_0xef6e1b['info'](getInstallPlanLabel(_0x31a10f,_0x2d0977));const _0x2cb751=detectPackageManager(),_0x1229dd=_0x2cb751===_0x14638d(0x190)?resolveNpmBin(_0x14638d(0x190)):_0x2cb751,_0x14a273=a40_0x5b580d(_0x14638d(0x168)+_0x2cb751+_0x14638d(0x171))[_0x14638d(0x15b)]();try{return await execa(_0x1229dd,[_0x14638d(0x1ac),'-g',NPM_PACKAGE_NAME+'@'+_0x2d0977[_0x14638d(0x1a1)]],{'stdio':_0x14638d(0x181)}),_0x14a273[_0x14638d(0x161)](_0x14638d(0x165)+_0x2d0977['version']),console[_0x14638d(0x173)](a40_0x5d7dd1[_0x14638d(0x1a7)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipCliSkill(_0x4d8d80)?console[_0x14638d(0x173)](a40_0x5d7dd1[_0x14638d(0x1a7)](_0x14638d(0x16a))):await installCliSkill(_0x4d8d80['nonInteractive']),{'ok':!![]};}catch(_0x35a858){return _0x14a273[_0x14638d(0x179)]('Update\x20failed'),console[_0x14638d(0x176)](a40_0x5d7dd1[_0x14638d(0x1a3)]('\x20\x20'+_0x35a858[_0x14638d(0x1a4)])),console['log'](a40_0x5d7dd1['gray'](_0x14638d(0x16e)+_0x2cb751+_0x14638d(0x197)+NPM_PACKAGE_NAME+'@'+_0x2d0977[_0x14638d(0x1a1)])),{'ok':![],'message':_0x35a858[_0x14638d(0x1a4)]};}}export const updateDefinition={'service':a40_0x9c653c(0x196),'command':a40_0x9c653c(0x1a0),'description':a40_0x9c653c(0x166),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4e4ef2,_0x10925a){const _0x5df2a6=a41_0x47b2,_0x3f8c11=_0x4e4ef2();while(!![]){try{const _0x462b5b=parseInt(_0x5df2a6(0x17f))/0x1*(-parseInt(_0x5df2a6(0x185))/0x2)+-parseInt(_0x5df2a6(0x184))/0x3+-parseInt(_0x5df2a6(0x182))/0x4*(parseInt(_0x5df2a6(0x187))/0x5)+-parseInt(_0x5df2a6(0x181))/0x6+-parseInt(_0x5df2a6(0x189))/0x7*(parseInt(_0x5df2a6(0x186))/0x8)+-parseInt(_0x5df2a6(0x180))/0x9*(-parseInt(_0x5df2a6(0x188))/0xa)+parseInt(_0x5df2a6(0x183))/0xb;if(_0x462b5b===_0x10925a)break;else _0x3f8c11['push'](_0x3f8c11['shift']());}catch(_0x2fae33){_0x3f8c11['push'](_0x3f8c11['shift']());}}}(a41_0x1186,0x756a4));function a41_0x47b2(_0x288dcb,_0x142946){_0x288dcb=_0x288dcb-0x17f;const _0x1186c7=a41_0x1186();let _0x47b219=_0x1186c7[_0x288dcb];return _0x47b219;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];function a41_0x1186(){const _0x94b068=['402612Vsnkfy','28725323Annrsk','2124288ovkQjT','2cfxLup','140672afKmzm','30cmELLW','2198270hLAqsb','336hCdjDE','558047zJZgCt','27xPtqIY','455094nCKdgf'];a41_0x1186=function(){return _0x94b068;};return a41_0x1186();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a42_0x4f9702=a42_0x1da6;(function(_0x5c0105,_0x23a5ed){const _0x5aa05c=a42_0x1da6,_0x37bccd=_0x5c0105();while(!![]){try{const _0x538193=parseInt(_0x5aa05c(0xc2))/0x1*(parseInt(_0x5aa05c(0xc7))/0x2)+-parseInt(_0x5aa05c(0xc9))/0x3*(-parseInt(_0x5aa05c(0xbb))/0x4)+-parseInt(_0x5aa05c(0xbe))/0x5+parseInt(_0x5aa05c(0xb5))/0x6+parseInt(_0x5aa05c(0xb7))/0x7+parseInt(_0x5aa05c(0xbf))/0x8*(parseInt(_0x5aa05c(0xb9))/0x9)+parseInt(_0x5aa05c(0xc8))/0xa*(-parseInt(_0x5aa05c(0xb3))/0xb);if(_0x538193===_0x23a5ed)break;else _0x37bccd['push'](_0x37bccd['shift']());}catch(_0x2abd2e){_0x37bccd['push'](_0x37bccd['shift']());}}}(a42_0x218f,0x8ef79));function a42_0x1da6(_0x5f1186,_0x2d89b4){_0x5f1186=_0x5f1186-0xb2;const _0x218fc3=a42_0x218f();let _0x1da6fe=_0x218fc3[_0x5f1186];return _0x1da6fe;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a42_0x218f(){const _0x20c4bf=['boolean','4pOnXeO','name','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','string','208946UvsKho','470RXCbmQ','11994syImGT','operation','str','bool','code','tableName','474947lgzxwq','read','4683660TgshtL','skip-imports','6447518IJZpZd','alias','396LufYRz','sdk','220nuRzkN','appCode','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','3353430rSFsfj','172024YvgjjY','Omit\x20import\x20statements\x20from\x20generated\x20code'];a42_0x218f=function(){return _0x20c4bf;};return a42_0x218f();}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':a42_0x4f9702(0xba),'description':a42_0x4f9702(0xc5),'risk':a42_0x4f9702(0xb4),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x4f9702(0xb8),'type':a42_0x4f9702(0xc6),'description':a42_0x4f9702(0xbd)},{'name':a42_0x4f9702(0xca),'type':a42_0x4f9702(0xc6),'required':!![],'description':a42_0x4f9702(0xc4)},{'name':a42_0x4f9702(0xb6),'type':a42_0x4f9702(0xc1),'description':a42_0x4f9702(0xc0)}],async 'execute'(_0x371f83){const _0x287e97=a42_0x4f9702,{dataset:_0x350562,operation:_0x293972}=await getOperationDetail(_0x371f83[_0x287e97(0xbc)],_0x371f83[_0x287e97(0xcb)](_0x287e97(0xcd)),_0x371f83['str'](_0x287e97(0xca))),_0x5e4692=generateSdkCode(_0x350562,_0x293972,{'includeImports':!_0x371f83[_0x287e97(0xcc)](_0x287e97(0xb6))});return{'ok':!![],'data':{'dataset':{'name':_0x350562[_0x287e97(0xc3)],'code':_0x350562[_0x287e97(0xcd)],'tableName':_0x350562[_0x287e97(0xb2)]},'operation':_0x371f83[_0x287e97(0xcb)](_0x287e97(0xca)),'code':_0x5e4692}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x42724f=a43_0x1038;function a43_0x1038(_0x2842b9,_0x28cacb){_0x2842b9=_0x2842b9-0xc9;const _0x240f74=a43_0x240f();let _0x1038a1=_0x240f74[_0x2842b9];return _0x1038a1;}(function(_0x171b8a,_0x273128){const _0x42ef51=a43_0x1038,_0x41efb0=_0x171b8a();while(!![]){try{const _0x5dc3b5=parseInt(_0x42ef51(0xcc))/0x1+parseInt(_0x42ef51(0xd0))/0x2+parseInt(_0x42ef51(0xd5))/0x3+-parseInt(_0x42ef51(0xce))/0x4*(-parseInt(_0x42ef51(0xc9))/0x5)+parseInt(_0x42ef51(0xcf))/0x6+parseInt(_0x42ef51(0xda))/0x7+-parseInt(_0x42ef51(0xde))/0x8;if(_0x5dc3b5===_0x273128)break;else _0x41efb0['push'](_0x41efb0['shift']());}catch(_0xf61632){_0x41efb0['push'](_0x41efb0['shift']());}}}(a43_0x240f,0x4bb17));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0x42724f(0xdd),'command':a43_0x42724f(0xd4),'description':a43_0x42724f(0xcb),'risk':a43_0x42724f(0xca),'flags':[SQLCODE_FLAG,{'name':'target','type':a43_0x42724f(0xd7),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a43_0x42724f(0xd9),'enum':['sdk',a43_0x42724f(0xcd)]},{'name':'no-imports','type':a43_0x42724f(0xd2),'description':a43_0x42724f(0xdf)}],async 'execute'(_0x120c79){const _0x37a7f0=a43_0x42724f,_0x245489=await getSqlQueryInfo(_0x120c79[_0x37a7f0(0xdc)],_0x120c79[_0x37a7f0(0xd1)]('sqlcode')),_0x275a07=_0x120c79[_0x37a7f0(0xd1)]('target')||_0x37a7f0(0xd9),_0x404bba=generateSqlCodeTemplate(_0x245489,{'target':_0x275a07,'includeImports':!_0x120c79[_0x37a7f0(0xd3)](_0x37a7f0(0xdb))});return{'ok':!![],'data':{'sqlCode':_0x245489[_0x37a7f0(0xd8)],'sqlName':_0x245489[_0x37a7f0(0xd6)],'target':_0x275a07,'code':_0x404bba}};}};function a43_0x240f(){const _0x32421d=['codegen','18106424lKTuxm','Omit\x20import\x20statements\x20from\x20generated\x20code','5ZLnlyM','read','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','113567KUqpQi','bff','2218888GHeWDj','3498660iDgPWF','225980zvoAlp','str','boolean','bool','sql','1781166GFFphy','sqlName','string','sqlCode','sdk','4306617cVcNwu','no-imports','appCode'];a43_0x240f=function(){return _0x32421d;};return a43_0x240f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x572d48,_0x5605c0){const _0x72f0a2=a44_0xdef4,_0x1e4373=_0x572d48();while(!![]){try{const _0x2da4be=-parseInt(_0x72f0a2(0x1be))/0x1*(-parseInt(_0x72f0a2(0x1da))/0x2)+-parseInt(_0x72f0a2(0x1bd))/0x3*(-parseInt(_0x72f0a2(0x1d5))/0x4)+parseInt(_0x72f0a2(0x1c9))/0x5*(-parseInt(_0x72f0a2(0x1c8))/0x6)+-parseInt(_0x72f0a2(0x1c3))/0x7*(-parseInt(_0x72f0a2(0x1c4))/0x8)+parseInt(_0x72f0a2(0x1dc))/0x9*(parseInt(_0x72f0a2(0x1cd))/0xa)+-parseInt(_0x72f0a2(0x1ca))/0xb+-parseInt(_0x72f0a2(0x1e7))/0xc;if(_0x2da4be===_0x5605c0)break;else _0x1e4373['push'](_0x1e4373['shift']());}catch(_0x21e433){_0x1e4373['push'](_0x1e4373['shift']());}}}(a44_0x2d40,0xb06d8));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_0xdef4(_0x16daa2,_0x126987){_0x16daa2=_0x16daa2-0x1b9;const _0x2d40e7=a44_0x2d40();let _0xdef4af=_0x2d40e7[_0x16daa2];return _0xdef4af;}export function buildAppAddFlags(){const _0x4bab96=a44_0xdef4;return[{'name':_0x4bab96(0x1e4),'type':_0x4bab96(0x1d0),'description':'App\x20code','required':!![]},{'name':_0x4bab96(0x1d2),'type':'boolean','description':_0x4bab96(0x1e0),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x55220d=a44_0xdef4;return[{'name':_0x55220d(0x1d2),'type':_0x55220d(0x1e3),'description':_0x55220d(0x1e0),'default':![]}];}function a44_0x2d40(){const _0x22f0ba=['Removed\x20app\x20\x22','args','apps','Added','30eHBUfR','project','779346HsEYGh','\x20<name>','\x20Set\x20as\x20default\x20app.','globalConfig','Use\x20global\x20config\x20scope','Updated','\x22\x20not\x20found.','boolean','appcode','\x20Note:\x20app\x20\x22','\x22\x20(appcode:\x20','3527328tbrxil','validation','object','str','\x20<name>\x20[--global]','\x22\x20still\x20defined\x20in\x20','both','196266lTfBFK','73649oAnAwD','Usage:\x20','Missing\x20app\x20name.','length','\x20<name>\x20--appcode\x20<code>','42uVSpVP','907640sPEBKV','defaultApp','trim','keys','42MjAIHh','426305tKtMjJ','15248948wdzgCh','App\x20\x22','projectConfig','110SjwSYt','inherit','flagMissing','string','\x20app\x20\x22','global','\x20config.','bool','16BBdLWW'];a44_0x2d40=function(){return _0x22f0ba;};return a44_0x2d40();}export async function validateAppName(_0x55b94d,_0x924deb){const _0x1794f3=a44_0xdef4,_0x428720=_0x55b94d[_0x1794f3(0x1d7)][0x0]?.[_0x1794f3(0x1c6)]();if(!_0x428720)throw CliErrors[_0x1794f3(0x1e8)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x924deb+_0x1794f3(0x1dd));}export async function runAppAdd(_0x27b73d,_0x38bb48){const _0x46c2b8=a44_0xdef4,_0x33c074=_0x27b73d[_0x46c2b8(0x1d7)][0x0]?.[_0x46c2b8(0x1c6)]();if(!_0x33c074)throw CliErrors[_0x46c2b8(0x1e8)](_0x46c2b8(0x1c0),_0x46c2b8(0x1bf)+CLI_BIN_NAME+'\x20'+_0x38bb48+_0x46c2b8(0x1c2));const _0x2752a3=_0x27b73d[_0x46c2b8(0x1b9)](_0x46c2b8(0x1e4));if(!_0x2752a3)throw CliErrors[_0x46c2b8(0x1cf)](_0x46c2b8(0x1e4),_0x46c2b8(0x1bf)+CLI_BIN_NAME+'\x20'+_0x38bb48+'\x20<name>\x20--appcode\x20<code>');const _0x5b4dd6={'global':_0x27b73d[_0x46c2b8(0x1d4)](_0x46c2b8(0x1d2))},_0x582e04=readConfig(_0x5b4dd6);if(!_0x582e04[_0x46c2b8(0x1d8)])_0x582e04[_0x46c2b8(0x1d8)]={};const _0x293546={'appcode':_0x2752a3,...collectAppProfileOverrides(_0x5edd66=>_0x27b73d[_0x46c2b8(0x1b9)](_0x5edd66))},_0x74e289=_0x582e04[_0x46c2b8(0x1d8)],_0x5d9404=!!_0x74e289[_0x33c074];_0x74e289[_0x33c074]=_0x293546;if(!_0x582e04[_0x46c2b8(0x1c5)])_0x582e04[_0x46c2b8(0x1c5)]=_0x33c074;writeConfig(_0x582e04,_0x5b4dd6);const _0x212c56=!_0x5d9404&&_0x582e04[_0x46c2b8(0x1c5)]===_0x33c074?_0x46c2b8(0x1de):'',_0x9c3a4d=(_0x5d9404?_0x46c2b8(0x1e1):_0x46c2b8(0x1d9))+_0x46c2b8(0x1d1)+_0x33c074+_0x46c2b8(0x1e6)+_0x2752a3+')'+scopeLabel(_0x5b4dd6)+'.'+_0x212c56;return{'ok':!![],'message':_0x9c3a4d};}export async function runAppRemove(_0x23930c,_0x69480){const _0x1e753b=a44_0xdef4,_0x23c3de=_0x23930c[_0x1e753b(0x1d7)][0x0]?.[_0x1e753b(0x1c6)]();if(!_0x23c3de)throw CliErrors[_0x1e753b(0x1e8)]('Missing\x20app\x20name.',_0x1e753b(0x1bf)+CLI_BIN_NAME+'\x20'+_0x69480+_0x1e753b(0x1ba));const _0x3ea0db=_0x23930c[_0x1e753b(0x1d4)](_0x1e753b(0x1d2)),{config:_0x3437be,layers:_0x4ec434}=readRawConfigWithLayers(),_0x1d0571=_0x3437be[_0x1e753b(0x1d8)]??{};if(!_0x1d0571[_0x23c3de])throw CliErrors[_0x1e753b(0x1e8)](_0x1e753b(0x1cb)+_0x23c3de+_0x1e753b(0x1e2));const _0x442889=_0x4ec434[_0x1e753b(0x1df)][_0x1e753b(0x1d8)]&&typeof _0x4ec434[_0x1e753b(0x1df)][_0x1e753b(0x1d8)]===_0x1e753b(0x1e9)?_0x4ec434[_0x1e753b(0x1df)][_0x1e753b(0x1d8)]:{},_0x59c40c=_0x4ec434[_0x1e753b(0x1cc)][_0x1e753b(0x1d8)]&&typeof _0x4ec434[_0x1e753b(0x1cc)][_0x1e753b(0x1d8)]==='object'?_0x4ec434[_0x1e753b(0x1cc)]['apps']:{},_0x5716e0=appDefinedIn(_0x23c3de,_0x442889,_0x59c40c,_0x4ec434[_0x1e753b(0x1cc)][_0x1e753b(0x1ce)]===![]),_0x59df90=resolveAppScopeForWrite(_0x23c3de,_0x3ea0db,_0x4ec434),_0x550150={'global':_0x59df90===_0x1e753b(0x1d2)},_0x44db3f=readConfig(_0x550150),_0x471cf9=_0x44db3f[_0x1e753b(0x1d8)];if(!_0x471cf9||!_0x471cf9[_0x23c3de])throw CliErrors[_0x1e753b(0x1e8)](_0x1e753b(0x1cb)+_0x23c3de+_0x1e753b(0x1e2));delete _0x471cf9[_0x23c3de];let _0x549dd8='';if(_0x44db3f[_0x1e753b(0x1c5)]===_0x23c3de){const _0x39eb47=Object[_0x1e753b(0x1c7)](_0x471cf9);_0x44db3f[_0x1e753b(0x1c5)]=_0x39eb47[_0x1e753b(0x1c1)]>0x0?_0x39eb47[0x0]:undefined,_0x44db3f['defaultApp']?_0x549dd8='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x44db3f['defaultApp']+'\x22.':delete _0x44db3f[_0x1e753b(0x1c5)];}Object[_0x1e753b(0x1c7)](_0x471cf9)[_0x1e753b(0x1c1)]===0x0&&(delete _0x44db3f[_0x1e753b(0x1d8)],delete _0x44db3f['defaultApp']);writeConfig(_0x44db3f,_0x550150);const _0x52d965=_0x5716e0===_0x1e753b(0x1bc)?_0x1e753b(0x1e5)+_0x23c3de+_0x1e753b(0x1bb)+(_0x59df90==='project'?'global':_0x1e753b(0x1db))+_0x1e753b(0x1d3):'';return{'ok':!![],'message':_0x1e753b(0x1d6)+_0x23c3de+'\x22'+scopeLabel(_0x550150)+'.'+_0x549dd8+_0x52d965};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x334bab,_0x5d1473){const _0xeeae00=a45_0x3cc9,_0x32a0fa=_0x334bab();while(!![]){try{const _0x218908=parseInt(_0xeeae00(0x154))/0x1*(parseInt(_0xeeae00(0x151))/0x2)+-parseInt(_0xeeae00(0x156))/0x3*(parseInt(_0xeeae00(0x14d))/0x4)+-parseInt(_0xeeae00(0x147))/0x5+parseInt(_0xeeae00(0x140))/0x6+parseInt(_0xeeae00(0x158))/0x7+parseInt(_0xeeae00(0x148))/0x8+parseInt(_0xeeae00(0x14b))/0x9*(-parseInt(_0xeeae00(0x14f))/0xa);if(_0x218908===_0x5d1473)break;else _0x32a0fa['push'](_0x32a0fa['shift']());}catch(_0x5dcf9d){_0x32a0fa['push'](_0x32a0fa['shift']());}}}(a45_0x5f85,0x775b7));function a45_0x3cc9(_0x39e204,_0x58bf64){_0x39e204=_0x39e204-0x13c;const _0x5f8557=a45_0x5f85();let _0x3cc946=_0x5f8557[_0x39e204];return _0x3cc946;}import{input,checkbox,select}from'@inquirer/prompts';import a45_0x322c94 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x493d7b=a45_0x3cc9,_0x3f9c8b=await input({'message':_0x493d7b(0x149),'validate':_0x5659fe=>{const _0xb5e3c7=_0x493d7b,_0x185a1f=validateAppcode(_0x5659fe['trim']());return _0x185a1f[_0xb5e3c7(0x142)]||_0x185a1f[_0xb5e3c7(0x162)]||_0xb5e3c7(0x15a);}});return _0x3f9c8b[_0x493d7b(0x160)]();}export async function promptAppSelection(_0x2b01ff){const _0x1b0c97=a45_0x3cc9,_0x34d70c=[{'name':a45_0x322c94['yellow']('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0x2b01ff[_0x1b0c97(0x144)]((_0x4f3f65,_0x4e344b)=>({'name':_0x4f3f65['appName']+'\x20\x20'+a45_0x322c94[_0x1b0c97(0x145)]('('+_0x4f3f65[_0x1b0c97(0x14c)]+')'),'value':_0x4e344b}))],_0x262ea9=await checkbox({'message':_0x1b0c97(0x15d)+a45_0x322c94[_0x1b0c97(0x13d)](_0x2b01ff[_0x1b0c97(0x159)])+_0x1b0c97(0x15f),'choices':_0x34d70c,'loop':![]});if(_0x262ea9[_0x1b0c97(0x141)](-0x1))return _0x1b0c97(0x150);if(_0x262ea9[_0x1b0c97(0x159)]===0x0)return _0x1b0c97(0x150);return _0x262ea9[_0x1b0c97(0x144)](_0x5ce8ab=>_0x2b01ff[_0x5ce8ab]);}export async function promptSingleAppSelection(_0x5b6925){const _0x21c685=a45_0x3cc9,_0x518f75=[{'name':a45_0x322c94['gray'](_0x21c685(0x153)),'value':_0x21c685(0x155)},{'name':a45_0x322c94[_0x21c685(0x143)](_0x21c685(0x14a)),'value':_0x21c685(0x150)},..._0x5b6925[_0x21c685(0x144)](_0x32be7a=>({'name':_0x32be7a['appName']+'\x20\x20'+a45_0x322c94[_0x21c685(0x145)]('('+_0x32be7a[_0x21c685(0x14c)]+')'),'value':_0x32be7a[_0x21c685(0x14c)]}))],_0x79e029=await select({'message':_0x21c685(0x161),'choices':_0x518f75});if(_0x79e029===_0x21c685(0x155))return'skip';if(_0x79e029===_0x21c685(0x150))return _0x21c685(0x150);return _0x5b6925[_0x21c685(0x13c)](_0x2cdd7f=>_0x2cdd7f[_0x21c685(0x14c)]===_0x79e029);}function a45_0x5f85(){const _0x383718=['includes','valid','yellow','map','gray','✎\x20手动输入','3286800fGEKfx','419440YVAjay','请输入\x20App\x20Code:','✎\x20自定义输入\x20appcode','9wVEWLA','appCode','8tURwcq','\x0a无法获取远程应用列表,请手动输入。','1302710rmQFzm','custom','14EfzxQr','无法获取远程应用列表,请手动输入。','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','86053nrnkRw','skip','679533ANiGmC','正在获取可用应用列表...','6238176JwgiPo','length','Invalid\x20App\x20Code','(跳过,稍后配置)','manual','获取到\x20','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','trim','请选择要绑定的应用:','message','find','cyan','\x20\x20(','\x0a未找到可用应用。','1101426iayxpH'];a45_0x5f85=function(){return _0x383718;};return a45_0x5f85();}export async function selectSingleAppcode(_0x4f807b){const _0x5d3188=a45_0x3cc9;if(!_0x4f807b)return writeCliSideChannelLine(a45_0x322c94[_0x5d3188(0x145)](_0x5d3188(0x15e))),_fallbackOrSkip();writeCliSideChannelLine(_0x5d3188(0x157));let _0x18a0fd;try{_0x18a0fd=await withActiveCookie(_0x4f807b,()=>listRemoteApps());}catch(_0x22c60c){writeCliSideChannelLine(a45_0x322c94[_0x5d3188(0x143)](_0x5d3188(0x152)));if(_0x22c60c instanceof Error)writeCliSideChannelLine(a45_0x322c94['gray'](_0x5d3188(0x13e)+_0x22c60c['message']+')'));return _fallbackOrSkip();}if(_0x18a0fd[_0x5d3188(0x159)]===0x0)return writeCliSideChannelLine(a45_0x322c94[_0x5d3188(0x143)]('未找到可用应用。')),_fallbackOrSkip();const _0x3b3017=await promptSingleAppSelection(_0x18a0fd);if(_0x3b3017==='skip')return'';if(_0x3b3017===_0x5d3188(0x150))return promptCustomAppcode();return _0x3b3017[_0x5d3188(0x14c)];}export async function selectMultipleApps(_0x3a4ba2){const _0x99df1=a45_0x3cc9;writeCliSideChannelLine(_0x99df1(0x157));let _0x58cccd;try{_0x58cccd=await withActiveCookie(_0x3a4ba2,()=>listRemoteApps());}catch(_0x1ae06a){writeCliSideChannelLine(_0x99df1(0x14e));if(_0x1ae06a instanceof Error)writeCliSideChannelLine(_0x99df1(0x13e)+_0x1ae06a[_0x99df1(0x162)]+')');return _0x99df1(0x150);}if(_0x58cccd[_0x99df1(0x159)]===0x0)return writeCliSideChannelLine(_0x99df1(0x13f)),_0x99df1(0x150);return promptAppSelection(_0x58cccd);}async function _fallbackOrSkip(){const _0x1f4b66=a45_0x3cc9,_0x98584d=await select({'message':'App\x20Code:','choices':[{'name':a45_0x322c94[_0x1f4b66(0x145)](_0x1f4b66(0x15b)),'value':_0x1f4b66(0x155)},{'name':a45_0x322c94[_0x1f4b66(0x143)](_0x1f4b66(0x146)),'value':_0x1f4b66(0x15c)}]});if(_0x98584d==='skip')return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a46_0x48ef(_0x28a8f8,_0x34110c){_0x28a8f8=_0x28a8f8-0x175;var _0x2d8a33=a46_0x2d8a();var _0x48ef1e=_0x2d8a33[_0x28a8f8];return _0x48ef1e;}(function(_0x2f9783,_0x2f698a){var _0x22d085=a46_0x48ef,_0x17d214=_0x2f9783();while(!![]){try{var _0x222200=-parseInt(_0x22d085(0x17c))/0x1*(parseInt(_0x22d085(0x17d))/0x2)+parseInt(_0x22d085(0x17e))/0x3*(parseInt(_0x22d085(0x183))/0x4)+parseInt(_0x22d085(0x184))/0x5*(-parseInt(_0x22d085(0x179))/0x6)+-parseInt(_0x22d085(0x180))/0x7*(-parseInt(_0x22d085(0x17f))/0x8)+-parseInt(_0x22d085(0x182))/0x9*(parseInt(_0x22d085(0x177))/0xa)+-parseInt(_0x22d085(0x17b))/0xb+parseInt(_0x22d085(0x178))/0xc*(parseInt(_0x22d085(0x176))/0xd);if(_0x222200===_0x2f698a)break;else _0x17d214['push'](_0x17d214['shift']());}catch(_0x18058d){_0x17d214['push'](_0x17d214['shift']());}}}(a46_0x2d8a,0x9faf7));function a46_0x2d8a(){var _0x4166f3=['12CNeado','46906KDhuna','63483qwxlRJ','16eFSUfV','4528734XPwcfS','method','261ldtMIN','164JzVbKD','515BollCn','url','1472471fgqlgq','145130cwABwI','132qaieCO','46278RCwGFM','description','13823029AyHzzM'];a46_0x2d8a=function(){return _0x4166f3;};return a46_0x2d8a();}export function asDryRunResult(_0x3be662,_0x53e62b){var _0x3a344a=a46_0x48ef;return Object['defineProperties'](_0x3be662,{'method':{'value':_0x53e62b[_0x3a344a(0x181)],'enumerable':![]},'url':{'value':_0x53e62b[_0x3a344a(0x175)],'enumerable':![]},..._0x53e62b[_0x3a344a(0x17a)]?{'description':{'value':_0x53e62b[_0x3a344a(0x17a)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x3da693=a47_0x18a0;(function(_0x42da7f,_0x52b6ae){const _0x83ac20=a47_0x18a0,_0x4042b3=_0x42da7f();while(!![]){try{const _0x2c3066=-parseInt(_0x83ac20(0x95))/0x1+parseInt(_0x83ac20(0x89))/0x2*(-parseInt(_0x83ac20(0x9d))/0x3)+parseInt(_0x83ac20(0x8b))/0x4*(parseInt(_0x83ac20(0x93))/0x5)+-parseInt(_0x83ac20(0xa0))/0x6*(parseInt(_0x83ac20(0xa2))/0x7)+parseInt(_0x83ac20(0x9e))/0x8*(-parseInt(_0x83ac20(0x8e))/0x9)+parseInt(_0x83ac20(0x9b))/0xa+-parseInt(_0x83ac20(0x8d))/0xb*(-parseInt(_0x83ac20(0x92))/0xc);if(_0x2c3066===_0x52b6ae)break;else _0x4042b3['push'](_0x4042b3['shift']());}catch(_0x323f77){_0x4042b3['push'](_0x4042b3['shift']());}}}(a47_0x6f29,0x4a5b6));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a47_0x3da693(0x88)};export const CODE_FLAG={'name':a47_0x3da693(0x98),'type':a47_0x3da693(0x8a),'required':!![],'description':a47_0x3da693(0x8f),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};function a47_0x6f29(){const _0x45259b=['sqlcode','43080PPuGCw','25WkKWla','datasetcode','281227drHSSY','dbtype','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','code','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','Database\x20product\x20type','2786250JJNtLl','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','1101oLAjRz','376UegbzV','POSTGRESQL','1154214QFaAuK','App\x20code\x20(e.g.\x20app-xxxxx)','7OILBwz','number','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','1132PhANPy','string','312972QkdeDl','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','1331NNtGhn','22662PYrlSy','Dataset\x20code\x20(32-char\x20hex\x20UUID)','MYSQL'];a47_0x6f29=function(){return _0x45259b;};return a47_0x6f29();}export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x3da693(0x94),'description':a47_0x3da693(0x8f)};export const SQLCODE_FLAG={'name':a47_0x3da693(0x91),'type':a47_0x3da693(0x8a),'required':!![],'description':a47_0x3da693(0x99),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a47_0x3da693(0x97)}};export const APPCODE_FLAG_OPTIONAL={'name':'appcode','type':a47_0x3da693(0x8a),'required':![],'description':a47_0x3da693(0x9c)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x3da693(0xa1)};function a47_0x18a0(_0x36e1b2,_0x458b8e){_0x36e1b2=_0x36e1b2-0x87;const _0x6f2918=a47_0x6f29();let _0x18a0e3=_0x6f2918[_0x36e1b2];return _0x18a0e3;}export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x3da693(0x87),'required':!![],'description':a47_0x3da693(0x8c)};export const DB_TYPE_FLAG={'name':a47_0x3da693(0x96),'type':'string','required':!![],'description':a47_0x3da693(0x9a),'enum':[a47_0x3da693(0x90),a47_0x3da693(0x9f)]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a48_0x16ca(){const _0x413e2e=['10boOfri','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','isFile','File\x20is\x20not\x20a\x20regular\x20file:\x20','2262750oxAbWt','4jgeUBd','\x20MB','validation','1968014feEdSL','52QaGHQo','8176836kAHezm','ceil','1QjIsjZ','11005258luhCdO','size','4605921wzOiQa','5526038jneKIo','6sfEUFA','trim','654590PHobcA','8vIjqTU','toFixed'];a48_0x16ca=function(){return _0x413e2e;};return a48_0x16ca();}(function(_0x490322,_0x525a8b){const _0x1478d1=a48_0x3247,_0x2960a8=_0x490322();while(!![]){try{const _0x1b4ffa=-parseInt(_0x1478d1(0x152))/0x1*(-parseInt(_0x1478d1(0x164))/0x2)+-parseInt(_0x1478d1(0x160))/0x3+parseInt(_0x1478d1(0x161))/0x4*(parseInt(_0x1478d1(0x159))/0x5)+parseInt(_0x1478d1(0x157))/0x6*(-parseInt(_0x1478d1(0x156))/0x7)+-parseInt(_0x1478d1(0x15a))/0x8*(parseInt(_0x1478d1(0x155))/0x9)+parseInt(_0x1478d1(0x15c))/0xa*(-parseInt(_0x1478d1(0x153))/0xb)+-parseInt(_0x1478d1(0x166))/0xc*(-parseInt(_0x1478d1(0x165))/0xd);if(_0x1b4ffa===_0x525a8b)break;else _0x2960a8['push'](_0x2960a8['shift']());}catch(_0x44b036){_0x2960a8['push'](_0x2960a8['shift']());}}}(a48_0x16ca,0xbf8de));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a48_0x3247(_0x5d489c,_0x13c930){_0x5d489c=_0x5d489c-0x152;const _0x16ca03=a48_0x16ca();let _0x324783=_0x16ca03[_0x5d489c];return _0x324783;}function formatBytes(_0x1c111a){const _0x2eedf0=a48_0x3247;if(_0x1c111a>=BYTES_PER_MB){const _0x140326=Math[_0x2eedf0(0x167)](_0x1c111a/BYTES_PER_MB*0x64)/0x64;return _0x140326[_0x2eedf0(0x15b)](0x2)+_0x2eedf0(0x162);}return _0x1c111a+'\x20B';}export function requireDevelopmentUploadFile(_0x541fe1,_0x1c01a7){const _0x2d8ef7=a48_0x3247,_0xa061c8=_0x541fe1[_0x2d8ef7(0x158)]();if(!_0xa061c8)throw CliErrors['validation'](_0x1c01a7+'\x20path\x20is\x20required.');if(!existsSync(_0xa061c8))throw CliErrors['validation']('File\x20not\x20found:\x20'+_0xa061c8);const _0x315271=statSync(_0xa061c8);if(!_0x315271[_0x2d8ef7(0x15e)]())throw CliErrors[_0x2d8ef7(0x163)](_0x2d8ef7(0x15f)+_0xa061c8);if(_0x315271[_0x2d8ef7(0x154)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x2d8ef7(0x163)](_0x2d8ef7(0x15d)+_0xa061c8+'\x20('+formatBytes(_0x315271[_0x2d8ef7(0x154)])+')');return{'path':_0xa061c8,'size':_0x315271['size']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a49_0xbd87(_0x32268c,_0x5613f3){_0x32268c=_0x32268c-0x1a3;const _0x5eb808=a49_0x5eb8();let _0xbd879=_0x5eb808[_0x32268c];return _0xbd879;}(function(_0x293593,_0x1072e5){const _0x5dc070=a49_0xbd87,_0x34fbff=_0x293593();while(!![]){try{const _0x5b7365=-parseInt(_0x5dc070(0x1a4))/0x1*(parseInt(_0x5dc070(0x1a6))/0x2)+parseInt(_0x5dc070(0x1a9))/0x3+-parseInt(_0x5dc070(0x1a3))/0x4+parseInt(_0x5dc070(0x1ad))/0x5*(-parseInt(_0x5dc070(0x1a5))/0x6)+parseInt(_0x5dc070(0x1ae))/0x7+-parseInt(_0x5dc070(0x1af))/0x8+-parseInt(_0x5dc070(0x1ab))/0x9*(-parseInt(_0x5dc070(0x1a8))/0xa);if(_0x5b7365===_0x1072e5)break;else _0x34fbff['push'](_0x34fbff['shift']());}catch(_0x5325b7){_0x34fbff['push'](_0x34fbff['shift']());}}}(a49_0x5eb8,0x90acf));export function validateAppcode(_0x8745fb){const _0x59ac26=a49_0xbd87,_0x5a4f7e=_0x8745fb['trim']();if(!_0x5a4f7e)return{'valid':![],'message':_0x59ac26(0x1b0)};if(_0x5a4f7e[_0x59ac26(0x1a7)]>0x64)return{'valid':![],'message':_0x59ac26(0x1aa)};if(!/^[A-Za-z0-9_-]+$/[_0x59ac26(0x1b1)](_0x5a4f7e))return{'valid':![],'message':_0x59ac26(0x1ac)};return{'valid':!![]};}function a49_0x5eb8(){const _0x29e011=['16570iftJzy','7716772eJrqsb','937496CLumLx','App\x20Code\x20cannot\x20be\x20empty','test','4243096LOUxjW','13PEMDcP','1854PfkDkb','113998DpBRdm','length','19990UPmfya','3413451kdeKlN','App\x20Code\x20cannot\x20exceed\x20100\x20characters','5832WBvqld','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'];a49_0x5eb8=function(){return _0x29e011;};return a49_0x5eb8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x428f95=a50_0x45fa;(function(_0xc0d7b0,_0x470bb4){const _0x1b4c87=a50_0x45fa,_0x2fd3e8=_0xc0d7b0();while(!![]){try{const _0x2bbe05=parseInt(_0x1b4c87(0x105))/0x1+-parseInt(_0x1b4c87(0xf2))/0x2+-parseInt(_0x1b4c87(0xfb))/0x3+-parseInt(_0x1b4c87(0xfd))/0x4*(-parseInt(_0x1b4c87(0x101))/0x5)+parseInt(_0x1b4c87(0xf3))/0x6+parseInt(_0x1b4c87(0xf1))/0x7*(-parseInt(_0x1b4c87(0xf4))/0x8)+-parseInt(_0x1b4c87(0x104))/0x9*(parseInt(_0x1b4c87(0xf9))/0xa);if(_0x2bbe05===_0x470bb4)break;else _0x2fd3e8['push'](_0x2fd3e8['shift']());}catch(_0x54e1f2){_0x2fd3e8['push'](_0x2fd3e8['shift']());}}}(a50_0x3048,0x73ac9));function a50_0x3048(){const _0x316291=['app','270AxMXsF','validation','appcode','851139wSoJGX','256992YtLIcj','config','7AlVTDw','93928mwmMbT','3693090ryHOmM','6003496ivENED','Usage:\x20','\x20config\x20get\x20--key\x20<key>','Key\x20not\x20found:\x20','key','10eryzpm','Get\x20a\x20config\x20value\x20by\x20key','808128qVyxle','get','56492IIjDXt','string','Missing\x20key.'];a50_0x3048=function(){return _0x316291;};return a50_0x3048();}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';function a50_0x45fa(_0x1ac7ff,_0x4e9427){_0x1ac7ff=_0x1ac7ff-0xf0;const _0x304854=a50_0x3048();let _0x45fa47=_0x304854[_0x1ac7ff];return _0x45fa47;}async function execute(_0x9ac541){const _0x10c7de=a50_0x45fa,_0x2ad225=_0x9ac541['str'](_0x10c7de(0xf8));if(!_0x2ad225)throw CliErrors[_0x10c7de(0x102)](_0x10c7de(0xff),_0x10c7de(0xf5)+CLI_BIN_NAME+_0x10c7de(0xf6));const _0xb90cea=readConfig(),_0x542762=_0x2ad225===_0x10c7de(0x100)?_0x10c7de(0x103):_0x2ad225,_0x49e04c=_0xb90cea[_0x542762];if(_0x49e04c===undefined)throw CliErrors[_0x10c7de(0x102)](_0x10c7de(0xf7)+_0x2ad225);return{'ok':!![],'data':typeof _0x49e04c==='object'?_0x49e04c:{[_0x542762]:_0x49e04c},'message':typeof _0x49e04c==='object'?undefined:String(_0x49e04c)};}export const configGetDefinition={'service':a50_0x428f95(0xf0),'command':a50_0x428f95(0xfc),'description':a50_0x428f95(0xfa),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a50_0x428f95(0xfe),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a51_0x544c(_0x58042a,_0x22b239){_0x58042a=_0x58042a-0x112;const _0xa16577=a51_0xa165();let _0x544cdf=_0xa16577[_0x58042a];return _0x544cdf;}(function(_0x341f9f,_0x6bafc){const _0x7ed69c=a51_0x544c,_0x177e65=_0x341f9f();while(!![]){try{const _0x27e14d=-parseInt(_0x7ed69c(0x115))/0x1+-parseInt(_0x7ed69c(0x113))/0x2+parseInt(_0x7ed69c(0x11a))/0x3*(-parseInt(_0x7ed69c(0x116))/0x4)+parseInt(_0x7ed69c(0x117))/0x5+-parseInt(_0x7ed69c(0x11b))/0x6*(parseInt(_0x7ed69c(0x118))/0x7)+parseInt(_0x7ed69c(0x112))/0x8+parseInt(_0x7ed69c(0x119))/0x9*(parseInt(_0x7ed69c(0x114))/0xa);if(_0x27e14d===_0x6bafc)break;else _0x177e65['push'](_0x177e65['shift']());}catch(_0x39f13a){_0x177e65['push'](_0x177e65['shift']());}}}(a51_0xa165,0x7f1ba));import{configListDefinition}from'../../commands/config/list.js';function a51_0xa165(){const _0x1a77c0=['639361OslQyr','4wGyGkO','5099655hsQeOK','2213953hNVbRD','360CkwqPv','1187907fzspDj','6gellXH','7775536RhMRBi','269260DFaDxz','3750HOCQob'];a51_0xa165=function(){return _0x1a77c0;};return a51_0xa165();}import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a52_0x12b4(_0x9983d5,_0x3e2da8){_0x9983d5=_0x9983d5-0x1ce;const _0x48e470=a52_0x48e4();let _0x12b401=_0x48e470[_0x9983d5];return _0x12b401;}const a52_0x149b4c=a52_0x12b4;(function(_0x96379f,_0x397700){const _0x5df066=a52_0x12b4,_0x1892e1=_0x96379f();while(!![]){try{const _0x3d6fa6=-parseInt(_0x5df066(0x1cf))/0x1*(parseInt(_0x5df066(0x1d7))/0x2)+parseInt(_0x5df066(0x1d9))/0x3*(parseInt(_0x5df066(0x1d4))/0x4)+parseInt(_0x5df066(0x1d8))/0x5+-parseInt(_0x5df066(0x1d6))/0x6+-parseInt(_0x5df066(0x1da))/0x7*(-parseInt(_0x5df066(0x1ce))/0x8)+-parseInt(_0x5df066(0x1dd))/0x9+parseInt(_0x5df066(0x1df))/0xa*(parseInt(_0x5df066(0x1de))/0xb);if(_0x3d6fa6===_0x397700)break;else _0x1892e1['push'](_0x1892e1['shift']());}catch(_0x2876cf){_0x1892e1['push'](_0x1892e1['shift']());}}}(a52_0x48e4,0x52a82));import{readScopedConfig}from'../../commands/config/shared.js';function a52_0x48e4(){const _0x31b239=['config','2296770SxnHuN','26DBLfQT','1494490uNHiJk','383622UCqnHk','1629327DuxRYI','bool','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','5305977gBEOhq','714846ImYrcn','140OlrpZR','8VMDkVF','19879sJIVQJ','read','global','List\x20all\x20config\x20values','boolean','4lJbWAo'];a52_0x48e4=function(){return _0x31b239;};return a52_0x48e4();}import{readConfig}from'../../utils/config.js';async function execute(_0x403f84){const _0x5c2b26=a52_0x12b4,_0x277160=_0x403f84[_0x5c2b26(0x1db)](_0x5c2b26(0x1d1))?readScopedConfig(_0x5c2b26(0x1d1)):readConfig();return{'ok':!![],'data':_0x277160};}export const configListDefinition={'service':a52_0x149b4c(0x1d5),'command':'list','description':a52_0x149b4c(0x1d2),'risk':a52_0x149b4c(0x1d0),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x149b4c(0x1d1),'type':a52_0x149b4c(0x1d3),'description':a52_0x149b4c(0x1dc),'default':![]}],'execute':execute};
|