@lovrabet/rabetbase-cli 2.3.9-beta.3 → 2.3.10-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.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/delete.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.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/mutations.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/task/index.js +1 -1
- package/lib/commands/task/status.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-index-auditor.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/error-output.js +1 -1
- package/lib/framework/explicit-yes.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
|
+
function a36_0x29d7(_0x3df891,_0x4e3e12){_0x3df891=_0x3df891-0x18a;const _0x57190f=a36_0x5719();let _0x29d761=_0x57190f[_0x3df891];return _0x29d761;}const a36_0x39fde2=a36_0x29d7;(function(_0x4e8bd8,_0xf5ca66){const _0x12188f=a36_0x29d7,_0x375890=_0x4e8bd8();while(!![]){try{const _0x237e1f=-parseInt(_0x12188f(0x18e))/0x1*(-parseInt(_0x12188f(0x1be))/0x2)+-parseInt(_0x12188f(0x1b3))/0x3*(parseInt(_0x12188f(0x194))/0x4)+parseInt(_0x12188f(0x1b4))/0x5*(-parseInt(_0x12188f(0x1c2))/0x6)+parseInt(_0x12188f(0x18c))/0x7+parseInt(_0x12188f(0x1c7))/0x8*(parseInt(_0x12188f(0x1aa))/0x9)+parseInt(_0x12188f(0x1a8))/0xa*(parseInt(_0x12188f(0x19a))/0xb)+-parseInt(_0x12188f(0x1ab))/0xc*(-parseInt(_0x12188f(0x191))/0xd);if(_0x237e1f===_0xf5ca66)break;else _0x375890['push'](_0x375890['shift']());}catch(_0x3793b8){_0x375890['push'](_0x375890['shift']());}}}(a36_0x5719,0x7fb71));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':'bff','command':'pull','description':'Pull\x20remote\x20BFF\x20scripts\x20to\x20local','risk':a36_0x39fde2(0x18b),'flags':[{'name':a36_0x39fde2(0x19e),'type':'string','description':a36_0x39fde2(0x1ca),'enum':[a36_0x39fde2(0x1c9),'ENDPOINT','HOOK']},{'name':'force','type':a36_0x39fde2(0x199),'description':a36_0x39fde2(0x1bc)}],async 'dryRun'(_0xf6ec96){const _0x5c348a=a36_0x39fde2,_0x3c5ebe=loadBffProjectConfig(_0xf6ec96[_0x5c348a(0x1ac)]),_0x46da83=await readBffLockFile(_0x3c5ebe[_0x5c348a(0x1cd)]),{appLock:_0x544399}=ensureLockScope(_0x46da83??createEmptyBffLock(),_0xf6ec96[_0x5c348a(0x1ac)],_0x3c5ebe[_0x5c348a(0x1c1)],_0x5c348a(0x192)),_0x147edf=normalizeBffType(_0xf6ec96[_0x5c348a(0x1a1)](_0x5c348a(0x19e)))??undefined,_0xbe9ab4=buildDatasetCodeToAliasMap(_0xf6ec96[_0x5c348a(0x1b2)],_0xf6ec96['appCode']),[_0x1b93a2,_0x58c922]=await Promise[_0x5c348a(0x197)]([listBffScripts(_0xf6ec96['appCode'],_0x147edf),getBffScriptStatistics(_0xf6ec96[_0x5c348a(0x1ac)])]),_0xae0963=createHookLocationMap(_0x58c922),_0x1c19ee=[];for(const _0x40d786 of _0x1b93a2){const _0x1b2cc8=resolveRemoteScriptTarget(_0x3c5ebe,_0x40d786,_0xae0963,_0x544399[_0x5c348a(0x196)],_0xbe9ab4);if(!_0x1b2cc8){_0x1c19ee[_0x5c348a(0x1ce)]({'scriptType':_0x40d786['scriptType'],'functionName':_0x40d786['functionName']??'','status':_0x5c348a(0x1b6),'reason':'unresolvable\x20target\x20path'});continue;}const _0x368b8e=_0x544399[_0x5c348a(0x196)][_0x1b2cc8[_0x5c348a(0x1b0)]],_0x5366af=_0x40d786[_0x5c348a(0x1a6)]!=null?computeContentHash(_0x40d786[_0x5c348a(0x1a6)]):undefined,_0xc36009=await hasUnsyncedLocalChanges(_0x1b2cc8[_0x5c348a(0x1b8)],_0x368b8e,_0x5366af);_0x1c19ee[_0x5c348a(0x1ce)]({'lockKey':_0x1b2cc8['lockKey'],'filePath':_0x1b2cc8[_0x5c348a(0x1b8)],'remoteId':_0x40d786['id']??null,'status':_0xc36009?_0x5c348a(0x19f):_0x5c348a(0x1ba)});}return{'method':'GET','url':_0x5c348a(0x1a7)+_0xf6ec96['appCode']+(_0x147edf?'&type='+_0x147edf:''),'body':{'appCode':_0xf6ec96[_0x5c348a(0x1ac)],'filterType':_0x147edf??null,'files':_0x1c19ee},'description':_0x5c348a(0x190)+_0x1c19ee[_0x5c348a(0x1a9)]+_0x5c348a(0x195)};},async 'execute'(_0xf3b15d){const _0x35e2e0=a36_0x39fde2,_0x71cb6f=loadBffProjectConfig(_0xf3b15d[_0x35e2e0(0x1ac)]),_0x1a2836=await readBffLockFile(_0x71cb6f['lockFilePath']),{lockData:_0x5e7e1d,appLock:_0x47d33f}=ensureLockScope(_0x1a2836??createEmptyBffLock(),_0xf3b15d[_0x35e2e0(0x1ac)],_0x71cb6f['scriptsRoot'],_0x35e2e0(0x192)),_0x54b8f8=normalizeBffType(_0xf3b15d[_0x35e2e0(0x1a1)](_0x35e2e0(0x19e)))??undefined;if(_0xf3b15d[_0x35e2e0(0x1a1)]('type')&&!_0x54b8f8)throw CliErrors[_0x35e2e0(0x1b1)](_0x35e2e0(0x1a2));const [_0x46e598,_0x983a2]=await Promise[_0x35e2e0(0x197)]([listBffScripts(_0xf3b15d[_0x35e2e0(0x1ac)],_0x54b8f8),getBffScriptStatistics(_0xf3b15d['appCode'])]);if(_0x46e598[_0x35e2e0(0x1a9)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20BFF\x20scripts\x20found.'};const _0xc3550c=_0xf3b15d['bool']('force');if(_0xc3550c&&!_0xf3b15d[_0x35e2e0(0x1bf)]){const _0x26a157=await confirmForce();if(!_0x26a157)throw CliErrors[_0x35e2e0(0x1c0)](_0x35e2e0(0x1cc));}if(_0xc3550c&&_0xf3b15d['nonInteractive']){}const _0x4f95fe=buildDatasetCodeToAliasMap(_0xf3b15d[_0x35e2e0(0x1b2)],_0xf3b15d['appCode']),_0x59cc92=createHookLocationMap(_0x983a2),_0xdf2ba7=JSON[_0x35e2e0(0x1a3)](JSON['stringify'](_0x5e7e1d)),_0x12b75a=_0xf3b15d[_0x35e2e0(0x1ac)],_0x41f0fe=_0xdf2ba7[_0x35e2e0(0x1a4)][_0x12b75a];if(!_0x41f0fe)throw new Error(_0x35e2e0(0x1b5)+_0x12b75a+_0x35e2e0(0x1af));const _0x8f7d27=[],_0x5b93ad=[],_0xc08fb=[];for(const _0x468c71 of _0x46e598){const _0x4c9210=resolveRemoteScriptTarget(_0x71cb6f,_0x468c71,_0x59cc92,_0x47d33f[_0x35e2e0(0x196)],_0x4f95fe);if(!_0x4c9210){_0x5b93ad[_0x35e2e0(0x1ce)]({'lockKey':_0x468c71[_0x35e2e0(0x1bd)]+'/'+_0x468c71[_0x35e2e0(0x198)],'reason':'unresolvable\x20target\x20path'});continue;}const _0x2f4f08=_0x47d33f[_0x35e2e0(0x196)][_0x4c9210[_0x35e2e0(0x1b0)]];try{if(!_0x468c71['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x468c71[_0x35e2e0(0x1a6)]==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x1d8496=_0x468c71[_0x35e2e0(0x1a6)],_0x3f3132=computeContentHash(_0x1d8496);if(!_0xc3550c){const _0x5544d0=await hasUnsyncedLocalChanges(_0x4c9210[_0x35e2e0(0x1b8)],_0x2f4f08,_0x3f3132);if(_0x5544d0){_0x5b93ad[_0x35e2e0(0x1ce)]({'lockKey':_0x4c9210[_0x35e2e0(0x1b0)],'reason':_0x35e2e0(0x1cf)});continue;}}await ensureParentDirectory(_0x4c9210['filePath']),await writeFile(_0x4c9210[_0x35e2e0(0x1b8)],_0x1d8496,_0x35e2e0(0x1cb));const _0x40c7d1={'hash':_0x3f3132,'remoteId':_0x468c71['id'],'version':_0x468c71[_0x35e2e0(0x1c3)]};_0x4c9210['type']===_0x35e2e0(0x18d)&&_0x4c9210[_0x35e2e0(0x19b)]&&(_0x40c7d1[_0x35e2e0(0x1c4)]=_0x4c9210['hookLocation'][_0x35e2e0(0x1c4)],_0x40c7d1[_0x35e2e0(0x193)]=_0x4c9210[_0x35e2e0(0x19b)][_0x35e2e0(0x193)],_0x40c7d1[_0x35e2e0(0x1ae)]=_0x4c9210['hookLocation'][_0x35e2e0(0x1ae)],_0x40c7d1['functionNode']=_0x4c9210[_0x35e2e0(0x19b)]['functionNode']),_0x41f0fe[_0x35e2e0(0x196)][_0x4c9210[_0x35e2e0(0x1b0)]]=_0x40c7d1,_0x8f7d27[_0x35e2e0(0x1ce)]({'lockKey':_0x4c9210[_0x35e2e0(0x1b0)],'remoteId':_0x468c71['id']});}catch(_0x3f6710){_0xc08fb[_0x35e2e0(0x1ce)]({'lockKey':_0x4c9210['lockKey'],'error':_0x3f6710 instanceof Error?_0x3f6710[_0x35e2e0(0x1ad)]:String(_0x3f6710)});}}return _0x41f0fe[_0x35e2e0(0x1c5)]=new Date()[_0x35e2e0(0x18f)](),await writeBffLockFile(_0x71cb6f[_0x35e2e0(0x1cd)],_0xdf2ba7),{'ok':_0xc08fb['length']===0x0,'data':{'pulled':_0x8f7d27,'skipped':_0x5b93ad,'failed':_0xc08fb},'message':_0x35e2e0(0x1a5)+_0x8f7d27['length']+'\x20pulled,\x20'+_0x5b93ad[_0x35e2e0(0x1a9)]+_0x35e2e0(0x1c6)+_0xc08fb[_0x35e2e0(0x1a9)]+_0x35e2e0(0x1c8)};}};async function hasUnsyncedLocalChanges(_0x4b2c6d,_0x4914e1,_0x2dc270){if(!await fileExists(_0x4b2c6d))return![];const _0x492c82=await computeFileHash(_0x4b2c6d);if(!_0x4914e1)return _0x2dc270?_0x492c82!==_0x2dc270:!![];return _0x492c82!==_0x4914e1['hash'];}function buildDatasetCodeToAliasMap(_0x188d76,_0x374459){const _0x34cd20=a36_0x39fde2,_0x18dec6=loadAliasMap(_0x188d76,undefined,resolveApiFilePath(_0x188d76,_0x374459));return new Map(_0x18dec6[_0x34cd20(0x1b7)](_0x48644b=>[_0x48644b[_0x34cd20(0x193)],_0x48644b[_0x34cd20(0x1c4)]]));}async function confirmForce(){const _0x252e8f=a36_0x39fde2,_0x591795=createInterface({'input':process['stdin'],'output':process['stderr']}),_0x31b430=await new Promise(_0x4a9166=>{const _0x1b73af=a36_0x29d7;_0x591795['question'](_0x1b73af(0x1b9),_0x4a9166);});return _0x591795[_0x252e8f(0x1bb)](),['y',_0x252e8f(0x1a0)][_0x252e8f(0x18a)](_0x31b430[_0x252e8f(0x19d)]()[_0x252e8f(0x19c)]());}function a36_0x5719(){const _0x5a72a0=['\x20skipped,\x20','16veJWXh','\x20failed','COMMON','Pull\x20only\x20this\x20script\x20type','utf8','Force\x20pull\x20cancelled.','lockFilePath','push','local\x20unsynced\x20changes','includes','write','2354590NXjQYg','HOOK','4037KsgZIv','toISOString','Would\x20inspect\x20','26HcblqT','pull','datasetCode','8048SRuOzS','\x20remote\x20BFF\x20script(s)\x20for\x20pull','functions','all','functionName','boolean','66phmqfU','hookLocation','toLowerCase','trim','type','conflict','yes','str','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','parse','apps','Pull\x20complete:\x20','scriptContent','/api/management/library/scripts/list?appCode=','1593370msxAVa','length','692532xzypAx','638160ZrZHdr','appCode','message','operationType','\x22\x20not\x20found\x20after\x20ensureLockScope.','lockKey','validation','apiDir','1503AsVHOx','3035tTwYAa','Lock\x20scope\x20for\x20app\x20\x22','skipped','map','filePath','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','would_pull','close','Force\x20overwrite\x20local\x20unsynced\x20changes','scriptType','14AeLRcV','nonInteractive','cancelled','scriptsRoot','492ETmQZg','version','alias','lastSync'];a36_0x5719=function(){return _0x5a72a0;};return a36_0x5719();}
|
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a37_0x50ec(){const _0x48a89e=['330DLOile','str','Lock\x20scope\x20for\x20app\x20\x22','string','lockFilePath','\x22.\x20','39005KjlTKB','179753CcUJca','length','aliasToDatasetCode','bool','3867PlPYOZ','status','\x20uploaded,\x20','5135630PYnqJb','appCode','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','lockKey','alias','map','create',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','11SNXIcf','validation','code','ENDPOINT','remoteId','toISOString','scriptsRoot','message','hash','force','high-risk-write','has','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','2564pHrVAe','2177199HJWgVm','functions','Runtime\x20script\x20cache\x20cleared.','136YBlYjY','push','COMMON','functionNode','would_push','11HaKYia','script','Force\x20push\x20ignoring\x20hash\x20protection','Local\x20function\x20not\x20found:\x20','name','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','apiDir','attempted','filter','Run\x20`','runtime\x20cache\x20not\x20needed','description','values','HOOK','cleared','apps','/api/management/library/scripts/save','every','operationType','unchanged','join','Incomplete\x20HOOK\x20path:\x20','get','runtime\x20cache\x20cleared','type','filePath','195820MfOfSY','some','datasetCode','41740416wzuAtI','\x22\x20not\x20found\x20after\x20ensureLockScope.','version','lastSync','POST'];a37_0x50ec=function(){return _0x48a89e;};return a37_0x50ec();}const a37_0x2db80b=a37_0x1517;(function(_0x1ef2bf,_0x17c87e){const _0x485f0a=a37_0x1517,_0x5c3e55=_0x1ef2bf();while(!![]){try{const _0x22653f=parseInt(_0x485f0a(0xc7))/0x1*(-parseInt(_0x485f0a(0xa9))/0x2)+-parseInt(_0x485f0a(0xbc))/0x3*(parseInt(_0x485f0a(0x86))/0x4)+-parseInt(_0x485f0a(0xb7))/0x5*(parseInt(_0x485f0a(0xb1))/0x6)+-parseInt(_0x485f0a(0xb8))/0x7*(-parseInt(_0x485f0a(0x8a))/0x8)+-parseInt(_0x485f0a(0x87))/0x9+-parseInt(_0x485f0a(0xbf))/0xa*(parseInt(_0x485f0a(0x8f))/0xb)+parseInt(_0x485f0a(0xac))/0xc;if(_0x22653f===_0x17c87e)break;else _0x5c3e55['push'](_0x5c3e55['shift']());}catch(_0x30b8c1){_0x5c3e55['push'](_0x5c3e55['shift']());}}}(a37_0x50ec,0xc9ef3));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';function a37_0x1517(_0x186dc8,_0x28df3b){_0x186dc8=_0x186dc8-0x81;const _0x50ec2c=a37_0x50ec();let _0x1517cd=_0x50ec2c[_0x186dc8];return _0x1517cd;}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':'bff','command':a37_0x2db80b(0x8b),'description':'Push\x20local\x20BFF\x20scripts\x20to\x20remote','risk':a37_0x2db80b(0x83),'flags':[{'name':'type','type':a37_0x2db80b(0xb4),'description':'Push\x20only\x20this\x20script\x20type','enum':[a37_0x2db80b(0x8c),a37_0x2db80b(0xca),a37_0x2db80b(0x9c)]},{'name':'name','type':a37_0x2db80b(0xb4),'description':a37_0x2db80b(0x94)},{'name':a37_0x2db80b(0x82),'type':'boolean','description':a37_0x2db80b(0x91)}],async 'dryRun'(_0x2a9f3e){const _0x5dc9a5=a37_0x2db80b,_0x48f7f2=loadBffProjectConfig(_0x2a9f3e[_0x5dc9a5(0xc0)]),_0x177ff3=await readBffLockFile(_0x48f7f2[_0x5dc9a5(0xb5)]),{appLock:_0x41c4d3}=ensureLockScope(_0x177ff3??createEmptyBffLock(),_0x2a9f3e['appCode'],_0x48f7f2[_0x5dc9a5(0xcd)],_0x5dc9a5(0x8b)),_0x3444eb=await getTargetFunctions(_0x48f7f2,_0x2a9f3e),_0x40e9d8=_0x2a9f3e['bool'](_0x5dc9a5(0x82)),_0xb6572d=[];for(const _0x44e05c of _0x3444eb){const _0x21801e=await computeFileHash(_0x44e05c[_0x5dc9a5(0xa8)]),_0x224629=_0x41c4d3['functions'][_0x44e05c[_0x5dc9a5(0xc2)]],_0x198efb=!!_0x224629&&_0x224629['hash']===_0x21801e;_0xb6572d[_0x5dc9a5(0x8b)]({'lockKey':_0x44e05c[_0x5dc9a5(0xc2)],'filePath':_0x44e05c[_0x5dc9a5(0xa8)],'remoteId':_0x224629?.['remoteId']??null,'mode':_0x224629?.[_0x5dc9a5(0xcb)]?'update':_0x5dc9a5(0xc5),'status':!_0x40e9d8&&_0x198efb?_0x5dc9a5(0xa2):_0x5dc9a5(0x8e)});}return{'method':_0x5dc9a5(0xb0),'url':_0x5dc9a5(0x9f),'body':{'appCode':_0x2a9f3e[_0x5dc9a5(0xc0)],'force':_0x40e9d8,'files':_0xb6572d,'cacheClearAtRuntime':_0xb6572d[_0x5dc9a5(0xaa)](_0x2357b5=>_0x2357b5[_0x5dc9a5(0xbd)]===_0x5dc9a5(0x8e)),'cacheClearAtRuntimeTimes':_0xb6572d['some'](_0x3f1297=>_0x3f1297['status']===_0x5dc9a5(0x8e))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0xb6572d['length']+_0x5dc9a5(0xc1)};},async 'execute'(_0x47f820){const _0x34f7af=a37_0x2db80b,_0x935a1a=loadBffProjectConfig(_0x47f820['appCode']),_0x135c13=await readBffLockFile(_0x935a1a[_0x34f7af(0xb5)]),{lockData:_0x57789b,appLock:_0x531b5b}=ensureLockScope(_0x135c13??createEmptyBffLock(),_0x47f820['appCode'],_0x935a1a[_0x34f7af(0xcd)],_0x34f7af(0x8b)),_0x29a8a9=await getTargetFunctions(_0x935a1a,_0x47f820);if(_0x29a8a9[_0x34f7af(0xb9)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x1cbc17=_0x47f820[_0x34f7af(0xbb)]('force'),_0x2a4e75=JSON['parse'](JSON['stringify'](_0x57789b)),_0x445237=_0x2a4e75[_0x34f7af(0x9e)][_0x47f820[_0x34f7af(0xc0)]];if(!_0x445237)throw new Error(_0x34f7af(0xb3)+_0x47f820[_0x34f7af(0xc0)]+_0x34f7af(0xad));const _0x1b416a=await buildHookMaps(_0x47f820[_0x34f7af(0xc0)],_0x47f820[_0x34f7af(0x95)],_0x29a8a9,_0x445237),_0x2c50fc=[],_0x2b22a7=[],_0x46d94d=[];for(const _0x46a053 of _0x29a8a9){const _0xe86d76=await computeFileHash(_0x46a053['filePath']),_0x23a65b=_0x445237[_0x34f7af(0x88)][_0x46a053[_0x34f7af(0xc2)]];if(!_0x1cbc17&&_0x23a65b&&_0x23a65b[_0x34f7af(0x81)]===_0xe86d76){_0x2b22a7['push']({'lockKey':_0x46a053[_0x34f7af(0xc2)],'reason':_0x34f7af(0xa2)});continue;}try{await uploadSingleFunction(_0x47f820[_0x34f7af(0xc0)],_0x46a053,_0x445237,_0x1b416a);const _0x4bc7de=_0x445237[_0x34f7af(0x88)][_0x46a053[_0x34f7af(0xc2)]];_0x2c50fc[_0x34f7af(0x8b)]({'lockKey':_0x46a053[_0x34f7af(0xc2)],'remoteId':_0x4bc7de?.[_0x34f7af(0xcb)]??0x0});}catch(_0x408569){_0x46d94d[_0x34f7af(0x8b)]({'lockKey':_0x46a053[_0x34f7af(0xc2)],'error':_0x408569 instanceof Error?_0x408569['message']:String(_0x408569)});}}_0x445237[_0x34f7af(0xaf)]=new Date()[_0x34f7af(0xcc)](),await writeBffLockFile(_0x935a1a[_0x34f7af(0xb5)],_0x2a4e75),await waitForUploadedLockEntries(_0x935a1a[_0x34f7af(0xb5)],_0x47f820[_0x34f7af(0xc0)],_0x2c50fc[_0x34f7af(0xc4)](_0x5db919=>_0x5db919[_0x34f7af(0xc2)]));let _0x27e442={'attempted':![],'cleared':![]};if(_0x2c50fc['length']>0x0)try{let _0x4357aa='';for(let _0x50121b=0x0;_0x50121b<CACHE_CLEAR_ATTEMPTS;_0x50121b+=0x1){_0x4357aa=await clearBffScriptCache(),_0x50121b<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x27e442={'attempted':!![],'cleared':!![],'message':_0x4357aa||_0x34f7af(0x89)};}catch(_0x282646){_0x27e442={'attempted':!![],'cleared':![],'error':_0x282646 instanceof Error?_0x282646[_0x34f7af(0xce)]:String(_0x282646)};}const _0x1dd897=_0x46d94d[_0x34f7af(0xb9)]===0x0&&(_0x27e442[_0x34f7af(0x96)]?_0x27e442[_0x34f7af(0x9d)]:!![]),_0x27f7ab=_0x27e442['attempted']?_0x27e442[_0x34f7af(0x9d)]?_0x34f7af(0xa6):'runtime\x20cache\x20clear\x20failed':_0x34f7af(0x99);return{'ok':_0x1dd897,'data':{'uploaded':_0x2c50fc,'skipped':_0x2b22a7,'failed':_0x46d94d,'cacheClear':_0x27e442},'message':'Push\x20complete:\x20'+_0x2c50fc['length']+_0x34f7af(0xbe)+_0x2b22a7['length']+'\x20skipped,\x20'+_0x46d94d[_0x34f7af(0xb9)]+'\x20failed,\x20'+_0x27f7ab};}};async function getTargetFunctions(_0x579af6,_0xff51c1){const _0x4a5b37=a37_0x2db80b,_0x1fa441=_0xff51c1[_0x4a5b37(0xb2)](_0x4a5b37(0xa7)),_0x4eeb42=_0xff51c1[_0x4a5b37(0xb2)](_0x4a5b37(0x93)),_0x45cc93=normalizeBffType(_0x1fa441)??undefined;if(_0x4eeb42&&!_0x45cc93)throw CliErrors[_0x4a5b37(0xc8)](_0x4a5b37(0x85));const _0x485c77=await scanLocalBffFunctions(_0x579af6,_0x45cc93);if(_0x4eeb42){const _0x33468e=_0x485c77[_0x4a5b37(0x97)](_0x3ae0e9=>_0x3ae0e9[_0x4a5b37(0x93)]===_0x4eeb42);if(_0x33468e[_0x4a5b37(0xb9)]===0x0)throw CliErrors[_0x4a5b37(0xc8)](_0x4a5b37(0x92)+_0x45cc93+'/'+_0x4eeb42);return _0x33468e;}return _0x485c77;}async function buildHookMaps(_0x5c0e58,_0x2887e5,_0x2360ec,_0x585d16){const _0x50741c=a37_0x2db80b,_0x22312f=_0x2360ec[_0x50741c(0xaa)](_0x54912f=>_0x54912f[_0x50741c(0xa7)]==='HOOK');if(!_0x22312f)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x39583a=loadAliasMap(_0x2887e5,undefined,resolveApiFilePath(_0x2887e5,_0x5c0e58)),_0x1906f9=new Map(_0x39583a[_0x50741c(0xc4)](_0x17b449=>[_0x17b449[_0x50741c(0xc3)],_0x17b449[_0x50741c(0xab)]]));for(const _0x772d55 of Object[_0x50741c(0x9b)](_0x585d16['functions'])){_0x772d55[_0x50741c(0xc3)]&&_0x772d55['datasetCode']&&!_0x1906f9[_0x50741c(0x84)](_0x772d55['alias'])&&_0x1906f9['set'](_0x772d55[_0x50741c(0xc3)],_0x772d55[_0x50741c(0xab)]);}const _0x15bed9=await listDatasets(_0x5c0e58),_0x5f362c=new Map(_0x15bed9[_0x50741c(0xc4)](_0x135afe=>[_0x135afe[_0x50741c(0xc9)],_0x135afe]));return{'aliasToDatasetCode':_0x1906f9,'datasetCodeToDataset':_0x5f362c};}async function uploadSingleFunction(_0x575de3,_0x41ff5b,_0x395fb6,_0x116204){const _0x18e600=a37_0x2db80b,_0x1294a2=await readFile(_0x41ff5b['filePath'],'utf8'),_0x318107=await computeFileHash(_0x41ff5b[_0x18e600(0xa8)]),_0x53fea2=_0x395fb6[_0x18e600(0x88)][_0x41ff5b[_0x18e600(0xc2)]];if(_0x53fea2?.[_0x18e600(0xcb)]&&_0x53fea2[_0x18e600(0xae)]==null)throw CliErrors[_0x18e600(0xc8)](_0x41ff5b['lockKey']+_0x18e600(0xc6));let _0x33ed75=extractScriptDescription(_0x1294a2);if(!_0x33ed75&&_0x53fea2?.[_0x18e600(0xcb)]){const _0x113aa1=await getBffScriptInfo(_0x53fea2[_0x18e600(0xcb)]);_0x33ed75=_0x113aa1[_0x18e600(0x9a)]||undefined;}const _0x58ece7={'appCode':_0x575de3,'functionName':_0x41ff5b['name'],'scriptType':_0x41ff5b[_0x18e600(0xa7)],'scriptContent':_0x1294a2};if(_0x53fea2?.[_0x18e600(0xcb)])_0x58ece7['id']=_0x53fea2[_0x18e600(0xcb)];if(_0x53fea2?.[_0x18e600(0xae)]!=null)_0x58ece7[_0x18e600(0xae)]=_0x53fea2[_0x18e600(0xae)];if(_0x33ed75)_0x58ece7['description']=_0x33ed75;if(_0x41ff5b[_0x18e600(0xa7)]==='HOOK'){const _0x1423bc=_0x41ff5b['alias'];if(!_0x1423bc||!_0x41ff5b[_0x18e600(0xa1)]||!_0x41ff5b[_0x18e600(0x8d)])throw CliErrors['validation'](_0x18e600(0xa4)+_0x41ff5b[_0x18e600(0xc2)]);const _0x4c3b48=_0x116204['aliasToDatasetCode']['get'](_0x1423bc)??_0x53fea2?.[_0x18e600(0xab)]??_0x1423bc,_0x1dd0f6=_0x116204['datasetCodeToDataset']['get'](_0x4c3b48);if(!_0x1dd0f6)throw CliErrors[_0x18e600(0xc8)]('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x1423bc+_0x18e600(0xb6)+(_0x18e600(0x98)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x58ece7['datasetId']=_0x1dd0f6['id'],_0x58ece7[_0x18e600(0xa1)]=_0x41ff5b['operationType'],_0x58ece7['functionNode']=_0x41ff5b[_0x18e600(0x8d)];}const _0x2c1cf1=await saveBffScript(_0x58ece7),_0x3d41a5=_0x2c1cf1['id'],_0xda253d=_0x2c1cf1[_0x18e600(0x90)]??await getBffScriptInfo(_0x3d41a5),_0x208ef1={'hash':_0x318107,'remoteId':_0x3d41a5,'version':_0xda253d[_0x18e600(0xae)]};if(_0x41ff5b['type']===_0x18e600(0x9c)){const _0x59bc1a=_0x41ff5b['alias'],_0x5558ac=_0x116204[_0x18e600(0xba)][_0x18e600(0xa5)](_0x59bc1a)??_0x53fea2?.[_0x18e600(0xab)]??_0x59bc1a;_0x116204[_0x18e600(0xba)][_0x18e600(0x84)](_0x59bc1a)?_0x208ef1[_0x18e600(0xc3)]=_0x59bc1a:_0x208ef1[_0x18e600(0xc3)]=_0x53fea2?.[_0x18e600(0xc3)],_0x208ef1[_0x18e600(0xab)]=_0x5558ac,_0x208ef1['operationType']=_0x41ff5b['operationType'],_0x208ef1[_0x18e600(0x8d)]=_0x41ff5b[_0x18e600(0x8d)];}_0x395fb6[_0x18e600(0x88)][_0x41ff5b['lockKey']]=_0x208ef1;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0xf71b39,_0x37cb17,_0x5bc3e2){const _0x3117e4=a37_0x2db80b;if(_0x5bc3e2[_0x3117e4(0xb9)]===0x0)return;for(let _0x1369cb=0x0;_0x1369cb<LOCK_SETTLE_RETRY_COUNT;_0x1369cb+=0x1){const _0x1921a0=await readBffLockFile(_0xf71b39),_0x417945=_0x1921a0?.[_0x3117e4(0x9e)]?.[_0x37cb17]?.[_0x3117e4(0x88)]??{},_0x1051b3=_0x5bc3e2[_0x3117e4(0xa0)](_0x2da66f=>!!_0x417945[_0x2da66f]?.['remoteId']);if(_0x1051b3)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x5bc3e2[_0x3117e4(0xa3)](',\x20')+'.');}
|
|
1
|
+
const a37_0x5a71af=a37_0x1584;(function(_0x4b8eef,_0x46e949){const _0x54e554=a37_0x1584,_0x1bfd56=_0x4b8eef();while(!![]){try{const _0xad450c=parseInt(_0x54e554(0x1b8))/0x1+-parseInt(_0x54e554(0x1f2))/0x2*(parseInt(_0x54e554(0x1cd))/0x3)+parseInt(_0x54e554(0x1db))/0x4*(parseInt(_0x54e554(0x1b5))/0x5)+-parseInt(_0x54e554(0x1b1))/0x6+-parseInt(_0x54e554(0x1be))/0x7+parseInt(_0x54e554(0x19d))/0x8+-parseInt(_0x54e554(0x1de))/0x9;if(_0xad450c===_0x46e949)break;else _0x1bfd56['push'](_0x1bfd56['shift']());}catch(_0x282a4c){_0x1bfd56['push'](_0x1bfd56['shift']());}}}(a37_0x2172,0x60303));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_0x2172(){const _0x361630=['582102XHhNXp','apiDir','runtime\x20cache\x20clear\x20failed','create','POST','Push\x20complete:\x20','1638336PvJjCm','filter','validation','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','status','aliasToDatasetCode','lockKey','map','HOOK','Force\x20push\x20ignoring\x20hash\x20protection','set','lockFilePath','bff','/api/management/library/scripts/save','get','147lVlCTi','Runtime\x20script\x20cache\x20cleared.','string','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','runtime\x20cache\x20not\x20needed','code','high-risk-write','has','length','COMMON','\x22\x20not\x20found\x20after\x20ensureLockScope.','boolean','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','hash','16KcrwJC','attempted','push','288999JAhLwg','str','operationType','Would\x20inspect\x20','join','\x20skipped,\x20','cleared','unchanged','remoteId','stringify','update','some','Incomplete\x20HOOK\x20path:\x20','type','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','every','apps','message','Local\x20function\x20not\x20found:\x20','utf8','27986ZFLDXl','name','1989128OufLGT','functionNode','datasetCode','force','ENDPOINT','filePath','datasetCodeToDataset','Run\x20`','scriptsRoot','version','alias','\x20uploaded,\x20','description',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','bool','functions','values','would_push','No\x20local\x20BFF\x20functions\x20found.','Push\x20local\x20BFF\x20scripts\x20to\x20remote','1157088idIfLj','\x20failed,\x20','datasetId','\x22.\x20','884885LzzjIO','runtime\x20cache\x20cleared','appCode'];a37_0x2172=function(){return _0x361630;};return a37_0x2172();}import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';function a37_0x1584(_0x259b21,_0x109b6c){_0x259b21=_0x259b21-0x19c;const _0x217292=a37_0x2172();let _0x15842f=_0x217292[_0x259b21];return _0x15842f;}import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a37_0x5a71af(0x1ca),'command':a37_0x5a71af(0x1dd),'description':a37_0x5a71af(0x1b0),'risk':a37_0x5a71af(0x1d3),'flags':[{'name':'type','type':a37_0x5a71af(0x1cf),'description':'Push\x20only\x20this\x20script\x20type','enum':[a37_0x5a71af(0x1d6),a37_0x5a71af(0x1a1),a37_0x5a71af(0x1c6)]},{'name':'name','type':a37_0x5a71af(0x1cf),'description':a37_0x5a71af(0x1c1)},{'name':'force','type':a37_0x5a71af(0x1d8),'description':a37_0x5a71af(0x1c7)}],async 'dryRun'(_0x5aef65){const _0x3eb5ce=a37_0x5a71af,_0x2c7a73=loadBffProjectConfig(_0x5aef65[_0x3eb5ce(0x1b7)]),_0x2d0ed9=await readBffLockFile(_0x2c7a73[_0x3eb5ce(0x1c9)]),{appLock:_0x2090e2}=ensureLockScope(_0x2d0ed9??createEmptyBffLock(),_0x5aef65[_0x3eb5ce(0x1b7)],_0x2c7a73[_0x3eb5ce(0x1a5)],_0x3eb5ce(0x1dd)),_0x2cab87=await getTargetFunctions(_0x2c7a73,_0x5aef65),_0x1eca2e=_0x5aef65[_0x3eb5ce(0x1ab)]('force'),_0x24482e=[];for(const _0x59a340 of _0x2cab87){const _0x3a7a95=await computeFileHash(_0x59a340[_0x3eb5ce(0x1a2)]),_0x33cb66=_0x2090e2[_0x3eb5ce(0x1ac)][_0x59a340['lockKey']],_0x76b636=!!_0x33cb66&&_0x33cb66[_0x3eb5ce(0x1da)]===_0x3a7a95;_0x24482e['push']({'lockKey':_0x59a340[_0x3eb5ce(0x1c4)],'filePath':_0x59a340[_0x3eb5ce(0x1a2)],'remoteId':_0x33cb66?.[_0x3eb5ce(0x1e6)]??null,'mode':_0x33cb66?.[_0x3eb5ce(0x1e6)]?_0x3eb5ce(0x1e8):_0x3eb5ce(0x1bb),'status':!_0x1eca2e&&_0x76b636?_0x3eb5ce(0x1e5):_0x3eb5ce(0x1ae)});}return{'method':_0x3eb5ce(0x1bc),'url':_0x3eb5ce(0x1cb),'body':{'appCode':_0x5aef65[_0x3eb5ce(0x1b7)],'force':_0x1eca2e,'files':_0x24482e,'cacheClearAtRuntime':_0x24482e[_0x3eb5ce(0x1e9)](_0x1b4418=>_0x1b4418[_0x3eb5ce(0x1c2)]==='would_push'),'cacheClearAtRuntimeTimes':_0x24482e[_0x3eb5ce(0x1e9)](_0x1d3a54=>_0x1d3a54['status']===_0x3eb5ce(0x1ae))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x3eb5ce(0x1e1)+_0x24482e[_0x3eb5ce(0x1d5)]+_0x3eb5ce(0x1d0)};},async 'execute'(_0x2ac521){const _0x4b0149=a37_0x5a71af,_0x3edb02=loadBffProjectConfig(_0x2ac521[_0x4b0149(0x1b7)]),_0x102bbe=await readBffLockFile(_0x3edb02[_0x4b0149(0x1c9)]),{lockData:_0x590d89,appLock:_0x40a949}=ensureLockScope(_0x102bbe??createEmptyBffLock(),_0x2ac521['appCode'],_0x3edb02[_0x4b0149(0x1a5)],_0x4b0149(0x1dd)),_0x26234d=await getTargetFunctions(_0x3edb02,_0x2ac521);if(_0x26234d['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x4b0149(0x1af)};const _0xfadad2=_0x2ac521[_0x4b0149(0x1ab)](_0x4b0149(0x1a0)),_0x501b36=JSON['parse'](JSON[_0x4b0149(0x1e7)](_0x590d89)),_0x4443d7=_0x501b36[_0x4b0149(0x1ee)][_0x2ac521[_0x4b0149(0x1b7)]];if(!_0x4443d7)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x2ac521[_0x4b0149(0x1b7)]+_0x4b0149(0x1d7));const _0x4b65fe=await buildHookMaps(_0x2ac521[_0x4b0149(0x1b7)],_0x2ac521[_0x4b0149(0x1b9)],_0x26234d,_0x4443d7),_0x3e00db=[],_0x8533ec=[],_0x49bc89=[];for(const _0x12a9ce of _0x26234d){const _0x5ea8ea=await computeFileHash(_0x12a9ce['filePath']),_0x523df=_0x4443d7[_0x4b0149(0x1ac)][_0x12a9ce[_0x4b0149(0x1c4)]];if(!_0xfadad2&&_0x523df&&_0x523df[_0x4b0149(0x1da)]===_0x5ea8ea){_0x8533ec[_0x4b0149(0x1dd)]({'lockKey':_0x12a9ce[_0x4b0149(0x1c4)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x2ac521[_0x4b0149(0x1b7)],_0x12a9ce,_0x4443d7,_0x4b65fe);const _0x30561a=_0x4443d7[_0x4b0149(0x1ac)][_0x12a9ce[_0x4b0149(0x1c4)]];_0x3e00db[_0x4b0149(0x1dd)]({'lockKey':_0x12a9ce[_0x4b0149(0x1c4)],'remoteId':_0x30561a?.[_0x4b0149(0x1e6)]??0x0});}catch(_0xea13fa){_0x49bc89['push']({'lockKey':_0x12a9ce['lockKey'],'error':_0xea13fa instanceof Error?_0xea13fa[_0x4b0149(0x1ef)]:String(_0xea13fa)});}}_0x4443d7['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x3edb02['lockFilePath'],_0x501b36),await waitForUploadedLockEntries(_0x3edb02[_0x4b0149(0x1c9)],_0x2ac521[_0x4b0149(0x1b7)],_0x3e00db[_0x4b0149(0x1c5)](_0x380a1c=>_0x380a1c[_0x4b0149(0x1c4)]));let _0x4310a3={'attempted':![],'cleared':![]};if(_0x3e00db['length']>0x0)try{let _0x588490='';for(let _0x2189e7=0x0;_0x2189e7<CACHE_CLEAR_ATTEMPTS;_0x2189e7+=0x1){_0x588490=await clearBffScriptCache(),_0x2189e7<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x4310a3={'attempted':!![],'cleared':!![],'message':_0x588490||_0x4b0149(0x1ce)};}catch(_0x189124){_0x4310a3={'attempted':!![],'cleared':![],'error':_0x189124 instanceof Error?_0x189124[_0x4b0149(0x1ef)]:String(_0x189124)};}const _0x3f28c1=_0x49bc89[_0x4b0149(0x1d5)]===0x0&&(_0x4310a3[_0x4b0149(0x1dc)]?_0x4310a3[_0x4b0149(0x1e4)]:!![]),_0xf36a9d=_0x4310a3[_0x4b0149(0x1dc)]?_0x4310a3[_0x4b0149(0x1e4)]?_0x4b0149(0x1b6):_0x4b0149(0x1ba):_0x4b0149(0x1d1);return{'ok':_0x3f28c1,'data':{'uploaded':_0x3e00db,'skipped':_0x8533ec,'failed':_0x49bc89,'cacheClear':_0x4310a3},'message':_0x4b0149(0x1bd)+_0x3e00db[_0x4b0149(0x1d5)]+_0x4b0149(0x1a8)+_0x8533ec[_0x4b0149(0x1d5)]+_0x4b0149(0x1e3)+_0x49bc89['length']+_0x4b0149(0x1b2)+_0xf36a9d};}};async function getTargetFunctions(_0x59ecad,_0x489b31){const _0x1fbb02=a37_0x5a71af,_0x344b1f=_0x489b31[_0x1fbb02(0x1df)](_0x1fbb02(0x1eb)),_0x353ab3=_0x489b31[_0x1fbb02(0x1df)](_0x1fbb02(0x19c)),_0x33d769=normalizeBffType(_0x344b1f)??undefined;if(_0x353ab3&&!_0x33d769)throw CliErrors[_0x1fbb02(0x1c0)](_0x1fbb02(0x1ec));const _0x1fffbe=await scanLocalBffFunctions(_0x59ecad,_0x33d769);if(_0x353ab3){const _0x40b36b=_0x1fffbe[_0x1fbb02(0x1bf)](_0x28ce1b=>_0x28ce1b['name']===_0x353ab3);if(_0x40b36b[_0x1fbb02(0x1d5)]===0x0)throw CliErrors[_0x1fbb02(0x1c0)](_0x1fbb02(0x1f0)+_0x33d769+'/'+_0x353ab3);return _0x40b36b;}return _0x1fffbe;}async function buildHookMaps(_0x58d552,_0x4c6f0e,_0x18ef72,_0x4401ae){const _0x10b753=a37_0x5a71af,_0x2d914a=_0x18ef72['some'](_0x5a1e6b=>_0x5a1e6b['type']===_0x10b753(0x1c6));if(!_0x2d914a)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x3392e0=loadAliasMap(_0x4c6f0e,undefined,resolveApiFilePath(_0x4c6f0e,_0x58d552)),_0x349dbc=new Map(_0x3392e0[_0x10b753(0x1c5)](_0x1751f9=>[_0x1751f9['alias'],_0x1751f9[_0x10b753(0x19f)]]));for(const _0x9f59a3 of Object[_0x10b753(0x1ad)](_0x4401ae[_0x10b753(0x1ac)])){_0x9f59a3[_0x10b753(0x1a7)]&&_0x9f59a3['datasetCode']&&!_0x349dbc[_0x10b753(0x1d4)](_0x9f59a3[_0x10b753(0x1a7)])&&_0x349dbc[_0x10b753(0x1c8)](_0x9f59a3[_0x10b753(0x1a7)],_0x9f59a3[_0x10b753(0x19f)]);}const _0x2c3d54=await listDatasets(_0x58d552),_0x2a4f5f=new Map(_0x2c3d54[_0x10b753(0x1c5)](_0x41da8e=>[_0x41da8e[_0x10b753(0x1d2)],_0x41da8e]));return{'aliasToDatasetCode':_0x349dbc,'datasetCodeToDataset':_0x2a4f5f};}async function uploadSingleFunction(_0x2e9edc,_0x164c2c,_0x4d46cb,_0x333d34){const _0x4dcd82=a37_0x5a71af,_0xa4533c=await readFile(_0x164c2c[_0x4dcd82(0x1a2)],_0x4dcd82(0x1f1)),_0x4e2926=await computeFileHash(_0x164c2c['filePath']),_0x50c7eb=_0x4d46cb[_0x4dcd82(0x1ac)][_0x164c2c[_0x4dcd82(0x1c4)]];if(_0x50c7eb?.[_0x4dcd82(0x1e6)]&&_0x50c7eb[_0x4dcd82(0x1a6)]==null)throw CliErrors[_0x4dcd82(0x1c0)](_0x164c2c[_0x4dcd82(0x1c4)]+_0x4dcd82(0x1aa));let _0x38bec0=extractScriptDescription(_0xa4533c);if(!_0x38bec0&&_0x50c7eb?.[_0x4dcd82(0x1e6)]){const _0x505aa5=await getBffScriptInfo(_0x50c7eb[_0x4dcd82(0x1e6)]);_0x38bec0=_0x505aa5['description']||undefined;}const _0x5378ee={'appCode':_0x2e9edc,'functionName':_0x164c2c['name'],'scriptType':_0x164c2c['type'],'scriptContent':_0xa4533c};if(_0x50c7eb?.[_0x4dcd82(0x1e6)])_0x5378ee['id']=_0x50c7eb[_0x4dcd82(0x1e6)];if(_0x50c7eb?.[_0x4dcd82(0x1a6)]!=null)_0x5378ee[_0x4dcd82(0x1a6)]=_0x50c7eb[_0x4dcd82(0x1a6)];if(_0x38bec0)_0x5378ee[_0x4dcd82(0x1a9)]=_0x38bec0;if(_0x164c2c['type']===_0x4dcd82(0x1c6)){const _0x53dcd7=_0x164c2c['alias'];if(!_0x53dcd7||!_0x164c2c['operationType']||!_0x164c2c['functionNode'])throw CliErrors[_0x4dcd82(0x1c0)](_0x4dcd82(0x1ea)+_0x164c2c[_0x4dcd82(0x1c4)]);const _0x37b004=_0x333d34[_0x4dcd82(0x1c3)][_0x4dcd82(0x1cc)](_0x53dcd7)??_0x50c7eb?.[_0x4dcd82(0x19f)]??_0x53dcd7,_0x2b8ac7=_0x333d34[_0x4dcd82(0x1a3)]['get'](_0x37b004);if(!_0x2b8ac7)throw CliErrors['validation']('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x53dcd7+_0x4dcd82(0x1b4)+(_0x4dcd82(0x1a4)+CLI_BIN_NAME+_0x4dcd82(0x1d9)));_0x5378ee[_0x4dcd82(0x1b3)]=_0x2b8ac7['id'],_0x5378ee[_0x4dcd82(0x1e0)]=_0x164c2c[_0x4dcd82(0x1e0)],_0x5378ee['functionNode']=_0x164c2c[_0x4dcd82(0x19e)];}const _0x125bce=await saveBffScript(_0x5378ee),_0x5b0040=_0x125bce['id'],_0x2472ee=_0x125bce['script']??await getBffScriptInfo(_0x5b0040),_0x246656={'hash':_0x4e2926,'remoteId':_0x5b0040,'version':_0x2472ee[_0x4dcd82(0x1a6)]};if(_0x164c2c[_0x4dcd82(0x1eb)]==='HOOK'){const _0x1de761=_0x164c2c['alias'],_0x5c14fa=_0x333d34[_0x4dcd82(0x1c3)]['get'](_0x1de761)??_0x50c7eb?.[_0x4dcd82(0x19f)]??_0x1de761;_0x333d34[_0x4dcd82(0x1c3)][_0x4dcd82(0x1d4)](_0x1de761)?_0x246656['alias']=_0x1de761:_0x246656[_0x4dcd82(0x1a7)]=_0x50c7eb?.[_0x4dcd82(0x1a7)],_0x246656[_0x4dcd82(0x19f)]=_0x5c14fa,_0x246656[_0x4dcd82(0x1e0)]=_0x164c2c[_0x4dcd82(0x1e0)],_0x246656['functionNode']=_0x164c2c[_0x4dcd82(0x19e)];}_0x4d46cb['functions'][_0x164c2c[_0x4dcd82(0x1c4)]]=_0x246656;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x4701a4,_0x4e3d39,_0xcf6733){const _0x19e920=a37_0x5a71af;if(_0xcf6733[_0x19e920(0x1d5)]===0x0)return;for(let _0x405e1d=0x0;_0x405e1d<LOCK_SETTLE_RETRY_COUNT;_0x405e1d+=0x1){const _0xe7b276=await readBffLockFile(_0x4701a4),_0x101036=_0xe7b276?.['apps']?.[_0x4e3d39]?.[_0x19e920(0x1ac)]??{},_0x53ecbc=_0xcf6733[_0x19e920(0x1ed)](_0x2a59f2=>!!_0x101036[_0x2a59f2]?.['remoteId']);if(_0x53ecbc)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0xcf6733[_0x19e920(0x1e2)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a38_0x31ae76=a38_0x3604;(function(_0x8e03a3,_0x23efb1){const _0x5be3dd=a38_0x3604,_0x47af5c=_0x8e03a3();while(!![]){try{const _0x348468=parseInt(_0x5be3dd(0x1b5))/0x1+parseInt(_0x5be3dd(0x1ab))/0x2+parseInt(_0x5be3dd(0x1ad))/0x3+-parseInt(_0x5be3dd(0x1b4))/0x4+parseInt(_0x5be3dd(0x1af))/0x5*(-parseInt(_0x5be3dd(0x1b0))/0x6)+-parseInt(_0x5be3dd(0x1a5))/0x7+-parseInt(_0x5be3dd(0x1a8))/0x8*(parseInt(_0x5be3dd(0x1a1))/0x9);if(_0x348468===_0x23efb1)break;else _0x47af5c['push'](_0x47af5c['shift']());}catch(_0x40d80f){_0x47af5c['push'](_0x47af5c['shift']());}}}(a38_0x3f1e,0x80b7c));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';function a38_0x3604(_0x4b7059,_0x5e9ce9){_0x4b7059=_0x4b7059-0x1a0;const _0x3f1e8a=a38_0x3f1e();let _0x36041a=_0x3f1e8a[_0x4b7059];return _0x36041a;}import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';function a38_0x3f1e(){const _0x17971d=['1585QLjwNL','8754qXiUtw','functions','apiDir','status','349632tcFImB','915502AWwujN','map','boolean','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','all','datasetCode','bff','push','alias','27BIAJPq','read','appCode','lockKey','950817IBxXrq','scriptsRoot','remote','3246736BcUhJF','bool','hash','1729356HoKhVd','\x20added,\x20','1950948Kxmzzz','length'];a38_0x3f1e=function(){return _0x17971d;};return a38_0x3f1e();}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x31ae76(0x1bb),'command':a38_0x31ae76(0x1b3),'description':'Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','risk':a38_0x31ae76(0x1a2),'flags':[{'name':a38_0x31ae76(0x1a7),'type':a38_0x31ae76(0x1b7),'description':a38_0x31ae76(0x1b8)}],async 'execute'(_0x19d88a){const _0x24e62e=a38_0x31ae76,_0x147d73=loadBffProjectConfig(_0x19d88a['appCode']),_0x479041=await readBffLockFile(_0x147d73['lockFilePath']),{appLock:_0x41bf90}=ensureLockScope(_0x479041??createEmptyBffLock(),_0x19d88a['appCode'],_0x147d73[_0x24e62e(0x1a6)],'status'),_0x239f05=await scanLocalBffFunctions(_0x147d73),_0x50bf2b=[],_0x1c1c29=[],_0x4ef047=[];for(const _0x486fb3 of _0x239f05){const _0x67a155=await computeFileHash(_0x486fb3['filePath']),_0x5a1ab4=_0x41bf90[_0x24e62e(0x1b1)][_0x486fb3[_0x24e62e(0x1a4)]];if(!_0x5a1ab4)_0x50bf2b[_0x24e62e(0x1bc)](_0x486fb3[_0x24e62e(0x1a4)]);else _0x5a1ab4[_0x24e62e(0x1aa)]!==_0x67a155?_0x1c1c29[_0x24e62e(0x1bc)](_0x486fb3[_0x24e62e(0x1a4)]):_0x4ef047[_0x24e62e(0x1bc)](_0x486fb3[_0x24e62e(0x1a4)]);}const _0x436c48=[];if(_0x19d88a[_0x24e62e(0x1a9)](_0x24e62e(0x1a7))){const _0x9151de=loadAliasMap(_0x19d88a[_0x24e62e(0x1b2)],undefined,resolveApiFilePath(_0x19d88a[_0x24e62e(0x1b2)],_0x19d88a[_0x24e62e(0x1a3)])),_0x2897d7=new Map(_0x9151de[_0x24e62e(0x1b6)](_0x19a68e=>[_0x19a68e[_0x24e62e(0x1ba)],_0x19a68e[_0x24e62e(0x1a0)]])),[_0x4ded84,_0x1f89e8]=await Promise[_0x24e62e(0x1b9)]([listBffScripts(_0x19d88a[_0x24e62e(0x1a3)]),getBffScriptStatistics(_0x19d88a[_0x24e62e(0x1a3)])]),_0x58faef=createHookLocationMap(_0x1f89e8),_0x15064d=new Set(_0x239f05[_0x24e62e(0x1b6)](_0x3b7894=>_0x3b7894['lockKey']));for(const _0x266120 of _0x4ded84){const _0x167e8f=resolveRemoteScriptTarget(_0x147d73,_0x266120,_0x58faef,_0x41bf90[_0x24e62e(0x1b1)],_0x2897d7);_0x167e8f&&!_0x15064d['has'](_0x167e8f[_0x24e62e(0x1a4)])&&_0x436c48[_0x24e62e(0x1bc)](_0x167e8f[_0x24e62e(0x1a4)]);}}const _0x3b7c7a=_0x50bf2b[_0x24e62e(0x1ae)]===0x0&&_0x1c1c29[_0x24e62e(0x1ae)]===0x0&&_0x436c48[_0x24e62e(0x1ae)]===0x0;return{'ok':!![],'data':{'added':_0x50bf2b,'modified':_0x1c1c29,'unchanged':_0x4ef047,'remoteOnly':_0x436c48},'message':_0x3b7c7a?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x50bf2b[_0x24e62e(0x1ae)]+_0x24e62e(0x1ac)+_0x1c1c29[_0x24e62e(0x1ae)]+'\x20modified,\x20'+_0x4ef047[_0x24e62e(0x1ae)]+'\x20unchanged'+(_0x436c48['length']>0x0?',\x20'+_0x436c48['length']+'\x20remote-only':'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a39_0x2348(_0x4249b2,_0x2d8868){_0x4249b2=_0x4249b2-0x88;const _0x46e704=a39_0x46e7();let _0x234870=_0x46e704[_0x4249b2];return _0x234870;}const a39_0x38c2c3=a39_0x2348;function a39_0x46e7(){const _0x5c9f73=['inherit','CLI\x20Built-in\x20Skill\x20installed','skipped','4991335EHpEdX','4JTocse','info','apiError','10455584VbovyD','npx\x20skills\x20add\x20failed:\x20','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','write','7311003zISSBL','pipe','log','2VWnQnt','unknown','1468426fAAKzU','cli-skill-install','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','cli-skill','error','cwd','nonInteractive','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','829557rjxczW','19235556nLgJiX','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','install','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','5865270ROGCWq'];a39_0x46e7=function(){return _0x5c9f73;};return a39_0x46e7();}(function(_0x27b50a,_0x5245e0){const _0x253387=a39_0x2348,_0x4e6e73=_0x27b50a();while(!![]){try{const _0x1429aa=parseInt(_0x253387(0xa2))/0x1+-parseInt(_0x253387(0xa0))/0x2*(parseInt(_0x253387(0x8c))/0x3)+parseInt(_0x253387(0x96))/0x4*(parseInt(_0x253387(0x95))/0x5)+-parseInt(_0x253387(0x91))/0x6+-parseInt(_0x253387(0x9d))/0x7+-parseInt(_0x253387(0x99))/0x8+parseInt(_0x253387(0x8d))/0x9;if(_0x1429aa===_0x5245e0)break;else _0x4e6e73['push'](_0x4e6e73['shift']());}catch(_0x82350b){_0x4e6e73['push'](_0x4e6e73['shift']());}}}(a39_0x46e7,0xf3c88));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x38c2c3(0xa5),'command':a39_0x38c2c3(0x8f),'description':a39_0x38c2c3(0x90),'risk':a39_0x38c2c3(0x9c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x552ed0){const _0x2ccad0=a39_0x38c2c3;logger['setLogPath'](process[_0x2ccad0(0x89)]()),logger[_0x2ccad0(0x97)](_0x2ccad0(0xa3),_0x2ccad0(0xa4));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x8ab364,RABETBASE_SKILL_SOURCE:_0x227698,runNpxSkillsAddGlobal:_0x2adc25}=await import('../../skills/npx-skills-add.js'),_0x33fd25=_0x552ed0[_0x2ccad0(0x8a)]?_0x2ccad0(0x9e):_0x2ccad0(0x92);console['log'](_0x2ccad0(0x9b)+_0x8ab364+')...');const _0x3403f8=_0x2adc25(process[_0x2ccad0(0x89)](),_0x227698,{'stdio':_0x33fd25});if(_0x3403f8[_0x2ccad0(0x94)])console[_0x2ccad0(0x9f)](_0x2ccad0(0x8e));else{if(_0x3403f8['ok'])console[_0x2ccad0(0x9f)](_0x2ccad0(0x93));else throw CliErrors[_0x2ccad0(0x98)](_0x2ccad0(0x9a)+(_0x3403f8[_0x2ccad0(0x88)]||_0x2ccad0(0xa1)),_0x2ccad0(0x8b)+_0x8ab364);}return{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a40_0x383236=a40_0x18ff;(function(_0x3ec8d4,_0x530d63){const _0x120070=a40_0x18ff,_0x407eb7=_0x3ec8d4();while(!![]){try{const _0x2e73ca=-parseInt(_0x120070(0x121))/0x1*(parseInt(_0x120070(0xe2))/0x2)+parseInt(_0x120070(0x123))/0x3+parseInt(_0x120070(0x11f))/0x4+parseInt(_0x120070(0xd5))/0x5*(parseInt(_0x120070(0xff))/0x6)+-parseInt(_0x120070(0x101))/0x7+parseInt(_0x120070(0x119))/0x8*(-parseInt(_0x120070(0x122))/0x9)+parseInt(_0x120070(0xd9))/0xa;if(_0x2e73ca===_0x530d63)break;else _0x407eb7['push'](_0x407eb7['shift']());}catch(_0x42bf1c){_0x407eb7['push'](_0x407eb7['shift']());}}}(a40_0x5abf,0x32f97));import a40_0x564099 from'chalk';import a40_0xd7ad90 from'ora';import a40_0x397343 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 _0x526090=a40_0x18ff;return GIT_COMMIT!==_0x526090(0xf0)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x526090(0xfd)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x1ab095=a40_0x18ff,_0x39ab15=process[_0x1ab095(0x120)][_0x1ab095(0x106)]();if(_0x39ab15[_0x1ab095(0xe7)](_0x1ab095(0x115)))return _0x1ab095(0x115);return _0x1ab095(0x107);}const updateFlags=[{'name':a40_0x383236(0xf1),'type':a40_0x383236(0xea),'description':a40_0x383236(0x116),'default':![]},{'name':a40_0x383236(0x10a),'type':a40_0x383236(0x128),'description':a40_0x383236(0xfa)},{'name':a40_0x383236(0xf8),'type':a40_0x383236(0xea),'description':a40_0x383236(0xdb),'default':![]},{'name':'skills','type':'boolean','description':a40_0x383236(0x118),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x10e886){const _0x15d7e7=a40_0x383236;return _0x10e886[_0x15d7e7(0x127)](_0x15d7e7(0x10a))[_0x15d7e7(0xd7)]();}function shouldSkipCliSkill(_0x493d29){const _0x331bb1=a40_0x383236;return _0x493d29[_0x331bb1(0xd8)](_0x331bb1(0xf8))||_0x493d29[_0x331bb1(0x11c)](_0x331bb1(0x126))===![];}async function validateUpdateFlags(_0x1a865a){const _0x775749=a40_0x383236,_0x45209a=_0x1a865a[_0x775749(0xd8)](_0x775749(0xf1)),_0x5c6448=getRequestedVersion(_0x1a865a);if(_0x45209a&&_0x5c6448)throw CliErrors[_0x775749(0xd4)](_0x775749(0x10f),_0x775749(0xe3));if(_0x5c6448&&!a40_0x397343['valid'](_0x5c6448))throw CliErrors[_0x775749(0xd4)]('Invalid\x20version:\x20'+_0x5c6448,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x363de4=a40_0x383236;try{const _0x3ebb1d=await fetch(_0x363de4(0x104)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal['timeout'](0x2710)});if(!_0x3ebb1d['ok'])return null;const _0x3577d7=await _0x3ebb1d['json']();if(!_0x3577d7||typeof _0x3577d7!==_0x363de4(0xf9))return null;return Object[_0x363de4(0xe1)](Object['entries'](_0x3577d7)[_0x363de4(0x114)](([,_0xd45cd5])=>typeof _0xd45cd5===_0x363de4(0x128)&&_0xd45cd5['trim']()[_0x363de4(0xf7)]>0x0)[_0x363de4(0xe5)](([_0x201884,_0x175539])=>[_0x201884,String(_0x175539)[_0x363de4(0xd7)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x2a7113){const _0x2f2262=await fetchNpmDistTags();return _0x2f2262?.[_0x2a7113]??null;}function a40_0x5abf(){const _0x5c279f=['Already\x20up\x20to\x20date\x20(v','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','filter','bun','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','log','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','384ZJOyEF','warn','\x20\x20Try\x20manually:\x20','flag','\x20install\x20-g\x20','Already\x20on\x20requested\x20version\x20(v','747212MWctZp','execPath','7ivKyqy','57411CzBSyk','131535nUlOVB','valid','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','skills','str','string','validation','15ZqfSEI','Current\x20version:\x20','trim','bool','3989060BTICvz','message','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','fail','\x20→\x20','succeed','install','run','fromEntries','14332uiHiJK','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','pipe','map','@latest','includes','yellow','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','boolean','error','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','green','Beta\x20version:\x20','source','unknown','beta','Version\x20comparison\x20failed','Updated\x20to\x20v','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','gray','latest','length','no-skills','object','Install\x20a\x20specific\x20CLI\x20version','start','update','slice','\x20\x20Run\x20manually:\x20','102906AmMKTv','red','811034HRQMmw','Update\x20available:\x20','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','https://registry.npmjs.org/-/package/','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','toLowerCase','npm','\x20cli-skill\x20install','skipped','version','Updating\x20via\x20','inherit','write','nonInteractive','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Requested\x20version:\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm'];a40_0x5abf=function(){return _0x5c279f;};return a40_0x5abf();}async function fetchLatestVersion(){const _0x1c5699=a40_0x383236;return fetchNpmDistTagVersion(_0x1c5699(0xf6));}async function resolveTargetVersion(_0x202386){const _0x4955ed=a40_0x383236,_0x7f1dc1=getRequestedVersion(_0x202386);if(_0x7f1dc1)return{'version':_0x7f1dc1,'source':_0x4955ed(0x10a)};if(_0x202386[_0x4955ed(0xd8)]('beta')){const _0x359d69=await fetchNpmDistTagVersion(_0x4955ed(0xf1));if(!_0x359d69)return null;return{'version':_0x359d69,'source':'beta'};}const _0x2b704d=await fetchLatestVersion();if(!_0x2b704d)return null;return{'version':_0x2b704d,'source':_0x4955ed(0xf6)};}function shouldInstallTarget(_0x49f35b,_0x278bd9){const _0x402614=a40_0x383236;if(_0x278bd9[_0x402614(0xef)]==='version'||_0x278bd9[_0x402614(0xef)]===_0x402614(0xf1))return!a40_0x397343['eq'](_0x49f35b,_0x278bd9['version']);return a40_0x397343['lt'](_0x49f35b,_0x278bd9['version']);}function getInstallPlanLabel(_0x142ed7,_0x39fca0){const _0x33ebe4=a40_0x383236;switch(_0x39fca0[_0x33ebe4(0xef)]){case _0x33ebe4(0xf1):return _0x33ebe4(0xee)+a40_0x564099[_0x33ebe4(0xe8)](_0x142ed7)+_0x33ebe4(0xdd)+a40_0x564099['green'](_0x39fca0['version']);case _0x33ebe4(0x10a):return _0x33ebe4(0x110)+a40_0x564099[_0x33ebe4(0xe8)](_0x142ed7)+_0x33ebe4(0xdd)+a40_0x564099[_0x33ebe4(0xed)](_0x39fca0[_0x33ebe4(0x10a)]);case _0x33ebe4(0xf6):default:return _0x33ebe4(0x102)+a40_0x564099['yellow'](_0x142ed7)+'\x20→\x20'+a40_0x564099[_0x33ebe4(0xed)](_0x39fca0[_0x33ebe4(0x10a)]);}}async function installCliSkill(_0x57a194){const _0x5ef503=a40_0x383236;console[_0x5ef503(0x117)](a40_0x564099['gray']('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x519f30=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x57a194?_0x5ef503(0xe4):_0x5ef503(0x10c)});if(_0x519f30[_0x5ef503(0x109)]){console[_0x5ef503(0x117)](a40_0x564099[_0x5ef503(0xf5)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x519f30['ok']){console['log'](a40_0x564099[_0x5ef503(0xf5)](_0x5ef503(0x125)));return;}console[_0x5ef503(0x11a)](a40_0x564099[_0x5ef503(0xe8)](_0x5ef503(0xf4)+(_0x519f30[_0x5ef503(0xeb)]||_0x5ef503(0xf0)))),console[_0x5ef503(0x117)](a40_0x564099[_0x5ef503(0xf5)](_0x5ef503(0xfe)+CLI_BIN_NAME+_0x5ef503(0x108)));}async function execute(_0x41bc1a){const _0x11bba8=a40_0x383236;await validateUpdateFlags(_0x41bc1a);const _0x28533b=getCurrentVersion();console[_0x11bba8(0x117)](_0x11bba8(0xd6)+_0x28533b);const _0x1f6609=a40_0xd7ad90('Checking\x20for\x20updates...')[_0x11bba8(0xfb)](),_0x4065e0=await resolveTargetVersion(_0x41bc1a);if(!_0x4065e0){const _0x2f75c5=_0x41bc1a[_0x11bba8(0xd8)](_0x11bba8(0xf1))?_0x11bba8(0x111):_0x11bba8(0x113);return _0x1f6609[_0x11bba8(0xdc)](_0x2f75c5),console[_0x11bba8(0x117)](a40_0x564099['gray'](_0x11bba8(0xe9)+NPM_PACKAGE_NAME+_0x11bba8(0xe6))),{'ok':![],'message':_0x2f75c5};}const _0x163803=a40_0x397343[_0x11bba8(0x124)](VERSION),_0x5708bf=a40_0x397343[_0x11bba8(0x124)](_0x4065e0['version']);if(!_0x163803||!_0x5708bf)return _0x1f6609[_0x11bba8(0xdc)](_0x11bba8(0xf2)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x163803,_0x4065e0)){const _0x509100=_0x4065e0[_0x11bba8(0xef)]===_0x11bba8(0x10a)?_0x11bba8(0x11e)+_0x4065e0[_0x11bba8(0x10a)]+')':_0x11bba8(0x112)+_0x4065e0['version']+')';return _0x1f6609['succeed'](_0x509100),shouldSkipCliSkill(_0x41bc1a)?console[_0x11bba8(0x117)](a40_0x564099['gray'](_0x11bba8(0x105))):await installCliSkill(_0x41bc1a['nonInteractive']),{'ok':!![]};}_0x1f6609['info'](getInstallPlanLabel(_0x28533b,_0x4065e0));const _0x3d8cad=detectPackageManager(),_0x59b0a8=_0x3d8cad===_0x11bba8(0x107)?resolveNpmBin(_0x11bba8(0x107)):_0x3d8cad,_0x3757ee=a40_0xd7ad90(_0x11bba8(0x10b)+_0x3d8cad+'...')[_0x11bba8(0xfb)]();try{return await execa(_0x59b0a8,[_0x11bba8(0xdf),'-g',NPM_PACKAGE_NAME+'@'+_0x4065e0[_0x11bba8(0x10a)]],{'stdio':_0x11bba8(0xe4)}),_0x3757ee[_0x11bba8(0xde)](_0x11bba8(0xf3)+_0x4065e0[_0x11bba8(0x10a)]),console['log'](a40_0x564099['gray'](_0x11bba8(0x103))),shouldSkipCliSkill(_0x41bc1a)?console[_0x11bba8(0x117)](a40_0x564099[_0x11bba8(0xf5)](_0x11bba8(0x105))):await installCliSkill(_0x41bc1a[_0x11bba8(0x10e)]),{'ok':!![]};}catch(_0x20ed39){return _0x3757ee[_0x11bba8(0xdc)]('Update\x20failed'),console[_0x11bba8(0xeb)](a40_0x564099[_0x11bba8(0x100)]('\x20\x20'+_0x20ed39['message'])),console[_0x11bba8(0x117)](a40_0x564099['gray'](_0x11bba8(0x11b)+_0x3d8cad+_0x11bba8(0x11d)+NPM_PACKAGE_NAME+'@'+_0x4065e0['version'])),{'ok':![],'message':_0x20ed39[_0x11bba8(0xda)]};}}function a40_0x18ff(_0x2452a4,_0x486f2c){_0x2452a4=_0x2452a4-0xd4;const _0x5abf1d=a40_0x5abf();let _0x18ff27=_0x5abf1d[_0x2452a4];return _0x18ff27;}export const updateDefinition={'service':a40_0x383236(0xfc),'command':a40_0x383236(0xe0),'description':a40_0x383236(0xec),'risk':a40_0x383236(0x10d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a40_0xae5f75=a40_0xf5cd;(function(_0x4b1eeb,_0x45fe63){const _0x7591a4=a40_0xf5cd,_0x392dec=_0x4b1eeb();while(!![]){try{const _0xbab34=parseInt(_0x7591a4(0xa3))/0x1+-parseInt(_0x7591a4(0xb6))/0x2+parseInt(_0x7591a4(0x90))/0x3*(parseInt(_0x7591a4(0xa5))/0x4)+parseInt(_0x7591a4(0xaa))/0x5*(parseInt(_0x7591a4(0xdd))/0x6)+-parseInt(_0x7591a4(0x99))/0x7+parseInt(_0x7591a4(0xa9))/0x8+-parseInt(_0x7591a4(0xd4))/0x9*(parseInt(_0x7591a4(0xb7))/0xa);if(_0xbab34===_0x45fe63)break;else _0x392dec['push'](_0x392dec['shift']());}catch(_0x3a07a9){_0x392dec['push'](_0x392dec['shift']());}}}(a40_0x2896,0x6b193));import a40_0x47d7c6 from'chalk';import a40_0x3ef4b3 from'ora';import a40_0x439034 from'semver';import{execa}from'execa';function a40_0xf5cd(_0x1b6338,_0xbc9e54){_0x1b6338=_0x1b6338-0x8d;const _0x28960c=a40_0x2896();let _0xf5cd57=_0x28960c[_0x1b6338];return _0xf5cd57;}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 _0x45a878=a40_0xf5cd;return GIT_COMMIT!==_0x45a878(0xb0)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x45a878(0xd5)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x4abca0=a40_0xf5cd,_0x7e9ba1=process[_0x4abca0(0xa7)][_0x4abca0(0xb8)]();if(_0x7e9ba1[_0x4abca0(0xc6)](_0x4abca0(0xcf)))return'bun';return'npm';}const updateFlags=[{'name':a40_0xae5f75(0xac),'type':a40_0xae5f75(0xa0),'description':a40_0xae5f75(0x94),'default':![]},{'name':a40_0xae5f75(0x97),'type':'string','description':a40_0xae5f75(0xb1)},{'name':a40_0xae5f75(0xcb),'type':'boolean','description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':a40_0xae5f75(0x98),'type':a40_0xae5f75(0xa0),'description':a40_0xae5f75(0x8f),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x5ef7e9){const _0x363908=a40_0xae5f75;return _0x5ef7e9[_0x363908(0x8d)](_0x363908(0x97))[_0x363908(0xb3)]();}function shouldSkipCliSkill(_0x45d333){const _0x3aea77=a40_0xae5f75;return _0x45d333[_0x3aea77(0xcc)](_0x3aea77(0xcb))||_0x45d333[_0x3aea77(0xd0)](_0x3aea77(0x98))===![];}async function validateUpdateFlags(_0x7660a0){const _0x10a384=a40_0xae5f75,_0x4799fe=_0x7660a0[_0x10a384(0xcc)]('beta'),_0x3429a0=getRequestedVersion(_0x7660a0);if(_0x4799fe&&_0x3429a0)throw CliErrors[_0x10a384(0xbc)](_0x10a384(0xd1),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x3429a0&&!a40_0x439034[_0x10a384(0xb2)](_0x3429a0))throw CliErrors[_0x10a384(0xbc)](_0x10a384(0x9d)+_0x3429a0,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x5712a9=a40_0xae5f75;try{const _0x3fbf40=await fetch(_0x5712a9(0xd7)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x5712a9(0x9e),{'signal':AbortSignal[_0x5712a9(0xd8)](0x2710)});if(!_0x3fbf40['ok'])return null;const _0x4b4e95=await _0x3fbf40[_0x5712a9(0x96)]();if(!_0x4b4e95||typeof _0x4b4e95!==_0x5712a9(0xa6))return null;return Object[_0x5712a9(0xd2)](Object[_0x5712a9(0xa2)](_0x4b4e95)[_0x5712a9(0xda)](([,_0x3cb246])=>typeof _0x3cb246==='string'&&_0x3cb246[_0x5712a9(0xb3)]()['length']>0x0)[_0x5712a9(0xc1)](([_0x5cc26b,_0x361709])=>[_0x5cc26b,String(_0x361709)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x34b10f){const _0x847f25=await fetchNpmDistTags();return _0x847f25?.[_0x34b10f]??null;}async function fetchLatestVersion(){const _0x43585d=a40_0xae5f75;return fetchNpmDistTagVersion(_0x43585d(0xce));}async function resolveTargetVersion(_0x1aad7e){const _0x27a9fb=a40_0xae5f75,_0x43ee70=getRequestedVersion(_0x1aad7e);if(_0x43ee70)return{'version':_0x43ee70,'source':_0x27a9fb(0x97)};if(_0x1aad7e[_0x27a9fb(0xcc)](_0x27a9fb(0xac))){const _0x257ee3=await fetchNpmDistTagVersion(_0x27a9fb(0xac));if(!_0x257ee3)return null;return{'version':_0x257ee3,'source':_0x27a9fb(0xac)};}const _0x5e21cb=await fetchLatestVersion();if(!_0x5e21cb)return null;return{'version':_0x5e21cb,'source':_0x27a9fb(0xce)};}function shouldInstallTarget(_0x9d0b11,_0xfedf3d){const _0x22d531=a40_0xae5f75;if(_0xfedf3d[_0x22d531(0xb9)]==='version'||_0xfedf3d[_0x22d531(0xb9)]===_0x22d531(0xac))return!a40_0x439034['eq'](_0x9d0b11,_0xfedf3d[_0x22d531(0x97)]);return a40_0x439034['lt'](_0x9d0b11,_0xfedf3d[_0x22d531(0x97)]);}function getInstallPlanLabel(_0x5f1b9d,_0x4f0392){const _0x373f78=a40_0xae5f75;switch(_0x4f0392['source']){case'beta':return _0x373f78(0xd9)+a40_0x47d7c6[_0x373f78(0xa1)](_0x5f1b9d)+'\x20→\x20'+a40_0x47d7c6[_0x373f78(0x92)](_0x4f0392['version']);case _0x373f78(0x97):return _0x373f78(0xdc)+a40_0x47d7c6['yellow'](_0x5f1b9d)+_0x373f78(0x8e)+a40_0x47d7c6[_0x373f78(0x92)](_0x4f0392[_0x373f78(0x97)]);case'latest':default:return _0x373f78(0x9f)+a40_0x47d7c6[_0x373f78(0xa1)](_0x5f1b9d)+_0x373f78(0x8e)+a40_0x47d7c6['green'](_0x4f0392[_0x373f78(0x97)]);}}async function installCliSkill(_0xbd1005){const _0x1193ac=a40_0xae5f75;console['log'](a40_0x47d7c6['gray'](_0x1193ac(0x9b)));const _0x1fd2ae=runNpxSkillsAddGlobal(process[_0x1193ac(0xdb)](),RABETBASE_SKILL_SOURCE,{'stdio':_0xbd1005?_0x1193ac(0xb4):_0x1193ac(0xcd)});if(_0x1fd2ae['skipped']){console[_0x1193ac(0xc7)](a40_0x47d7c6[_0x1193ac(0xb5)](_0x1193ac(0xd3)));return;}if(_0x1fd2ae['ok']){console[_0x1193ac(0xc7)](a40_0x47d7c6[_0x1193ac(0xb5)](_0x1193ac(0xaf)));return;}console[_0x1193ac(0xa8)](a40_0x47d7c6[_0x1193ac(0xa1)](_0x1193ac(0xad)+(_0x1fd2ae[_0x1193ac(0xdf)]||_0x1193ac(0xb0)))),console[_0x1193ac(0xc7)](a40_0x47d7c6[_0x1193ac(0xb5)](_0x1193ac(0xa4)+CLI_BIN_NAME+_0x1193ac(0xba)));}async function execute(_0x3d3a79){const _0x353e2c=a40_0xae5f75;await validateUpdateFlags(_0x3d3a79);const _0xe642ab=getCurrentVersion();console[_0x353e2c(0xc7)](_0x353e2c(0x9a)+_0xe642ab);const _0xc6bfd6=a40_0x3ef4b3(_0x353e2c(0x9c))['start'](),_0x18dfe8=await resolveTargetVersion(_0x3d3a79);if(!_0x18dfe8){const _0x3df1a5=_0x3d3a79['bool'](_0x353e2c(0xac))?_0x353e2c(0xbb):_0x353e2c(0xc3);return _0xc6bfd6[_0x353e2c(0xbd)](_0x3df1a5),console[_0x353e2c(0xc7)](a40_0x47d7c6[_0x353e2c(0xb5)](_0x353e2c(0xc5)+NPM_PACKAGE_NAME+_0x353e2c(0x91))),{'ok':![],'message':_0x3df1a5};}const _0x3d0518=a40_0x439034['valid'](VERSION),_0x48ba99=a40_0x439034[_0x353e2c(0xb2)](_0x18dfe8['version']);if(!_0x3d0518||!_0x48ba99)return _0xc6bfd6[_0x353e2c(0xbd)](_0x353e2c(0xae)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x3d0518,_0x18dfe8)){const _0x5732f3=_0x18dfe8[_0x353e2c(0xb9)]==='version'?_0x353e2c(0xc9)+_0x18dfe8[_0x353e2c(0x97)]+')':_0x353e2c(0x95)+_0x18dfe8[_0x353e2c(0x97)]+')';return _0xc6bfd6['succeed'](_0x5732f3),shouldSkipCliSkill(_0x3d3a79)?console['log'](a40_0x47d7c6[_0x353e2c(0xb5)](_0x353e2c(0xe0))):await installCliSkill(_0x3d3a79['nonInteractive']),{'ok':!![]};}_0xc6bfd6[_0x353e2c(0xab)](getInstallPlanLabel(_0xe642ab,_0x18dfe8));const _0x2c2fd5=detectPackageManager(),_0x183346=_0x2c2fd5===_0x353e2c(0x93)?resolveNpmBin(_0x353e2c(0x93)):_0x2c2fd5,_0x3cb696=a40_0x3ef4b3(_0x353e2c(0xbf)+_0x2c2fd5+'...')['start']();try{return await execa(_0x183346,[_0x353e2c(0xca),'-g',NPM_PACKAGE_NAME+'@'+_0x18dfe8[_0x353e2c(0x97)]],{'stdio':_0x353e2c(0xb4)}),_0x3cb696[_0x353e2c(0xc4)]('Updated\x20to\x20v'+_0x18dfe8[_0x353e2c(0x97)]),console[_0x353e2c(0xc7)](a40_0x47d7c6['gray'](_0x353e2c(0xd6))),shouldSkipCliSkill(_0x3d3a79)?console[_0x353e2c(0xc7)](a40_0x47d7c6[_0x353e2c(0xb5)](_0x353e2c(0xe0))):await installCliSkill(_0x3d3a79['nonInteractive']),{'ok':!![]};}catch(_0x2e084b){return _0x3cb696[_0x353e2c(0xbd)](_0x353e2c(0xbe)),console[_0x353e2c(0xdf)](a40_0x47d7c6['red']('\x20\x20'+_0x2e084b[_0x353e2c(0xc8)])),console[_0x353e2c(0xc7)](a40_0x47d7c6[_0x353e2c(0xb5)](_0x353e2c(0xc2)+_0x2c2fd5+_0x353e2c(0xc0)+NPM_PACKAGE_NAME+'@'+_0x18dfe8[_0x353e2c(0x97)])),{'ok':![],'message':_0x2e084b[_0x353e2c(0xc8)]};}}function a40_0x2896(){const _0x336da1=['Requested\x20version:\x20','732bDsjMf','run','error','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','str','\x20→\x20','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','302502IdWCau','@latest','green','npm','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Already\x20up\x20to\x20date\x20(v','json','version','skills','3506776PHkHaR','Current\x20version:\x20','Checking\x20CLI\x20Built-in\x20Skill...','Checking\x20for\x20updates...','Invalid\x20version:\x20','/dist-tags','Update\x20available:\x20','boolean','yellow','entries','361899gukvQK','\x20\x20Run\x20manually:\x20','8gMczsg','object','execPath','warn','4143880CNvsHl','19310PbGCEl','info','beta','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','Version\x20comparison\x20failed','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','unknown','Install\x20a\x20specific\x20CLI\x20version','valid','trim','pipe','gray','438288obyweZ','10smjNHB','toLowerCase','source','\x20cli-skill\x20install','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','validation','fail','Update\x20failed','Updating\x20via\x20','\x20install\x20-g\x20','map','\x20\x20Try\x20manually:\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','succeed','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','includes','log','message','Already\x20on\x20requested\x20version\x20(v','install','no-skills','bool','inherit','latest','bun','flag','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','fromEntries','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','3545361FpDVfP','slice','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','https://registry.npmjs.org/-/package/','timeout','Beta\x20version:\x20','filter','cwd'];a40_0x2896=function(){return _0x336da1;};return a40_0x2896();}export const updateDefinition={'service':'update','command':a40_0xae5f75(0xde),'description':a40_0xae5f75(0xe1),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2877e5,_0x5d3323){const _0x16d548=a41_0x49cd,_0x228362=_0x2877e5();while(!![]){try{const _0xe5692b=parseInt(_0x16d548(0x1ef))/0x1+-parseInt(_0x16d548(0x1f5))/0x2+-parseInt(_0x16d548(0x1f4))/0x3+-parseInt(_0x16d548(0x1f6))/0x4+parseInt(_0x16d548(0x1f2))/0x5*(parseInt(_0x16d548(0x1f1))/0x6)+parseInt(_0x16d548(0x1f0))/0x7*(parseInt(_0x16d548(0x1f3))/0x8)+parseInt(_0x16d548(0x1ee))/0x9;if(_0xe5692b===_0x5d3323)break;else _0x228362['push'](_0x228362['shift']());}catch(_0x10ee74){_0x228362['push'](_0x228362['shift']());}}}(a41_0xcaf4,0x4a14c));function a41_0x49cd(_0x586602,_0x2ba941){_0x586602=_0x586602-0x1ee;const _0xcaf424=a41_0xcaf4();let _0x49cda8=_0xcaf424[_0x586602];return _0x49cda8;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];function a41_0xcaf4(){const _0x38b0ab=['80969KrwvdC','12RsRISo','1026005JuzWXr','152ALlqUP','1509192oaQeHH','1146360uJUxta','531948pHDQdp','4057659RfVMtC','431641gtSsTO'];a41_0xcaf4=function(){return _0x38b0ab;};return a41_0xcaf4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a42_0x45c7a6=a42_0x5949;(function(_0x478d31,_0x17fd8e){const _0x4b7ebf=a42_0x5949,_0x315626=_0x478d31();while(!![]){try{const _0x3ebfd2=parseInt(_0x4b7ebf(0xa5))/0x1+parseInt(_0x4b7ebf(0xa9))/0x2*(-parseInt(_0x4b7ebf(0xb1))/0x3)+-parseInt(_0x4b7ebf(0xae))/0x4+-parseInt(_0x4b7ebf(0xa2))/0x5*(-parseInt(_0x4b7ebf(0xab))/0x6)+-parseInt(_0x4b7ebf(0xa7))/0x7+-parseInt(_0x4b7ebf(0xb3))/0x8*(parseInt(_0x4b7ebf(0xb4))/0x9)+parseInt(_0x4b7ebf(0xb2))/0xa*(parseInt(_0x4b7ebf(0xb0))/0xb);if(_0x3ebfd2===_0x17fd8e)break;else _0x315626['push'](_0x315626['shift']());}catch(_0x49b357){_0x315626['push'](_0x315626['shift']());}}}(a42_0x2610,0xb703d));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':a42_0x45c7a6(0xaf),'description':a42_0x45c7a6(0xa6),'risk':'read','flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x45c7a6(0xa8),'type':'string','description':a42_0x45c7a6(0xb7)},{'name':a42_0x45c7a6(0xba),'type':a42_0x45c7a6(0xb6),'required':!![],'description':a42_0x45c7a6(0xac)},{'name':a42_0x45c7a6(0xa1),'type':a42_0x45c7a6(0xa4),'description':a42_0x45c7a6(0xb8)}],async 'execute'(_0xaa0d0c){const _0x5f27e1=a42_0x45c7a6,{dataset:_0x34bdce,operation:_0x4b006f}=await getOperationDetail(_0xaa0d0c['appCode'],_0xaa0d0c[_0x5f27e1(0xb9)](_0x5f27e1(0xb5)),_0xaa0d0c['str'](_0x5f27e1(0xba))),_0x2cb4a6=generateSdkCode(_0x34bdce,_0x4b006f,{'includeImports':!_0xaa0d0c[_0x5f27e1(0xa3)](_0x5f27e1(0xa1))});return{'ok':!![],'data':{'dataset':{'name':_0x34bdce[_0x5f27e1(0xad)],'code':_0x34bdce['code'],'tableName':_0x34bdce[_0x5f27e1(0xaa)]},'operation':_0xaa0d0c[_0x5f27e1(0xb9)](_0x5f27e1(0xba)),'code':_0x2cb4a6}};}};function a42_0x5949(_0x4af6af,_0x76b59d){_0x4af6af=_0x4af6af-0xa1;const _0x26108a=a42_0x2610();let _0x5949c9=_0x26108a[_0x4af6af];return _0x5949c9;}function a42_0x2610(){const _0x278fc0=['181310XZdbiK','2056oIhPHA','11943QKXGZP','code','string','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','Omit\x20import\x20statements\x20from\x20generated\x20code','str','operation','skip-imports','2801870DUFyhC','bool','boolean','596173uZCTEZ','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','8606080YxAaDp','alias','6YVHpcY','tableName','6dwUvAd','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','name','5691708gguUHr','sdk','1727vQUZIv','260079LSJOJs'];a42_0x2610=function(){return _0x278fc0;};return a42_0x2610();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0xa697a0=a43_0x3fbe;(function(_0x4e3e1e,_0xeec18){const _0x2c7baa=a43_0x3fbe,_0x4bd013=_0x4e3e1e();while(!![]){try{const _0x35d10a=-parseInt(_0x2c7baa(0x19c))/0x1*(-parseInt(_0x2c7baa(0x1ac))/0x2)+-parseInt(_0x2c7baa(0x1a1))/0x3+-parseInt(_0x2c7baa(0x1aa))/0x4+-parseInt(_0x2c7baa(0x1ab))/0x5*(-parseInt(_0x2c7baa(0x1a2))/0x6)+parseInt(_0x2c7baa(0x1a9))/0x7+-parseInt(_0x2c7baa(0x1a8))/0x8+parseInt(_0x2c7baa(0x19b))/0x9;if(_0x35d10a===_0xeec18)break;else _0x4bd013['push'](_0x4bd013['shift']());}catch(_0x1b15e1){_0x4bd013['push'](_0x4bd013['shift']());}}}(a43_0x12c8,0xe91c4));function a43_0x12c8(){const _0x276452=['Omit\x20import\x20statements\x20from\x20generated\x20code','sdk','appCode','no-imports','sqlcode','8860592GPWugE','8894347xkHdED','3722488zmHbMF','5zFtozb','3168178pmBRac','bff','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','read','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','171171VhEsHI','1jmMNDs','str','boolean','target','codegen','2555448ewwXVJ','5826618ynCLoY'];a43_0x12c8=function(){return _0x276452;};return a43_0x12c8();}function a43_0x3fbe(_0x2158e0,_0x52398d){_0x2158e0=_0x2158e0-0x19b;const _0x12c83=a43_0x12c8();let _0x3fbe46=_0x12c83[_0x2158e0];return _0x3fbe46;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0xa697a0(0x1a0),'command':'sql','description':a43_0xa697a0(0x1b0),'risk':a43_0xa697a0(0x1af),'flags':[SQLCODE_FLAG,{'name':a43_0xa697a0(0x19f),'type':'string','description':a43_0xa697a0(0x1ae),'default':'sdk','enum':[a43_0xa697a0(0x1a4),a43_0xa697a0(0x1ad)]},{'name':a43_0xa697a0(0x1a6),'type':a43_0xa697a0(0x19e),'description':a43_0xa697a0(0x1a3)}],async 'execute'(_0x370d58){const _0x3bff70=a43_0xa697a0,_0x542dcf=await getSqlQueryInfo(_0x370d58[_0x3bff70(0x1a5)],_0x370d58[_0x3bff70(0x19d)](_0x3bff70(0x1a7))),_0x4232aa=_0x370d58[_0x3bff70(0x19d)](_0x3bff70(0x19f))||'sdk',_0xe71238=generateSqlCodeTemplate(_0x542dcf,{'target':_0x4232aa,'includeImports':!_0x370d58['bool'](_0x3bff70(0x1a6))});return{'ok':!![],'data':{'sqlCode':_0x542dcf['sqlCode'],'sqlName':_0x542dcf['sqlName'],'target':_0x4232aa,'code':_0xe71238}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x4aba39,_0xb2661e){const _0x14ebba=a44_0x158a,_0x1adfbd=_0x4aba39();while(!![]){try{const _0x1abeb0=parseInt(_0x14ebba(0x1c4))/0x1*(parseInt(_0x14ebba(0x1ea))/0x2)+-parseInt(_0x14ebba(0x1d3))/0x3*(parseInt(_0x14ebba(0x1bb))/0x4)+-parseInt(_0x14ebba(0x1de))/0x5*(parseInt(_0x14ebba(0x1cb))/0x6)+-parseInt(_0x14ebba(0x1e7))/0x7+parseInt(_0x14ebba(0x1e1))/0x8+parseInt(_0x14ebba(0x1d8))/0x9*(-parseInt(_0x14ebba(0x1c8))/0xa)+-parseInt(_0x14ebba(0x1c9))/0xb*(-parseInt(_0x14ebba(0x1c0))/0xc);if(_0x1abeb0===_0xb2661e)break;else _0x1adfbd['push'](_0x1adfbd['shift']());}catch(_0x1201d2){_0x1adfbd['push'](_0x1adfbd['shift']());}}}(a44_0x4a7c,0x9e189));function a44_0x4a7c(){const _0x47e5b4=['1250990zqcwzJ','both','\x20Set\x20as\x20default\x20app.','7138584CUnClm','object','length','globalConfig','appcode','Use\x20global\x20config\x20scope','139216GzQOrM','\x20Note:\x20app\x20\x22','keys','6728wFgcde','4wJHoyM','\x22\x20not\x20found.','Missing\x20app\x20name.','App\x20\x22','Usage:\x20','56976jeOPoh','boolean','App\x20code','project','193JrkLnN','validation','\x20Default\x20app\x20changed\x20to\x20\x22','\x20app\x20\x22','2208410gfUEeB','3784WAwZCU','args','24Yknxtk','\x20<name>\x20--appcode\x20<code>','string','global','\x20<name>\x20[--global]','projectConfig','\x22\x20(appcode:\x20','str','3194892DhjKLN','Added','trim','bool','\x20config.','18hBROPa','flagMissing','inherit','\x20<name>','apps','defaultApp'];a44_0x4a7c=function(){return _0x47e5b4;};return a44_0x4a7c();}function a44_0x158a(_0xd6a173,_0x3a6991){_0xd6a173=_0xd6a173-0x1bb;const _0x4a7c93=a44_0x4a7c();let _0x158ac3=_0x4a7c93[_0xd6a173];return _0x158ac3;}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';export function buildAppAddFlags(){const _0x4cde48=a44_0x158a;return[{'name':_0x4cde48(0x1e5),'type':_0x4cde48(0x1cd),'description':_0x4cde48(0x1c2),'required':!![]},{'name':_0x4cde48(0x1ce),'type':'boolean','description':_0x4cde48(0x1e6),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x1197b7=a44_0x158a;return[{'name':'global','type':_0x1197b7(0x1c1),'description':_0x1197b7(0x1e6),'default':![]}];}export async function validateAppName(_0x281329,_0x2dd934){const _0x50d0b4=a44_0x158a,_0x665d91=_0x281329[_0x50d0b4(0x1ca)][0x0]?.[_0x50d0b4(0x1d5)]();if(!_0x665d91)throw CliErrors['validation'](_0x50d0b4(0x1bd),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x2dd934+_0x50d0b4(0x1db));}export async function runAppAdd(_0x196d0a,_0x42d77d){const _0x2f6d5b=a44_0x158a,_0xb56eba=_0x196d0a[_0x2f6d5b(0x1ca)][0x0]?.[_0x2f6d5b(0x1d5)]();if(!_0xb56eba)throw CliErrors[_0x2f6d5b(0x1c5)](_0x2f6d5b(0x1bd),_0x2f6d5b(0x1bf)+CLI_BIN_NAME+'\x20'+_0x42d77d+_0x2f6d5b(0x1cc));const _0x4dc683=_0x196d0a[_0x2f6d5b(0x1d2)](_0x2f6d5b(0x1e5));if(!_0x4dc683)throw CliErrors[_0x2f6d5b(0x1d9)](_0x2f6d5b(0x1e5),_0x2f6d5b(0x1bf)+CLI_BIN_NAME+'\x20'+_0x42d77d+_0x2f6d5b(0x1cc));const _0x18515c={'global':_0x196d0a[_0x2f6d5b(0x1d6)]('global')},_0x24d9fa=readConfig(_0x18515c);if(!_0x24d9fa[_0x2f6d5b(0x1dc)])_0x24d9fa[_0x2f6d5b(0x1dc)]={};const _0x1e681e={'appcode':_0x4dc683,...collectAppProfileOverrides(_0x57b97f=>_0x196d0a[_0x2f6d5b(0x1d2)](_0x57b97f))},_0x477ad9=_0x24d9fa[_0x2f6d5b(0x1dc)],_0x12be03=!!_0x477ad9[_0xb56eba];_0x477ad9[_0xb56eba]=_0x1e681e;if(!_0x24d9fa[_0x2f6d5b(0x1dd)])_0x24d9fa['defaultApp']=_0xb56eba;writeConfig(_0x24d9fa,_0x18515c);const _0x1b21c3=!_0x12be03&&_0x24d9fa['defaultApp']===_0xb56eba?_0x2f6d5b(0x1e0):'',_0x2a1ce4=(_0x12be03?'Updated':_0x2f6d5b(0x1d4))+_0x2f6d5b(0x1c7)+_0xb56eba+_0x2f6d5b(0x1d1)+_0x4dc683+')'+scopeLabel(_0x18515c)+'.'+_0x1b21c3;return{'ok':!![],'message':_0x2a1ce4};}export async function runAppRemove(_0x2cce12,_0x3a2853){const _0x3fd715=a44_0x158a,_0x44b75b=_0x2cce12[_0x3fd715(0x1ca)][0x0]?.[_0x3fd715(0x1d5)]();if(!_0x44b75b)throw CliErrors[_0x3fd715(0x1c5)](_0x3fd715(0x1bd),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x3a2853+_0x3fd715(0x1cf));const _0x1efc0f=_0x2cce12['bool']('global'),{config:_0x25986d,layers:_0x23ca88}=readRawConfigWithLayers(),_0x585081=_0x25986d[_0x3fd715(0x1dc)]??{};if(!_0x585081[_0x44b75b])throw CliErrors['validation']('App\x20\x22'+_0x44b75b+_0x3fd715(0x1bc));const _0x2fb1ee=_0x23ca88[_0x3fd715(0x1e4)][_0x3fd715(0x1dc)]&&typeof _0x23ca88[_0x3fd715(0x1e4)][_0x3fd715(0x1dc)]==='object'?_0x23ca88[_0x3fd715(0x1e4)]['apps']:{},_0x2022b0=_0x23ca88[_0x3fd715(0x1d0)][_0x3fd715(0x1dc)]&&typeof _0x23ca88[_0x3fd715(0x1d0)][_0x3fd715(0x1dc)]===_0x3fd715(0x1e2)?_0x23ca88[_0x3fd715(0x1d0)]['apps']:{},_0x57a48a=appDefinedIn(_0x44b75b,_0x2fb1ee,_0x2022b0,_0x23ca88[_0x3fd715(0x1d0)][_0x3fd715(0x1da)]===![]),_0x1232d0=resolveAppScopeForWrite(_0x44b75b,_0x1efc0f,_0x23ca88),_0x33c421={'global':_0x1232d0===_0x3fd715(0x1ce)},_0x993a4a=readConfig(_0x33c421),_0x1f8881=_0x993a4a['apps'];if(!_0x1f8881||!_0x1f8881[_0x44b75b])throw CliErrors['validation'](_0x3fd715(0x1be)+_0x44b75b+_0x3fd715(0x1bc));delete _0x1f8881[_0x44b75b];let _0xbd3e4f='';if(_0x993a4a[_0x3fd715(0x1dd)]===_0x44b75b){const _0x19e507=Object[_0x3fd715(0x1e9)](_0x1f8881);_0x993a4a['defaultApp']=_0x19e507[_0x3fd715(0x1e3)]>0x0?_0x19e507[0x0]:undefined,_0x993a4a[_0x3fd715(0x1dd)]?_0xbd3e4f=_0x3fd715(0x1c6)+_0x993a4a[_0x3fd715(0x1dd)]+'\x22.':delete _0x993a4a[_0x3fd715(0x1dd)];}Object[_0x3fd715(0x1e9)](_0x1f8881)[_0x3fd715(0x1e3)]===0x0&&(delete _0x993a4a[_0x3fd715(0x1dc)],delete _0x993a4a[_0x3fd715(0x1dd)]);writeConfig(_0x993a4a,_0x33c421);const _0x39a64f=_0x57a48a===_0x3fd715(0x1df)?_0x3fd715(0x1e8)+_0x44b75b+'\x22\x20still\x20defined\x20in\x20'+(_0x1232d0==='project'?_0x3fd715(0x1ce):_0x3fd715(0x1c3))+_0x3fd715(0x1d7):'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0x44b75b+'\x22'+scopeLabel(_0x33c421)+'.'+_0xbd3e4f+_0x39a64f};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a45_0x2d06(){const _0xb87a6a=['2157288PMeeOV','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','includes','Invalid\x20App\x20Code','157494EEfvgq','✎\x20自定义输入\x20appcode','gray','skip','337340kFkicx','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','正在获取可用应用列表...','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','6rGSjIz','map','请选择要绑定的应用:','cyan','trim','appCode','appName','yellow','\x0a未找到可用应用。','10wOJHFR','167169yqZCIQ','length','2250693yIaBXv','valid','1048565UbTdAR','(跳过,稍后配置)','find','message','319402zLixmc','App\x20Code:','\x20\x20(','custom'];a45_0x2d06=function(){return _0xb87a6a;};return a45_0x2d06();}function a45_0x47cb(_0x321624,_0x2dcb66){_0x321624=_0x321624-0x1ed;const _0x2d06e9=a45_0x2d06();let _0x47cbdb=_0x2d06e9[_0x321624];return _0x47cbdb;}(function(_0x1c9fc8,_0x4ccded){const _0x22822e=a45_0x47cb,_0x25d6e1=_0x1c9fc8();while(!![]){try{const _0x1bf3bc=parseInt(_0x22822e(0x209))/0x1+-parseInt(_0x22822e(0x201))/0x2+-parseInt(_0x22822e(0x1f9))/0x3+parseInt(_0x22822e(0x20d))/0x4*(-parseInt(_0x22822e(0x1f8))/0x5)+-parseInt(_0x22822e(0x1ef))/0x6*(parseInt(_0x22822e(0x1fd))/0x7)+parseInt(_0x22822e(0x205))/0x8+parseInt(_0x22822e(0x1fb))/0x9;if(_0x1bf3bc===_0x4ccded)break;else _0x25d6e1['push'](_0x25d6e1['shift']());}catch(_0xbb476){_0x25d6e1['push'](_0x25d6e1['shift']());}}}(a45_0x2d06,0x22fef));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x4067af 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 _0x3a4d33=a45_0x47cb,_0x5c8a60=await input({'message':'请输入\x20App\x20Code:','validate':_0x262b2d=>{const _0x20ce33=a45_0x47cb,_0x161bac=validateAppcode(_0x262b2d[_0x20ce33(0x1f3)]());return _0x161bac[_0x20ce33(0x1fc)]||_0x161bac['message']||_0x20ce33(0x208);}});return _0x5c8a60[_0x3a4d33(0x1f3)]();}export async function promptAppSelection(_0x5aaf5a){const _0xd12b11=a45_0x47cb,_0x1a7910=[{'name':a45_0x4067af[_0xd12b11(0x1f6)](_0xd12b11(0x20a)),'value':-0x1},..._0x5aaf5a['map']((_0x45a776,_0x2fa56e)=>({'name':_0x45a776[_0xd12b11(0x1f5)]+'\x20\x20'+a45_0x4067af[_0xd12b11(0x20b)]('('+_0x45a776[_0xd12b11(0x1f4)]+')'),'value':_0x2fa56e}))],_0x3a0a01=await checkbox({'message':'获取到\x20'+a45_0x4067af[_0xd12b11(0x1f2)](_0x5aaf5a['length'])+_0xd12b11(0x206),'choices':_0x1a7910,'loop':![]});if(_0x3a0a01[_0xd12b11(0x207)](-0x1))return'custom';if(_0x3a0a01[_0xd12b11(0x1fa)]===0x0)return _0xd12b11(0x204);return _0x3a0a01[_0xd12b11(0x1f0)](_0x52fcce=>_0x5aaf5a[_0x52fcce]);}export async function promptSingleAppSelection(_0x1f7202){const _0x50e236=a45_0x47cb,_0x5d22e4=[{'name':a45_0x4067af['gray'](_0x50e236(0x20e)),'value':_0x50e236(0x20c)},{'name':a45_0x4067af[_0x50e236(0x1f6)]('✎\x20自定义输入\x20appcode'),'value':_0x50e236(0x204)},..._0x1f7202[_0x50e236(0x1f0)](_0x1e507e=>({'name':_0x1e507e[_0x50e236(0x1f5)]+'\x20\x20'+a45_0x4067af['gray']('('+_0x1e507e[_0x50e236(0x1f4)]+')'),'value':_0x1e507e[_0x50e236(0x1f4)]}))],_0x52664a=await select({'message':_0x50e236(0x1f1),'choices':_0x5d22e4});if(_0x52664a===_0x50e236(0x20c))return _0x50e236(0x20c);if(_0x52664a===_0x50e236(0x204))return _0x50e236(0x204);return _0x1f7202[_0x50e236(0x1ff)](_0x4c68b4=>_0x4c68b4[_0x50e236(0x1f4)]===_0x52664a);}export async function selectSingleAppcode(_0x2e3f55){const _0xc19c49=a45_0x47cb;if(!_0x2e3f55)return writeCliSideChannelLine(a45_0x4067af[_0xc19c49(0x20b)](_0xc19c49(0x1ee))),_fallbackOrSkip();writeCliSideChannelLine(_0xc19c49(0x1ed));let _0x4133fc;try{_0x4133fc=await withActiveCookie(_0x2e3f55,()=>listRemoteApps());}catch(_0x35a696){writeCliSideChannelLine(a45_0x4067af['yellow']('无法获取远程应用列表,请手动输入。'));if(_0x35a696 instanceof Error)writeCliSideChannelLine(a45_0x4067af[_0xc19c49(0x20b)](_0xc19c49(0x203)+_0x35a696[_0xc19c49(0x200)]+')'));return _fallbackOrSkip();}if(_0x4133fc['length']===0x0)return writeCliSideChannelLine(a45_0x4067af['yellow']('未找到可用应用。')),_fallbackOrSkip();const _0xc255ac=await promptSingleAppSelection(_0x4133fc);if(_0xc255ac===_0xc19c49(0x20c))return'';if(_0xc255ac==='custom')return promptCustomAppcode();return _0xc255ac['appCode'];}export async function selectMultipleApps(_0x42ce42){const _0x28df3a=a45_0x47cb;writeCliSideChannelLine('正在获取可用应用列表...');let _0x5095b3;try{_0x5095b3=await withActiveCookie(_0x42ce42,()=>listRemoteApps());}catch(_0x291182){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0x291182 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x291182['message']+')');return _0x28df3a(0x204);}if(_0x5095b3[_0x28df3a(0x1fa)]===0x0)return writeCliSideChannelLine(_0x28df3a(0x1f7)),'custom';return promptAppSelection(_0x5095b3);}async function _fallbackOrSkip(){const _0x2c127d=a45_0x47cb,_0x27ac81=await select({'message':_0x2c127d(0x202),'choices':[{'name':a45_0x4067af[_0x2c127d(0x20b)](_0x2c127d(0x1fe)),'value':'skip'},{'name':a45_0x4067af[_0x2c127d(0x1f6)]('✎\x20手动输入'),'value':'manual'}]});if(_0x27ac81===_0x2c127d(0x20c))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x3769d9=a46_0x5ba7;(function(_0x354920,_0xceec4){const _0x23135f=a46_0x5ba7,_0x23357a=_0x354920();while(!![]){try{const _0x1b8f93=-parseInt(_0x23135f(0x97))/0x1+-parseInt(_0x23135f(0x9f))/0x2*(parseInt(_0x23135f(0xa3))/0x3)+-parseInt(_0x23135f(0xa4))/0x4*(-parseInt(_0x23135f(0x93))/0x5)+-parseInt(_0x23135f(0xa1))/0x6*(-parseInt(_0x23135f(0xac))/0x7)+parseInt(_0x23135f(0x9a))/0x8+-parseInt(_0x23135f(0xb4))/0x9+parseInt(_0x23135f(0xab))/0xa*(-parseInt(_0x23135f(0xb3))/0xb);if(_0x1b8f93===_0xceec4)break;else _0x23357a['push'](_0x23357a['shift']());}catch(_0x397ed8){_0x23357a['push'](_0x23357a['shift']());}}}(a46_0x5b88,0xcb044));function a46_0x5ba7(_0x2433de,_0x30363c){_0x2433de=_0x2433de-0x92;const _0x5b88ba=a46_0x5b88();let _0x5ba7aa=_0x5b88ba[_0x2433de];return _0x5ba7aa;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0x3769d9(0xaa),a46_0x3769d9(0x9e)]),NON_TERMINAL_STATUSES=new Set([a46_0x3769d9(0x9d),'PROCESSING']);export function normalizeAsyncTask(_0x2ca6fe){const _0x7db644=a46_0x3769d9,_0x1109e4=typeof _0x2ca6fe?.[_0x7db644(0xb1)]===_0x7db644(0x95)?_0x2ca6fe['taskId'][_0x7db644(0xa0)]():'';if(!_0x1109e4)throw CliErrors[_0x7db644(0x99)](_0x7db644(0xae));const _0x31cffa=typeof _0x2ca6fe['status']===_0x7db644(0x95)?_0x2ca6fe[_0x7db644(0x92)][_0x7db644(0xa0)]()[_0x7db644(0x9c)]():'';if(!_0x31cffa)throw CliErrors[_0x7db644(0x99)](_0x7db644(0xb2)+_0x1109e4+_0x7db644(0xa9));return{'taskId':_0x1109e4,'status':_0x31cffa,'errorMessage':typeof _0x2ca6fe['errorMessage']===_0x7db644(0x95)&&_0x2ca6fe['errorMessage']['trim']()?_0x2ca6fe['errorMessage'][_0x7db644(0xa0)]():null,'isTerminal':TERMINAL_STATUSES[_0x7db644(0x94)](_0x31cffa),'knownStatus':TERMINAL_STATUSES[_0x7db644(0x94)](_0x31cffa)||NON_TERMINAL_STATUSES[_0x7db644(0x94)](_0x31cffa)};}export function buildAsyncTaskStatusCommand(_0x3e412b,_0x316b0e){const _0x2bdb04=a46_0x3769d9;return CLI_BIN_NAME+_0x2bdb04(0xaf)+quoteShellArg(_0x3e412b)+_0x2bdb04(0xa5)+quoteShellArg(_0x316b0e)+_0x2bdb04(0x96);}export function asyncTaskMessage(_0x2bf610){const _0x317474=a46_0x3769d9;switch(_0x2bf610[_0x317474(0x92)]){case _0x317474(0x9d):return _0x317474(0xa6)+_0x2bf610[_0x317474(0xb1)]+_0x317474(0xa2);case _0x317474(0xb0):return _0x317474(0xa6)+_0x2bf610[_0x317474(0xb1)]+_0x317474(0xad);case'SUCCESS':return _0x317474(0xa6)+_0x2bf610[_0x317474(0xb1)]+_0x317474(0xa8);case'FAILED':return _0x2bf610[_0x317474(0x9b)]?_0x317474(0xa6)+_0x2bf610[_0x317474(0xb1)]+'\x20failed:\x20'+_0x2bf610['errorMessage']:_0x317474(0xa6)+_0x2bf610[_0x317474(0xb1)]+'\x20failed.';default:return _0x317474(0xa6)+_0x2bf610[_0x317474(0xb1)]+'\x20returned\x20unknown\x20status\x20'+_0x2bf610['status']+'.';}}function quoteShellArg(_0x576a50){const _0x2a5a76=a46_0x3769d9;return'\x27'+_0x576a50[_0x2a5a76(0x98)](/'/g,_0x2a5a76(0xa7))+'\x27';}function a46_0x5b88(){const _0x52e469=['has','string','\x20--format\x20compress','664946PKaaaM','replace','apiError','9996560GxLaIq','errorMessage','toUpperCase','PENDING','FAILED','2869110OQpotp','trim','24IDaQIm','\x20is\x20pending.','3frdetb','452PeQiRu','\x20--appcode\x20','Task\x20','\x27\x5c\x27\x27','\x20completed\x20successfully.','\x20response\x20did\x20not\x20contain\x20a\x20status.','SUCCESS','310DoRwZi','1551025mcfbrb','\x20is\x20processing.','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','\x20task\x20status\x20--task-id\x20','PROCESSING','taskId','Async\x20task\x20','45001jMWmOI','4257810bUhKIx','status','61730kvjsEa'];a46_0x5b88=function(){return _0x52e469;};return a46_0x5b88();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a47_0x4c14(_0x362e7e,_0x1f35a5){_0x362e7e=_0x362e7e-0x1a8;var _0x12836f=a47_0x1283();var _0x4c14ad=_0x12836f[_0x362e7e];return _0x4c14ad;}function a47_0x1283(){var _0x15f590=['45GMJEkW','505752yaKyrd','defineProperties','1824180gQkSDQ','19732HWMfxl','3948736MPHraT','2149760QkPNNy','4ozoazs','description','102hwPLlt','440778NmfQvR','method','3723642WzAbZT','28MGUTWn'];a47_0x1283=function(){return _0x15f590;};return a47_0x1283();}(function(_0x4cbf2f,_0xc75917){var _0x2c44fd=a47_0x4c14,_0x24ceae=_0x4cbf2f();while(!![]){try{var _0x2c87b8=-parseInt(_0x2c44fd(0x1ad))/0x1*(-parseInt(_0x2c44fd(0x1a8))/0x2)+-parseInt(_0x2c44fd(0x1ae))/0x3*(-parseInt(_0x2c44fd(0x1ab))/0x4)+-parseInt(_0x2c44fd(0x1aa))/0x5+parseInt(_0x2c44fd(0x1b0))/0x6+parseInt(_0x2c44fd(0x1b1))/0x7*(-parseInt(_0x2c44fd(0x1b3))/0x8)+parseInt(_0x2c44fd(0x1b2))/0x9*(-parseInt(_0x2c44fd(0x1b5))/0xa)+parseInt(_0x2c44fd(0x1a9))/0xb;if(_0x2c87b8===_0xc75917)break;else _0x24ceae['push'](_0x24ceae['shift']());}catch(_0x55cfc5){_0x24ceae['push'](_0x24ceae['shift']());}}}(a47_0x1283,0x83543));export function asDryRunResult(_0x29d787,_0x5305ff){var _0x482198=a47_0x4c14;return Object[_0x482198(0x1b4)](_0x29d787,{'method':{'value':_0x5305ff[_0x482198(0x1af)],'enumerable':![]},'url':{'value':_0x5305ff['url'],'enumerable':![]},..._0x5305ff['description']?{'description':{'value':_0x5305ff[_0x482198(0x1ac)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a48_0x21f6fc=a48_0x5168;function a48_0x5168(_0x3dccaf,_0x479553){_0x3dccaf=_0x3dccaf-0x76;const _0x24a94b=a48_0x24a9();let _0x516878=_0x24a94b[_0x3dccaf];return _0x516878;}(function(_0x5cee45,_0x54ce79){const _0x464622=a48_0x5168,_0x4eba1c=_0x5cee45();while(!![]){try{const _0x2b4f29=-parseInt(_0x464622(0x7b))/0x1*(parseInt(_0x464622(0x8a))/0x2)+parseInt(_0x464622(0x82))/0x3*(parseInt(_0x464622(0x84))/0x4)+parseInt(_0x464622(0x81))/0x5*(parseInt(_0x464622(0x8f))/0x6)+-parseInt(_0x464622(0x8d))/0x7+-parseInt(_0x464622(0x7a))/0x8*(parseInt(_0x464622(0x79))/0x9)+-parseInt(_0x464622(0x89))/0xa*(-parseInt(_0x464622(0x7f))/0xb)+-parseInt(_0x464622(0x7c))/0xc;if(_0x2b4f29===_0x54ce79)break;else _0x4eba1c['push'](_0x4eba1c['shift']());}catch(_0x3541ab){_0x4eba1c['push'](_0x4eba1c['shift']());}}}(a48_0x24a9,0x3a48e));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a48_0x21f6fc(0x7e)};export const CODE_FLAG={'name':a48_0x21f6fc(0x86),'type':'string','required':!![],'description':a48_0x21f6fc(0x78),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a48_0x21f6fc(0x78)};export const SQLCODE_FLAG={'name':a48_0x21f6fc(0x8c),'type':a48_0x21f6fc(0x77),'required':!![],'description':a48_0x21f6fc(0x88),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x21f6fc(0x87)}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0x21f6fc(0x83),'type':'string','required':![],'description':a48_0x21f6fc(0x85)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x21f6fc(0x8e)};function a48_0x24a9(){const _0x497557=['200511JUaFJs','56elCwCz','79102miWuhO','2358648lCBhZD','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','2483679EnkeuC','dbtype','211865XOMbAX','15eeqYml','appcode','347264qPPBbX','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','code','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','20ISGcUE','8AJxyna','POSTGRESQL','sqlcode','1329118iQchTc','App\x20code\x20(e.g.\x20app-xxxxx)','30BqxzKZ','number','string','Dataset\x20code\x20(32-char\x20hex\x20UUID)'];a48_0x24a9=function(){return _0x497557;};return a48_0x24a9();}export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x21f6fc(0x76),'required':!![],'description':a48_0x21f6fc(0x7d)};export const DB_TYPE_FLAG={'name':a48_0x21f6fc(0x80),'type':a48_0x21f6fc(0x77),'required':!![],'description':'Database\x20product\x20type','enum':['MYSQL',a48_0x21f6fc(0x8b)]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5cb0be,_0x10444e){const _0x942bb4=a49_0xab9b,_0x1cb694=_0x5cb0be();while(!![]){try{const _0x2f44a5=-parseInt(_0x942bb4(0x1e7))/0x1*(parseInt(_0x942bb4(0x1d9))/0x2)+-parseInt(_0x942bb4(0x1e1))/0x3+-parseInt(_0x942bb4(0x1e3))/0x4*(-parseInt(_0x942bb4(0x1dc))/0x5)+parseInt(_0x942bb4(0x1e8))/0x6+parseInt(_0x942bb4(0x1db))/0x7*(-parseInt(_0x942bb4(0x1da))/0x8)+parseInt(_0x942bb4(0x1d8))/0x9*(-parseInt(_0x942bb4(0x1e2))/0xa)+parseInt(_0x942bb4(0x1df))/0xb*(parseInt(_0x942bb4(0x1e6))/0xc);if(_0x2f44a5===_0x10444e)break;else _0x1cb694['push'](_0x1cb694['shift']());}catch(_0x486c15){_0x1cb694['push'](_0x1cb694['shift']());}}}(a49_0x5edd,0xd66fd));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a49_0xab9b(_0x1ecc89,_0x3c4451){_0x1ecc89=_0x1ecc89-0x1d6;const _0x5eddf6=a49_0x5edd();let _0xab9b62=_0x5eddf6[_0x1ecc89];return _0xab9b62;}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a49_0x5edd(){const _0x2b00f2=['58XgwYhF','8MZKKjA','573251dZLnRL','5045eruqMu','File\x20is\x20not\x20a\x20regular\x20file:\x20','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','16788695cMemDJ','isFile','4039776hHalHG','45010mIzZXz','6884BAffMo','File\x20not\x20found:\x20','toFixed','12IiCrXo','17083PXfrzP','2773176VyBHnQ','validation','trim','size','1845SxxWsk'];a49_0x5edd=function(){return _0x2b00f2;};return a49_0x5edd();}function formatBytes(_0x402d34){const _0x52201f=a49_0xab9b;if(_0x402d34>=BYTES_PER_MB){const _0x5d207a=Math['ceil'](_0x402d34/BYTES_PER_MB*0x64)/0x64;return _0x5d207a[_0x52201f(0x1e5)](0x2)+'\x20MB';}return _0x402d34+'\x20B';}export function requireDevelopmentUploadFile(_0x440c8b,_0x45762d){const _0x56e3cc=a49_0xab9b,_0x139b6f=_0x440c8b[_0x56e3cc(0x1d6)]();if(!_0x139b6f)throw CliErrors[_0x56e3cc(0x1e9)](_0x45762d+'\x20path\x20is\x20required.');if(!existsSync(_0x139b6f))throw CliErrors[_0x56e3cc(0x1e9)](_0x56e3cc(0x1e4)+_0x139b6f);const _0x1dcb8c=statSync(_0x139b6f);if(!_0x1dcb8c[_0x56e3cc(0x1e0)]())throw CliErrors[_0x56e3cc(0x1e9)](_0x56e3cc(0x1dd)+_0x139b6f);if(_0x1dcb8c[_0x56e3cc(0x1d7)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x56e3cc(0x1e9)](_0x56e3cc(0x1de)+_0x139b6f+'\x20('+formatBytes(_0x1dcb8c[_0x56e3cc(0x1d7)])+')');return{'path':_0x139b6f,'size':_0x1dcb8c[_0x56e3cc(0x1d7)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a50_0x2575(_0x2c7e49,_0x34fbdf){_0x2c7e49=_0x2c7e49-0x1b5;const _0x192695=a50_0x1926();let _0x2575df=_0x192695[_0x2c7e49];return _0x2575df;}(function(_0x16d444,_0x41e184){const _0x374e09=a50_0x2575,_0x37a7ce=_0x16d444();while(!![]){try{const _0x2163fc=-parseInt(_0x374e09(0x1b6))/0x1+-parseInt(_0x374e09(0x1be))/0x2*(-parseInt(_0x374e09(0x1c1))/0x3)+parseInt(_0x374e09(0x1b5))/0x4*(parseInt(_0x374e09(0x1ba))/0x5)+-parseInt(_0x374e09(0x1c2))/0x6*(parseInt(_0x374e09(0x1bd))/0x7)+-parseInt(_0x374e09(0x1bc))/0x8+-parseInt(_0x374e09(0x1bf))/0x9*(-parseInt(_0x374e09(0x1bb))/0xa)+-parseInt(_0x374e09(0x1b8))/0xb*(-parseInt(_0x374e09(0x1c3))/0xc);if(_0x2163fc===_0x41e184)break;else _0x37a7ce['push'](_0x37a7ce['shift']());}catch(_0x239db0){_0x37a7ce['push'](_0x37a7ce['shift']());}}}(a50_0x1926,0xee2a2));export function validateAppcode(_0x2b0341){const _0x3a5c4f=a50_0x2575,_0x239487=_0x2b0341['trim']();if(!_0x239487)return{'valid':![],'message':_0x3a5c4f(0x1b7)};if(_0x239487['length']>0x64)return{'valid':![],'message':_0x3a5c4f(0x1c0)};if(!/^[A-Za-z0-9_-]+$/[_0x3a5c4f(0x1b9)](_0x239487))return{'valid':![],'message':_0x3a5c4f(0x1c4)};return{'valid':!![]};}function a50_0x1926(){const _0x98f95f=['Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','188VtZdES','106157mOCBRQ','App\x20Code\x20cannot\x20be\x20empty','11KVGSuB','test','28540AlsUkt','90wkcROm','13110024PoCZAg','518gEkRSY','1254sJzIjX','1070469qfcxhL','App\x20Code\x20cannot\x20exceed\x20100\x20characters','1014VnkwQg','57144nTkyYA','22494444XEkDQr'];a50_0x1926=function(){return _0x98f95f;};return a50_0x1926();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a51_0x594c75=a51_0x126c;(function(_0x1dfd24,_0x4a83ca){const _0x52ebb9=a51_0x126c,_0x5df66b=_0x1dfd24();while(!![]){try{const _0x1595e9=-parseInt(_0x52ebb9(0xe8))/0x1*(parseInt(_0x52ebb9(0xf0))/0x2)+parseInt(_0x52ebb9(0xf3))/0x3*(parseInt(_0x52ebb9(0xf1))/0x4)+parseInt(_0x52ebb9(0xe3))/0x5+parseInt(_0x52ebb9(0xec))/0x6+parseInt(_0x52ebb9(0xe7))/0x7*(parseInt(_0x52ebb9(0xeb))/0x8)+-parseInt(_0x52ebb9(0xea))/0x9*(parseInt(_0x52ebb9(0xe2))/0xa)+parseInt(_0x52ebb9(0xef))/0xb;if(_0x1595e9===_0x4a83ca)break;else _0x5df66b['push'](_0x5df66b['shift']());}catch(_0x7cd3cc){_0x5df66b['push'](_0x5df66b['shift']());}}}(a51_0x368f,0xaeb95));import{CliErrors}from'../../errors.js';function a51_0x126c(_0x37cc7e,_0x82cae6){_0x37cc7e=_0x37cc7e-0xe1;const _0x368f28=a51_0x368f();let _0x126ce3=_0x368f28[_0x37cc7e];return _0x126ce3;}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x3dc606){const _0x9d48f2=a51_0x126c,_0x3ed210=_0x3dc606[_0x9d48f2(0xf2)](_0x9d48f2(0xf5));if(!_0x3ed210)throw CliErrors[_0x9d48f2(0xe4)](_0x9d48f2(0xf4),_0x9d48f2(0xe5)+CLI_BIN_NAME+_0x9d48f2(0xed));const _0x1cc0db=readConfig(),_0x5ce932=_0x3ed210==='app'?_0x9d48f2(0xe9):_0x3ed210,_0x52fc22=_0x1cc0db[_0x5ce932];if(_0x52fc22===undefined)throw CliErrors[_0x9d48f2(0xe4)](_0x9d48f2(0xe1)+_0x3ed210);return{'ok':!![],'data':typeof _0x52fc22===_0x9d48f2(0xee)?_0x52fc22:{[_0x5ce932]:_0x52fc22},'message':typeof _0x52fc22===_0x9d48f2(0xee)?undefined:String(_0x52fc22)};}function a51_0x368f(){const _0x43b9f5=['1400916MwzVKu','14ybeBMy','1208420blwfFX','str','3HwgxIk','Missing\x20key.','key','read','Key\x20not\x20found:\x20','780790dIYroB','6684715CbDqiu','validation','Usage:\x20','config','2163553icAIrE','167942KvJpGe','appcode','99fXFAhF','8ibpPkI','4047894WNfwId','\x20config\x20get\x20--key\x20<key>','object'];a51_0x368f=function(){return _0x43b9f5;};return a51_0x368f();}export const configGetDefinition={'service':a51_0x594c75(0xe6),'command':'get','description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a51_0x594c75(0xf6),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a51_0x594c75(0xf5),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|