@lovrabet/rabetbase-cli 2.3.10-beta.2 → 2.3.11-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/external-link-create.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/move.js +1 -0
- 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
|
+
const a36_0x1204d8=a36_0x184c;(function(_0x14aedc,_0x1f0b8a){const _0x59513d=a36_0x184c,_0x21c246=_0x14aedc();while(!![]){try{const _0x363e51=parseInt(_0x59513d(0xe4))/0x1+parseInt(_0x59513d(0xff))/0x2*(parseInt(_0x59513d(0xf4))/0x3)+parseInt(_0x59513d(0xf0))/0x4*(parseInt(_0x59513d(0xdc))/0x5)+parseInt(_0x59513d(0x102))/0x6+parseInt(_0x59513d(0xd4))/0x7+parseInt(_0x59513d(0xec))/0x8*(parseInt(_0x59513d(0xcf))/0x9)+-parseInt(_0x59513d(0xed))/0xa;if(_0x363e51===_0x1f0b8a)break;else _0x21c246['push'](_0x21c246['shift']());}catch(_0x366ff9){_0x21c246['push'](_0x21c246['shift']());}}}(a36_0x1328,0xbf76d));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';function a36_0x184c(_0x1e810a,_0x315245){_0x1e810a=_0x1e810a-0xc3;const _0x1328fe=a36_0x1328();let _0x184cdf=_0x1328fe[_0x1e810a];return _0x184cdf;}import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';function a36_0x1328(){const _0x2ecb7b=['map','string','/api/management/library/scripts/list?appCode=','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','&type=','98906gkbfuZ','utf8','apps','4318512AsKNDL','length','would_pull','functions','functionName','GET','hash','functionNode','all','conflict','scriptsRoot','lockFilePath','Remote\x20script\x20missing\x20content.','toISOString','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','Pull\x20only\x20this\x20script\x20type','force','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','9tLDTmh','nonInteractive','scriptContent','Pull\x20complete:\x20','skipped','2948281NsjIfH','filePath','HOOK','type','push','bff','validation','operationType','5621095ZrgqeS','question','No\x20remote\x20BFF\x20scripts\x20found.','local\x20unsynced\x20changes','version','datasetCode','pull','appCode','1269443scVAeK','parse','\x20skipped,\x20','alias','lockKey','trim','\x20pulled,\x20','apiDir','11099568YtJLoO','52257720ypLrey','close','hookLocation','4hLqvZZ','bool','includes','Remote\x20script\x20missing\x20id.','66iRaTnJ','stdin','yes','\x20failed','unresolvable\x20target\x20path','Force\x20overwrite\x20local\x20unsynced\x20changes'];a36_0x1328=function(){return _0x2ecb7b;};return a36_0x1328();}import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x1204d8(0xd9),'command':a36_0x1204d8(0xe2),'description':a36_0x1204d8(0xcb),'risk':'write','flags':[{'name':a36_0x1204d8(0xd7),'type':a36_0x1204d8(0xfb),'description':a36_0x1204d8(0xcc),'enum':['COMMON','ENDPOINT',a36_0x1204d8(0xd6)]},{'name':a36_0x1204d8(0xcd),'type':'boolean','description':a36_0x1204d8(0xf9)}],async 'dryRun'(_0x13589a){const _0x5759e5=a36_0x1204d8,_0x1e4d3a=loadBffProjectConfig(_0x13589a[_0x5759e5(0xe3)]),_0x234f39=await readBffLockFile(_0x1e4d3a[_0x5759e5(0xc8)]),{appLock:_0x55e495}=ensureLockScope(_0x234f39??createEmptyBffLock(),_0x13589a['appCode'],_0x1e4d3a[_0x5759e5(0xc7)],_0x5759e5(0xe2)),_0x55688b=normalizeBffType(_0x13589a['str']('type'))??undefined,_0x4401ff=buildDatasetCodeToAliasMap(_0x13589a['apiDir'],_0x13589a[_0x5759e5(0xe3)]),[_0x82992b,_0x4326a9]=await Promise[_0x5759e5(0xc5)]([listBffScripts(_0x13589a[_0x5759e5(0xe3)],_0x55688b),getBffScriptStatistics(_0x13589a[_0x5759e5(0xe3)])]),_0x65b987=createHookLocationMap(_0x4326a9),_0x3703f1=[];for(const _0x3d02eb of _0x82992b){const _0x4b16a0=resolveRemoteScriptTarget(_0x1e4d3a,_0x3d02eb,_0x65b987,_0x55e495['functions'],_0x4401ff);if(!_0x4b16a0){_0x3703f1[_0x5759e5(0xd8)]({'scriptType':_0x3d02eb['scriptType'],'functionName':_0x3d02eb['functionName']??'','status':_0x5759e5(0xd3),'reason':_0x5759e5(0xf8)});continue;}const _0xecada8=_0x55e495['functions'][_0x4b16a0[_0x5759e5(0xe8)]],_0xb66cb3=_0x3d02eb['scriptContent']!=null?computeContentHash(_0x3d02eb[_0x5759e5(0xd1)]):undefined,_0x3c57bc=await hasUnsyncedLocalChanges(_0x4b16a0[_0x5759e5(0xd5)],_0xecada8,_0xb66cb3);_0x3703f1['push']({'lockKey':_0x4b16a0[_0x5759e5(0xe8)],'filePath':_0x4b16a0[_0x5759e5(0xd5)],'remoteId':_0x3d02eb['id']??null,'status':_0x3c57bc?_0x5759e5(0xc6):_0x5759e5(0x104)});}return{'method':_0x5759e5(0x107),'url':_0x5759e5(0xfc)+_0x13589a[_0x5759e5(0xe3)]+(_0x55688b?_0x5759e5(0xfe)+_0x55688b:''),'body':{'appCode':_0x13589a[_0x5759e5(0xe3)],'filterType':_0x55688b??null,'files':_0x3703f1},'description':'Would\x20inspect\x20'+_0x3703f1[_0x5759e5(0x103)]+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x220032){const _0x5700a0=a36_0x1204d8,_0x53ad72=loadBffProjectConfig(_0x220032[_0x5700a0(0xe3)]),_0x3f17b9=await readBffLockFile(_0x53ad72[_0x5700a0(0xc8)]),{lockData:_0x563c39,appLock:_0x46ee49}=ensureLockScope(_0x3f17b9??createEmptyBffLock(),_0x220032['appCode'],_0x53ad72[_0x5700a0(0xc7)],_0x5700a0(0xe2)),_0x14f9c9=normalizeBffType(_0x220032['str'](_0x5700a0(0xd7)))??undefined;if(_0x220032['str'](_0x5700a0(0xd7))&&!_0x14f9c9)throw CliErrors[_0x5700a0(0xda)](_0x5700a0(0xfd));const [_0x530110,_0x4a85a5]=await Promise[_0x5700a0(0xc5)]([listBffScripts(_0x220032[_0x5700a0(0xe3)],_0x14f9c9),getBffScriptStatistics(_0x220032[_0x5700a0(0xe3)])]);if(_0x530110['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x5700a0(0xde)};const _0x1262a7=_0x220032[_0x5700a0(0xf1)]('force');if(_0x1262a7&&!_0x220032[_0x5700a0(0xd0)]){const _0x1f4d9f=await confirmForce();if(!_0x1f4d9f)throw CliErrors['cancelled']('Force\x20pull\x20cancelled.');}if(_0x1262a7&&_0x220032[_0x5700a0(0xd0)]){}const _0x487864=buildDatasetCodeToAliasMap(_0x220032[_0x5700a0(0xeb)],_0x220032['appCode']),_0xa39cf=createHookLocationMap(_0x4a85a5),_0x2ff980=JSON[_0x5700a0(0xe5)](JSON['stringify'](_0x563c39)),_0x1a4d57=_0x220032['appCode'],_0x52b867=_0x2ff980[_0x5700a0(0x101)][_0x1a4d57];if(!_0x52b867)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x1a4d57+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x13fdf6=[],_0x595080=[],_0xac500=[];for(const _0x302b1e of _0x530110){const _0x1652c9=resolveRemoteScriptTarget(_0x53ad72,_0x302b1e,_0xa39cf,_0x46ee49[_0x5700a0(0x105)],_0x487864);if(!_0x1652c9){_0x595080['push']({'lockKey':_0x302b1e['scriptType']+'/'+_0x302b1e[_0x5700a0(0x106)],'reason':_0x5700a0(0xf8)});continue;}const _0x3b0a23=_0x46ee49['functions'][_0x1652c9[_0x5700a0(0xe8)]];try{if(!_0x302b1e['id'])throw new Error(_0x5700a0(0xf3));if(_0x302b1e['scriptContent']==null)throw new Error(_0x5700a0(0xc9));const _0x4b148c=_0x302b1e[_0x5700a0(0xd1)],_0xe11c84=computeContentHash(_0x4b148c);if(!_0x1262a7){const _0x2c2034=await hasUnsyncedLocalChanges(_0x1652c9[_0x5700a0(0xd5)],_0x3b0a23,_0xe11c84);if(_0x2c2034){_0x595080['push']({'lockKey':_0x1652c9[_0x5700a0(0xe8)],'reason':_0x5700a0(0xdf)});continue;}}await ensureParentDirectory(_0x1652c9[_0x5700a0(0xd5)]),await writeFile(_0x1652c9[_0x5700a0(0xd5)],_0x4b148c,_0x5700a0(0x100));const _0x3c51e9={'hash':_0xe11c84,'remoteId':_0x302b1e['id'],'version':_0x302b1e[_0x5700a0(0xe0)]};_0x1652c9[_0x5700a0(0xd7)]===_0x5700a0(0xd6)&&_0x1652c9['hookLocation']&&(_0x3c51e9['alias']=_0x1652c9[_0x5700a0(0xef)][_0x5700a0(0xe7)],_0x3c51e9[_0x5700a0(0xe1)]=_0x1652c9[_0x5700a0(0xef)]['datasetCode'],_0x3c51e9[_0x5700a0(0xdb)]=_0x1652c9[_0x5700a0(0xef)][_0x5700a0(0xdb)],_0x3c51e9[_0x5700a0(0xc4)]=_0x1652c9['hookLocation'][_0x5700a0(0xc4)]),_0x52b867[_0x5700a0(0x105)][_0x1652c9[_0x5700a0(0xe8)]]=_0x3c51e9,_0x13fdf6[_0x5700a0(0xd8)]({'lockKey':_0x1652c9[_0x5700a0(0xe8)],'remoteId':_0x302b1e['id']});}catch(_0x40b797){_0xac500[_0x5700a0(0xd8)]({'lockKey':_0x1652c9[_0x5700a0(0xe8)],'error':_0x40b797 instanceof Error?_0x40b797['message']:String(_0x40b797)});}}return _0x52b867['lastSync']=new Date()[_0x5700a0(0xca)](),await writeBffLockFile(_0x53ad72[_0x5700a0(0xc8)],_0x2ff980),{'ok':_0xac500[_0x5700a0(0x103)]===0x0,'data':{'pulled':_0x13fdf6,'skipped':_0x595080,'failed':_0xac500},'message':_0x5700a0(0xd2)+_0x13fdf6[_0x5700a0(0x103)]+_0x5700a0(0xea)+_0x595080['length']+_0x5700a0(0xe6)+_0xac500[_0x5700a0(0x103)]+_0x5700a0(0xf7)};}};async function hasUnsyncedLocalChanges(_0x364b76,_0x1d1d42,_0x4e36b6){const _0x260206=a36_0x1204d8;if(!await fileExists(_0x364b76))return![];const _0x4a51ba=await computeFileHash(_0x364b76);if(!_0x1d1d42)return _0x4e36b6?_0x4a51ba!==_0x4e36b6:!![];return _0x4a51ba!==_0x1d1d42[_0x260206(0xc3)];}function buildDatasetCodeToAliasMap(_0x2b42cc,_0x5cd197){const _0x4b68af=a36_0x1204d8,_0x33b10d=loadAliasMap(_0x2b42cc,undefined,resolveApiFilePath(_0x2b42cc,_0x5cd197));return new Map(_0x33b10d[_0x4b68af(0xfa)](_0x6f1a4=>[_0x6f1a4[_0x4b68af(0xe1)],_0x6f1a4[_0x4b68af(0xe7)]]));}async function confirmForce(){const _0x5f9017=a36_0x1204d8,_0x2d31de=createInterface({'input':process[_0x5f9017(0xf5)],'output':process['stderr']}),_0x208e02=await new Promise(_0x1c455f=>{const _0x9bb791=_0x5f9017;_0x2d31de[_0x9bb791(0xdd)](_0x9bb791(0xce),_0x1c455f);});return _0x2d31de[_0x5f9017(0xee)](),['y',_0x5f9017(0xf6)][_0x5f9017(0xf2)](_0x208e02[_0x5f9017(0xe9)]()['toLowerCase']());}
|
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a37_0x534cde=a37_0xe5ab;(function(_0x2cfad3,_0x4071f0){const _0x187b0b=a37_0xe5ab,_0x2d9d3f=_0x2cfad3();while(!![]){try{const _0x31a3f7=-parseInt(_0x187b0b(0xde))/0x1*(-parseInt(_0x187b0b(0xbc))/0x2)+parseInt(_0x187b0b(0xe0))/0x3*(-parseInt(_0x187b0b(0xc9))/0x4)+-parseInt(_0x187b0b(0xe4))/0x5*(-parseInt(_0x187b0b(0xf5))/0x6)+parseInt(_0x187b0b(0xe9))/0x7*(parseInt(_0x187b0b(0xbd))/0x8)+-parseInt(_0x187b0b(0x107))/0x9+-parseInt(_0x187b0b(0xd5))/0xa*(parseInt(_0x187b0b(0xc1))/0xb)+parseInt(_0x187b0b(0xd6))/0xc*(parseInt(_0x187b0b(0xc7))/0xd);if(_0x31a3f7===_0x4071f0)break;else _0x2d9d3f['push'](_0x2d9d3f['shift']());}catch(_0x1360d4){_0x2d9d3f['push'](_0x2d9d3f['shift']());}}}(a37_0x505d,0xf3d6f));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';function a37_0x505d(){const _0x4a2c7e=['high-risk-write','Push\x20only\x20this\x20script\x20type','status','cleared','\x22\x20not\x20found\x20after\x20ensureLockScope.','684330pXZRZT','3132672FUuHjL','toISOString','remoteId',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','join','Local\x20function\x20not\x20found:\x20','string','Runtime\x20script\x20cache\x20cleared.','161bYodQa','lastSync','3XwuUCF','script','push','values','165790xAtOnt','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','Would\x20inspect\x20','COMMON','apiDir','98HManCG','force','lockKey','boolean','scriptsRoot','apps','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','some','HOOK','runtime\x20cache\x20clear\x20failed','Run\x20`','\x20skipped,\x20','180UcDwSu','get','Incomplete\x20HOOK\x20path:\x20','POST','name','update','bool','Push\x20local\x20BFF\x20scripts\x20to\x20remote','Lock\x20scope\x20for\x20app\x20\x22','would_push','description','runtime\x20cache\x20cleared','lockFilePath','\x20failed,\x20','operationType','functions','utf8','attempted','13334409ZakaQy','ENDPOINT','No\x20local\x20BFF\x20functions\x20found.','functionNode','bff','map','Force\x20push\x20ignoring\x20hash\x20protection','type','validation','hash','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','aliasToDatasetCode','12266SIPwVh','721576whQfnd','length','unchanged','\x22.\x20','55nVyDzh','code','filePath','stringify','message','version','39znYImW','every','4822184ZvxXRx','has','datasetCode','alias','appCode','parse','datasetCodeToDataset'];a37_0x505d=function(){return _0x4a2c7e;};return a37_0x505d();}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_0x534cde(0x10b),'command':a37_0x534cde(0xe2),'description':a37_0x534cde(0xfc),'risk':a37_0x534cde(0xd0),'flags':[{'name':a37_0x534cde(0x10e),'type':'string','description':a37_0x534cde(0xd1),'enum':[a37_0x534cde(0xe7),a37_0x534cde(0x108),'HOOK']},{'name':a37_0x534cde(0xf9),'type':a37_0x534cde(0xdc),'description':a37_0x534cde(0x111)},{'name':a37_0x534cde(0xea),'type':a37_0x534cde(0xec),'description':a37_0x534cde(0x10d)}],async 'dryRun'(_0x48759c){const _0x399ae4=a37_0x534cde,_0x5e9dcd=loadBffProjectConfig(_0x48759c[_0x399ae4(0xcd)]),_0x11538d=await readBffLockFile(_0x5e9dcd[_0x399ae4(0x101)]),{appLock:_0x1439d6}=ensureLockScope(_0x11538d??createEmptyBffLock(),_0x48759c[_0x399ae4(0xcd)],_0x5e9dcd[_0x399ae4(0xed)],'push'),_0x14c6f6=await getTargetFunctions(_0x5e9dcd,_0x48759c),_0x5b993c=_0x48759c[_0x399ae4(0xfb)](_0x399ae4(0xea)),_0xde4353=[];for(const _0x639c25 of _0x14c6f6){const _0x2d0ed9=await computeFileHash(_0x639c25['filePath']),_0x90dee1=_0x1439d6[_0x399ae4(0x104)][_0x639c25[_0x399ae4(0xeb)]],_0x35fc39=!!_0x90dee1&&_0x90dee1[_0x399ae4(0x110)]===_0x2d0ed9;_0xde4353[_0x399ae4(0xe2)]({'lockKey':_0x639c25[_0x399ae4(0xeb)],'filePath':_0x639c25[_0x399ae4(0xc3)],'remoteId':_0x90dee1?.[_0x399ae4(0xd8)]??null,'mode':_0x90dee1?.[_0x399ae4(0xd8)]?_0x399ae4(0xfa):'create','status':!_0x5b993c&&_0x35fc39?_0x399ae4(0xbf):_0x399ae4(0xfe)});}return{'method':_0x399ae4(0xf8),'url':'/api/management/library/scripts/save','body':{'appCode':_0x48759c[_0x399ae4(0xcd)],'force':_0x5b993c,'files':_0xde4353,'cacheClearAtRuntime':_0xde4353['some'](_0x3d99e0=>_0x3d99e0[_0x399ae4(0xd2)]==='would_push'),'cacheClearAtRuntimeTimes':_0xde4353[_0x399ae4(0xf0)](_0x1f3666=>_0x1f3666[_0x399ae4(0xd2)]===_0x399ae4(0xfe))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x399ae4(0xe6)+_0xde4353['length']+_0x399ae4(0xe5)};},async 'execute'(_0x5e9d0f){const _0x3e1b41=a37_0x534cde,_0x580da6=loadBffProjectConfig(_0x5e9d0f['appCode']),_0x197375=await readBffLockFile(_0x580da6[_0x3e1b41(0x101)]),{lockData:_0x105828,appLock:_0x334353}=ensureLockScope(_0x197375??createEmptyBffLock(),_0x5e9d0f['appCode'],_0x580da6['scriptsRoot'],_0x3e1b41(0xe2)),_0x9c935d=await getTargetFunctions(_0x580da6,_0x5e9d0f);if(_0x9c935d[_0x3e1b41(0xbe)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x3e1b41(0x109)};const _0x118d1e=_0x5e9d0f['bool'](_0x3e1b41(0xea)),_0x546329=JSON[_0x3e1b41(0xce)](JSON[_0x3e1b41(0xc4)](_0x105828)),_0x505e4f=_0x546329[_0x3e1b41(0xee)][_0x5e9d0f[_0x3e1b41(0xcd)]];if(!_0x505e4f)throw new Error(_0x3e1b41(0xfd)+_0x5e9d0f['appCode']+_0x3e1b41(0xd4));const _0x55d4f4=await buildHookMaps(_0x5e9d0f[_0x3e1b41(0xcd)],_0x5e9d0f[_0x3e1b41(0xe8)],_0x9c935d,_0x505e4f),_0x2c66df=[],_0x36b177=[],_0x1bac04=[];for(const _0x3d6406 of _0x9c935d){const _0x5661ad=await computeFileHash(_0x3d6406[_0x3e1b41(0xc3)]),_0x3f2b44=_0x505e4f[_0x3e1b41(0x104)][_0x3d6406[_0x3e1b41(0xeb)]];if(!_0x118d1e&&_0x3f2b44&&_0x3f2b44[_0x3e1b41(0x110)]===_0x5661ad){_0x36b177['push']({'lockKey':_0x3d6406[_0x3e1b41(0xeb)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x5e9d0f[_0x3e1b41(0xcd)],_0x3d6406,_0x505e4f,_0x55d4f4);const _0x199ad0=_0x505e4f[_0x3e1b41(0x104)][_0x3d6406['lockKey']];_0x2c66df['push']({'lockKey':_0x3d6406[_0x3e1b41(0xeb)],'remoteId':_0x199ad0?.['remoteId']??0x0});}catch(_0x366793){_0x1bac04[_0x3e1b41(0xe2)]({'lockKey':_0x3d6406[_0x3e1b41(0xeb)],'error':_0x366793 instanceof Error?_0x366793['message']:String(_0x366793)});}}_0x505e4f[_0x3e1b41(0xdf)]=new Date()[_0x3e1b41(0xd7)](),await writeBffLockFile(_0x580da6[_0x3e1b41(0x101)],_0x546329),await waitForUploadedLockEntries(_0x580da6['lockFilePath'],_0x5e9d0f[_0x3e1b41(0xcd)],_0x2c66df[_0x3e1b41(0x10c)](_0x24662e=>_0x24662e[_0x3e1b41(0xeb)]));let _0x1bbcf4={'attempted':![],'cleared':![]};if(_0x2c66df[_0x3e1b41(0xbe)]>0x0)try{let _0x18a639='';for(let _0x4ddbca=0x0;_0x4ddbca<CACHE_CLEAR_ATTEMPTS;_0x4ddbca+=0x1){_0x18a639=await clearBffScriptCache(),_0x4ddbca<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x1bbcf4={'attempted':!![],'cleared':!![],'message':_0x18a639||_0x3e1b41(0xdd)};}catch(_0x2a40af){_0x1bbcf4={'attempted':!![],'cleared':![],'error':_0x2a40af instanceof Error?_0x2a40af[_0x3e1b41(0xc5)]:String(_0x2a40af)};}const _0x17b380=_0x1bac04[_0x3e1b41(0xbe)]===0x0&&(_0x1bbcf4[_0x3e1b41(0x106)]?_0x1bbcf4[_0x3e1b41(0xd3)]:!![]),_0x3ee8d8=_0x1bbcf4[_0x3e1b41(0x106)]?_0x1bbcf4[_0x3e1b41(0xd3)]?_0x3e1b41(0x100):_0x3e1b41(0xf2):'runtime\x20cache\x20not\x20needed';return{'ok':_0x17b380,'data':{'uploaded':_0x2c66df,'skipped':_0x36b177,'failed':_0x1bac04,'cacheClear':_0x1bbcf4},'message':'Push\x20complete:\x20'+_0x2c66df[_0x3e1b41(0xbe)]+'\x20uploaded,\x20'+_0x36b177[_0x3e1b41(0xbe)]+_0x3e1b41(0xf4)+_0x1bac04['length']+_0x3e1b41(0x102)+_0x3ee8d8};}};async function getTargetFunctions(_0x1a5618,_0x1c60ef){const _0x2be97e=a37_0x534cde,_0x5d2cb8=_0x1c60ef['str'](_0x2be97e(0x10e)),_0x230050=_0x1c60ef['str'](_0x2be97e(0xf9)),_0x3c6e3d=normalizeBffType(_0x5d2cb8)??undefined;if(_0x230050&&!_0x3c6e3d)throw CliErrors['validation'](_0x2be97e(0xef));const _0x3a448a=await scanLocalBffFunctions(_0x1a5618,_0x3c6e3d);if(_0x230050){const _0x29b7f9=_0x3a448a['filter'](_0x594713=>_0x594713[_0x2be97e(0xf9)]===_0x230050);if(_0x29b7f9[_0x2be97e(0xbe)]===0x0)throw CliErrors[_0x2be97e(0x10f)](_0x2be97e(0xdb)+_0x3c6e3d+'/'+_0x230050);return _0x29b7f9;}return _0x3a448a;}function a37_0xe5ab(_0x15676a,_0x30f218){_0x15676a=_0x15676a-0xba;const _0x505d63=a37_0x505d();let _0xe5ab23=_0x505d63[_0x15676a];return _0xe5ab23;}async function buildHookMaps(_0x5972bc,_0x136cc3,_0x2b051f,_0x5b3aa9){const _0x27b4b6=a37_0x534cde,_0x2f2285=_0x2b051f[_0x27b4b6(0xf0)](_0x567149=>_0x567149[_0x27b4b6(0x10e)]===_0x27b4b6(0xf1));if(!_0x2f2285)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x551414=loadAliasMap(_0x136cc3,undefined,resolveApiFilePath(_0x136cc3,_0x5972bc)),_0x3e4337=new Map(_0x551414[_0x27b4b6(0x10c)](_0x2f01a7=>[_0x2f01a7[_0x27b4b6(0xcc)],_0x2f01a7['datasetCode']]));for(const _0x356971 of Object[_0x27b4b6(0xe3)](_0x5b3aa9['functions'])){_0x356971[_0x27b4b6(0xcc)]&&_0x356971[_0x27b4b6(0xcb)]&&!_0x3e4337[_0x27b4b6(0xca)](_0x356971[_0x27b4b6(0xcc)])&&_0x3e4337['set'](_0x356971[_0x27b4b6(0xcc)],_0x356971['datasetCode']);}const _0x398dd0=await listDatasets(_0x5972bc),_0x1ca7f2=new Map(_0x398dd0[_0x27b4b6(0x10c)](_0x1d136a=>[_0x1d136a[_0x27b4b6(0xc2)],_0x1d136a]));return{'aliasToDatasetCode':_0x3e4337,'datasetCodeToDataset':_0x1ca7f2};}async function uploadSingleFunction(_0x54b84c,_0xb0edb,_0x258ae0,_0x255c6d){const _0x32db12=a37_0x534cde,_0x1dc5e9=await readFile(_0xb0edb[_0x32db12(0xc3)],_0x32db12(0x105)),_0x53da55=await computeFileHash(_0xb0edb[_0x32db12(0xc3)]),_0x30d8b5=_0x258ae0['functions'][_0xb0edb[_0x32db12(0xeb)]];if(_0x30d8b5?.[_0x32db12(0xd8)]&&_0x30d8b5[_0x32db12(0xc6)]==null)throw CliErrors[_0x32db12(0x10f)](_0xb0edb[_0x32db12(0xeb)]+_0x32db12(0xd9));let _0x215214=extractScriptDescription(_0x1dc5e9);if(!_0x215214&&_0x30d8b5?.['remoteId']){const _0x1d6a93=await getBffScriptInfo(_0x30d8b5[_0x32db12(0xd8)]);_0x215214=_0x1d6a93[_0x32db12(0xff)]||undefined;}const _0x5a45a4={'appCode':_0x54b84c,'functionName':_0xb0edb[_0x32db12(0xf9)],'scriptType':_0xb0edb[_0x32db12(0x10e)],'scriptContent':_0x1dc5e9};if(_0x30d8b5?.['remoteId'])_0x5a45a4['id']=_0x30d8b5[_0x32db12(0xd8)];if(_0x30d8b5?.[_0x32db12(0xc6)]!=null)_0x5a45a4['version']=_0x30d8b5[_0x32db12(0xc6)];if(_0x215214)_0x5a45a4[_0x32db12(0xff)]=_0x215214;if(_0xb0edb[_0x32db12(0x10e)]===_0x32db12(0xf1)){const _0x4be558=_0xb0edb[_0x32db12(0xcc)];if(!_0x4be558||!_0xb0edb['operationType']||!_0xb0edb[_0x32db12(0x10a)])throw CliErrors[_0x32db12(0x10f)](_0x32db12(0xf7)+_0xb0edb['lockKey']);const _0x74ccef=_0x255c6d[_0x32db12(0xbb)][_0x32db12(0xf6)](_0x4be558)??_0x30d8b5?.['datasetCode']??_0x4be558,_0x469870=_0x255c6d[_0x32db12(0xcf)][_0x32db12(0xf6)](_0x74ccef);if(!_0x469870)throw CliErrors[_0x32db12(0x10f)]('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x4be558+_0x32db12(0xc0)+(_0x32db12(0xf3)+CLI_BIN_NAME+_0x32db12(0xba)));_0x5a45a4['datasetId']=_0x469870['id'],_0x5a45a4[_0x32db12(0x103)]=_0xb0edb['operationType'],_0x5a45a4['functionNode']=_0xb0edb[_0x32db12(0x10a)];}const _0x15fdf9=await saveBffScript(_0x5a45a4),_0x23e22b=_0x15fdf9['id'],_0x300b6f=_0x15fdf9[_0x32db12(0xe1)]??await getBffScriptInfo(_0x23e22b),_0x69e419={'hash':_0x53da55,'remoteId':_0x23e22b,'version':_0x300b6f[_0x32db12(0xc6)]};if(_0xb0edb[_0x32db12(0x10e)]===_0x32db12(0xf1)){const _0x289175=_0xb0edb[_0x32db12(0xcc)],_0xce1e11=_0x255c6d['aliasToDatasetCode']['get'](_0x289175)??_0x30d8b5?.[_0x32db12(0xcb)]??_0x289175;_0x255c6d[_0x32db12(0xbb)]['has'](_0x289175)?_0x69e419['alias']=_0x289175:_0x69e419[_0x32db12(0xcc)]=_0x30d8b5?.[_0x32db12(0xcc)],_0x69e419[_0x32db12(0xcb)]=_0xce1e11,_0x69e419[_0x32db12(0x103)]=_0xb0edb[_0x32db12(0x103)],_0x69e419[_0x32db12(0x10a)]=_0xb0edb[_0x32db12(0x10a)];}_0x258ae0[_0x32db12(0x104)][_0xb0edb['lockKey']]=_0x69e419;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x29fa07,_0x539103,_0x45376c){const _0x25de68=a37_0x534cde;if(_0x45376c[_0x25de68(0xbe)]===0x0)return;for(let _0x5e914a=0x0;_0x5e914a<LOCK_SETTLE_RETRY_COUNT;_0x5e914a+=0x1){const _0x2a2907=await readBffLockFile(_0x29fa07),_0x553a0f=_0x2a2907?.[_0x25de68(0xee)]?.[_0x539103]?.[_0x25de68(0x104)]??{},_0x319521=_0x45376c[_0x25de68(0xc8)](_0x25ff8=>!!_0x553a0f[_0x25ff8]?.['remoteId']);if(_0x319521)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x45376c[_0x25de68(0xda)](',\x20')+'.');}
|
|
1
|
+
function a37_0x3b6a(){const _0x4b03e5=['3004785CdtGNv','bff','\x22.\x20','4375320KyvRiH','datasetId','functionNode','Lock\x20scope\x20for\x20app\x20\x22','push','ENDPOINT','name','operationType','boolean','high-risk-write','parse','code','aliasToDatasetCode','2147136gpJNcL','bool','766190CGCsJm','alias','8aTjekM','\x22\x20not\x20found\x20after\x20ensureLockScope.','some','No\x20local\x20BFF\x20functions\x20found.','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','Cannot\x20resolve\x20dataset\x20for\x20\x22','Push\x20only\x20this\x20script\x20type','Incomplete\x20HOOK\x20path:\x20','20HXccwQ','3783015XQtzFs','has','set','/api/management/library/scripts/save','Push\x20complete:\x20','string','\x20failed,\x20','140423BxMnUI','stringify','Would\x20inspect\x20','apps','update','remoteId','length','attempted','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','HOOK','join','status','\x20skipped,\x20',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','would_push','Force\x20push\x20ignoring\x20hash\x20protection','validation','description','message','21218510lWVAwU','type','9HYOnaK','datasetCodeToDataset','datasetCode','create','Local\x20function\x20not\x20found:\x20','unchanged','version','apiDir','map','appCode','cleared','functions','lockKey','force','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','lastSync','values','runtime\x20cache\x20not\x20needed','script','toISOString','runtime\x20cache\x20clear\x20failed','lockFilePath','filePath','scriptsRoot','get'];a37_0x3b6a=function(){return _0x4b03e5;};return a37_0x3b6a();}const a37_0x21c0fd=a37_0xe3a7;(function(_0xb10eb9,_0x4ed9c3){const _0x5bf01e=a37_0xe3a7,_0x57150b=_0xb10eb9();while(!![]){try{const _0x1dab34=-parseInt(_0x5bf01e(0x196))/0x1*(-parseInt(_0x5bf01e(0x18e))/0x2)+parseInt(_0x5bf01e(0x18f))/0x3+parseInt(_0x5bf01e(0x186))/0x4*(-parseInt(_0x5bf01e(0x184))/0x5)+parseInt(_0x5bf01e(0x175))/0x6+-parseInt(_0x5bf01e(0x172))/0x7+parseInt(_0x5bf01e(0x182))/0x8+-parseInt(_0x5bf01e(0x1ac))/0x9*(parseInt(_0x5bf01e(0x1aa))/0xa);if(_0x1dab34===_0x4ed9c3)break;else _0x57150b['push'](_0x57150b['shift']());}catch(_0x2c50b8){_0x57150b['push'](_0x57150b['shift']());}}}(a37_0x3b6a,0xc4991));function a37_0xe3a7(_0x4995a0,_0x5826c7){_0x4995a0=_0x4995a0-0x172;const _0x3b6a52=a37_0x3b6a();let _0xe3a789=_0x3b6a52[_0x4995a0];return _0xe3a789;}import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a37_0x21c0fd(0x173),'command':a37_0x21c0fd(0x179),'description':'Push\x20local\x20BFF\x20scripts\x20to\x20remote','risk':a37_0x21c0fd(0x17e),'flags':[{'name':'type','type':'string','description':a37_0x21c0fd(0x18c),'enum':['COMMON',a37_0x21c0fd(0x17a),a37_0x21c0fd(0x1a0)]},{'name':a37_0x21c0fd(0x17b),'type':a37_0x21c0fd(0x194),'description':a37_0x21c0fd(0x18a)},{'name':a37_0x21c0fd(0x1b9),'type':a37_0x21c0fd(0x17d),'description':a37_0x21c0fd(0x1a6)}],async 'dryRun'(_0x33be36){const _0x378138=a37_0x21c0fd,_0x177e9e=loadBffProjectConfig(_0x33be36['appCode']),_0x31584b=await readBffLockFile(_0x177e9e[_0x378138(0x1c1)]),{appLock:_0x1e79a0}=ensureLockScope(_0x31584b??createEmptyBffLock(),_0x33be36[_0x378138(0x1b5)],_0x177e9e['scriptsRoot'],'push'),_0x175412=await getTargetFunctions(_0x177e9e,_0x33be36),_0x55d29c=_0x33be36[_0x378138(0x183)](_0x378138(0x1b9)),_0x30ba62=[];for(const _0x2a2a52 of _0x175412){const _0x46a391=await computeFileHash(_0x2a2a52['filePath']),_0x499624=_0x1e79a0[_0x378138(0x1b7)][_0x2a2a52['lockKey']],_0xa4d812=!!_0x499624&&_0x499624['hash']===_0x46a391;_0x30ba62['push']({'lockKey':_0x2a2a52[_0x378138(0x1b8)],'filePath':_0x2a2a52['filePath'],'remoteId':_0x499624?.[_0x378138(0x19b)]??null,'mode':_0x499624?.[_0x378138(0x19b)]?_0x378138(0x19a):_0x378138(0x1af),'status':!_0x55d29c&&_0xa4d812?_0x378138(0x1b1):'would_push'});}return{'method':'POST','url':_0x378138(0x192),'body':{'appCode':_0x33be36[_0x378138(0x1b5)],'force':_0x55d29c,'files':_0x30ba62,'cacheClearAtRuntime':_0x30ba62[_0x378138(0x188)](_0x1f56a0=>_0x1f56a0['status']==='would_push'),'cacheClearAtRuntimeTimes':_0x30ba62[_0x378138(0x188)](_0x5b92ec=>_0x5b92ec[_0x378138(0x1a2)]===_0x378138(0x1a5))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x378138(0x198)+_0x30ba62['length']+_0x378138(0x19e)};},async 'execute'(_0x71ebae){const _0x6a25e6=a37_0x21c0fd,_0x12b55a=loadBffProjectConfig(_0x71ebae[_0x6a25e6(0x1b5)]),_0x19da8d=await readBffLockFile(_0x12b55a[_0x6a25e6(0x1c1)]),{lockData:_0x276327,appLock:_0x2d815d}=ensureLockScope(_0x19da8d??createEmptyBffLock(),_0x71ebae[_0x6a25e6(0x1b5)],_0x12b55a[_0x6a25e6(0x1c3)],_0x6a25e6(0x179)),_0x43d244=await getTargetFunctions(_0x12b55a,_0x71ebae);if(_0x43d244[_0x6a25e6(0x19c)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x6a25e6(0x189)};const _0x2331b=_0x71ebae['bool'](_0x6a25e6(0x1b9)),_0x3833e0=JSON[_0x6a25e6(0x17f)](JSON[_0x6a25e6(0x197)](_0x276327)),_0x6255b2=_0x3833e0[_0x6a25e6(0x199)][_0x71ebae['appCode']];if(!_0x6255b2)throw new Error(_0x6a25e6(0x178)+_0x71ebae[_0x6a25e6(0x1b5)]+_0x6a25e6(0x187));const _0x526462=await buildHookMaps(_0x71ebae[_0x6a25e6(0x1b5)],_0x71ebae[_0x6a25e6(0x1b3)],_0x43d244,_0x6255b2),_0xd94603=[],_0xb0c651=[],_0x58b915=[];for(const _0x1655b4 of _0x43d244){const _0x30b3fb=await computeFileHash(_0x1655b4[_0x6a25e6(0x1c2)]),_0x36e807=_0x6255b2[_0x6a25e6(0x1b7)][_0x1655b4[_0x6a25e6(0x1b8)]];if(!_0x2331b&&_0x36e807&&_0x36e807['hash']===_0x30b3fb){_0xb0c651[_0x6a25e6(0x179)]({'lockKey':_0x1655b4[_0x6a25e6(0x1b8)],'reason':_0x6a25e6(0x1b1)});continue;}try{await uploadSingleFunction(_0x71ebae[_0x6a25e6(0x1b5)],_0x1655b4,_0x6255b2,_0x526462);const _0x1faa12=_0x6255b2[_0x6a25e6(0x1b7)][_0x1655b4['lockKey']];_0xd94603[_0x6a25e6(0x179)]({'lockKey':_0x1655b4[_0x6a25e6(0x1b8)],'remoteId':_0x1faa12?.[_0x6a25e6(0x19b)]??0x0});}catch(_0x157187){_0x58b915[_0x6a25e6(0x179)]({'lockKey':_0x1655b4[_0x6a25e6(0x1b8)],'error':_0x157187 instanceof Error?_0x157187[_0x6a25e6(0x1a9)]:String(_0x157187)});}}_0x6255b2[_0x6a25e6(0x1bb)]=new Date()[_0x6a25e6(0x1bf)](),await writeBffLockFile(_0x12b55a[_0x6a25e6(0x1c1)],_0x3833e0),await waitForUploadedLockEntries(_0x12b55a[_0x6a25e6(0x1c1)],_0x71ebae[_0x6a25e6(0x1b5)],_0xd94603[_0x6a25e6(0x1b4)](_0x1cc1e3=>_0x1cc1e3[_0x6a25e6(0x1b8)]));let _0x5ac9f2={'attempted':![],'cleared':![]};if(_0xd94603[_0x6a25e6(0x19c)]>0x0)try{let _0x5ce2d1='';for(let _0x534c76=0x0;_0x534c76<CACHE_CLEAR_ATTEMPTS;_0x534c76+=0x1){_0x5ce2d1=await clearBffScriptCache(),_0x534c76<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x5ac9f2={'attempted':!![],'cleared':!![],'message':_0x5ce2d1||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x5f3cdf){_0x5ac9f2={'attempted':!![],'cleared':![],'error':_0x5f3cdf instanceof Error?_0x5f3cdf['message']:String(_0x5f3cdf)};}const _0x556f51=_0x58b915['length']===0x0&&(_0x5ac9f2['attempted']?_0x5ac9f2[_0x6a25e6(0x1b6)]:!![]),_0x1c20a9=_0x5ac9f2[_0x6a25e6(0x19d)]?_0x5ac9f2[_0x6a25e6(0x1b6)]?'runtime\x20cache\x20cleared':_0x6a25e6(0x1c0):_0x6a25e6(0x1bd);return{'ok':_0x556f51,'data':{'uploaded':_0xd94603,'skipped':_0xb0c651,'failed':_0x58b915,'cacheClear':_0x5ac9f2},'message':_0x6a25e6(0x193)+_0xd94603[_0x6a25e6(0x19c)]+'\x20uploaded,\x20'+_0xb0c651[_0x6a25e6(0x19c)]+_0x6a25e6(0x1a3)+_0x58b915[_0x6a25e6(0x19c)]+_0x6a25e6(0x195)+_0x1c20a9};}};async function getTargetFunctions(_0xf925d0,_0x303083){const _0x26d09c=a37_0x21c0fd,_0xa55c=_0x303083['str'](_0x26d09c(0x1ab)),_0x3b2b9c=_0x303083['str'](_0x26d09c(0x17b)),_0x5161f6=normalizeBffType(_0xa55c)??undefined;if(_0x3b2b9c&&!_0x5161f6)throw CliErrors[_0x26d09c(0x1a7)](_0x26d09c(0x1ba));const _0xc7517=await scanLocalBffFunctions(_0xf925d0,_0x5161f6);if(_0x3b2b9c){const _0xfacb93=_0xc7517['filter'](_0x2b44fb=>_0x2b44fb[_0x26d09c(0x17b)]===_0x3b2b9c);if(_0xfacb93[_0x26d09c(0x19c)]===0x0)throw CliErrors['validation'](_0x26d09c(0x1b0)+_0x5161f6+'/'+_0x3b2b9c);return _0xfacb93;}return _0xc7517;}async function buildHookMaps(_0x392b85,_0x3b3510,_0x1ad7de,_0x12bcd5){const _0x37b42d=a37_0x21c0fd,_0x395ee6=_0x1ad7de['some'](_0x3d0b74=>_0x3d0b74[_0x37b42d(0x1ab)]===_0x37b42d(0x1a0));if(!_0x395ee6)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x527cbc=loadAliasMap(_0x3b3510,undefined,resolveApiFilePath(_0x3b3510,_0x392b85)),_0x18b9d4=new Map(_0x527cbc[_0x37b42d(0x1b4)](_0x2ca65c=>[_0x2ca65c[_0x37b42d(0x185)],_0x2ca65c[_0x37b42d(0x1ae)]]));for(const _0x2decfe of Object[_0x37b42d(0x1bc)](_0x12bcd5['functions'])){_0x2decfe[_0x37b42d(0x185)]&&_0x2decfe[_0x37b42d(0x1ae)]&&!_0x18b9d4[_0x37b42d(0x190)](_0x2decfe[_0x37b42d(0x185)])&&_0x18b9d4[_0x37b42d(0x191)](_0x2decfe[_0x37b42d(0x185)],_0x2decfe[_0x37b42d(0x1ae)]);}const _0x5d5380=await listDatasets(_0x392b85),_0xd44309=new Map(_0x5d5380[_0x37b42d(0x1b4)](_0x1a3fc1=>[_0x1a3fc1[_0x37b42d(0x180)],_0x1a3fc1]));return{'aliasToDatasetCode':_0x18b9d4,'datasetCodeToDataset':_0xd44309};}async function uploadSingleFunction(_0x2099fb,_0x53c450,_0x1cf4ab,_0x1ba3d9){const _0x10ed42=a37_0x21c0fd,_0x56813f=await readFile(_0x53c450[_0x10ed42(0x1c2)],'utf8'),_0x4f7733=await computeFileHash(_0x53c450[_0x10ed42(0x1c2)]),_0x62f1e5=_0x1cf4ab[_0x10ed42(0x1b7)][_0x53c450['lockKey']];if(_0x62f1e5?.[_0x10ed42(0x19b)]&&_0x62f1e5[_0x10ed42(0x1b2)]==null)throw CliErrors[_0x10ed42(0x1a7)](_0x53c450['lockKey']+_0x10ed42(0x1a4));let _0x3c2e21=extractScriptDescription(_0x56813f);if(!_0x3c2e21&&_0x62f1e5?.[_0x10ed42(0x19b)]){const _0x3c4666=await getBffScriptInfo(_0x62f1e5[_0x10ed42(0x19b)]);_0x3c2e21=_0x3c4666['description']||undefined;}const _0x1143a7={'appCode':_0x2099fb,'functionName':_0x53c450['name'],'scriptType':_0x53c450[_0x10ed42(0x1ab)],'scriptContent':_0x56813f};if(_0x62f1e5?.[_0x10ed42(0x19b)])_0x1143a7['id']=_0x62f1e5[_0x10ed42(0x19b)];if(_0x62f1e5?.[_0x10ed42(0x1b2)]!=null)_0x1143a7[_0x10ed42(0x1b2)]=_0x62f1e5[_0x10ed42(0x1b2)];if(_0x3c2e21)_0x1143a7[_0x10ed42(0x1a8)]=_0x3c2e21;if(_0x53c450[_0x10ed42(0x1ab)]===_0x10ed42(0x1a0)){const _0x4a8e0c=_0x53c450['alias'];if(!_0x4a8e0c||!_0x53c450[_0x10ed42(0x17c)]||!_0x53c450[_0x10ed42(0x177)])throw CliErrors[_0x10ed42(0x1a7)](_0x10ed42(0x18d)+_0x53c450[_0x10ed42(0x1b8)]);const _0x44b459=_0x1ba3d9[_0x10ed42(0x181)][_0x10ed42(0x1c4)](_0x4a8e0c)??_0x62f1e5?.[_0x10ed42(0x1ae)]??_0x4a8e0c,_0x3b1ddb=_0x1ba3d9[_0x10ed42(0x1ad)][_0x10ed42(0x1c4)](_0x44b459);if(!_0x3b1ddb)throw CliErrors['validation'](_0x10ed42(0x18b)+_0x4a8e0c+_0x10ed42(0x174)+('Run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x1143a7[_0x10ed42(0x176)]=_0x3b1ddb['id'],_0x1143a7[_0x10ed42(0x17c)]=_0x53c450[_0x10ed42(0x17c)],_0x1143a7[_0x10ed42(0x177)]=_0x53c450['functionNode'];}const _0x49a7c8=await saveBffScript(_0x1143a7),_0xa8fda3=_0x49a7c8['id'],_0x222ce0=_0x49a7c8[_0x10ed42(0x1be)]??await getBffScriptInfo(_0xa8fda3),_0x3b7a5a={'hash':_0x4f7733,'remoteId':_0xa8fda3,'version':_0x222ce0[_0x10ed42(0x1b2)]};if(_0x53c450[_0x10ed42(0x1ab)]===_0x10ed42(0x1a0)){const _0x27ec56=_0x53c450['alias'],_0x4f2a5f=_0x1ba3d9[_0x10ed42(0x181)][_0x10ed42(0x1c4)](_0x27ec56)??_0x62f1e5?.[_0x10ed42(0x1ae)]??_0x27ec56;_0x1ba3d9[_0x10ed42(0x181)][_0x10ed42(0x190)](_0x27ec56)?_0x3b7a5a[_0x10ed42(0x185)]=_0x27ec56:_0x3b7a5a['alias']=_0x62f1e5?.[_0x10ed42(0x185)],_0x3b7a5a['datasetCode']=_0x4f2a5f,_0x3b7a5a[_0x10ed42(0x17c)]=_0x53c450[_0x10ed42(0x17c)],_0x3b7a5a[_0x10ed42(0x177)]=_0x53c450[_0x10ed42(0x177)];}_0x1cf4ab[_0x10ed42(0x1b7)][_0x53c450[_0x10ed42(0x1b8)]]=_0x3b7a5a;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x4ff0a8,_0x24947b,_0x1a6cff){const _0x28ea45=a37_0x21c0fd;if(_0x1a6cff[_0x28ea45(0x19c)]===0x0)return;for(let _0x10ae0a=0x0;_0x10ae0a<LOCK_SETTLE_RETRY_COUNT;_0x10ae0a+=0x1){const _0xa92720=await readBffLockFile(_0x4ff0a8),_0x2835a7=_0xa92720?.[_0x28ea45(0x199)]?.[_0x24947b]?.[_0x28ea45(0x1b7)]??{},_0x23f47b=_0x1a6cff['every'](_0x1d7622=>!!_0x2835a7[_0x1d7622]?.[_0x28ea45(0x19b)]);if(_0x23f47b)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x28ea45(0x19f)+_0x1a6cff[_0x28ea45(0x1a1)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a38_0x388d6b=a38_0x7357;(function(_0x3c3e8a,_0xd5a085){const _0x1aeab2=a38_0x7357,_0x40d5e7=_0x3c3e8a();while(!![]){try{const _0xab0608=-parseInt(_0x1aeab2(0x1df))/0x1+-parseInt(_0x1aeab2(0x1e8))/0x2+-parseInt(_0x1aeab2(0x1d6))/0x3+-parseInt(_0x1aeab2(0x1e7))/0x4+-parseInt(_0x1aeab2(0x1ea))/0x5+parseInt(_0x1aeab2(0x1e1))/0x6*(-parseInt(_0x1aeab2(0x1e2))/0x7)+parseInt(_0x1aeab2(0x1da))/0x8;if(_0xab0608===_0xd5a085)break;else _0x40d5e7['push'](_0x40d5e7['shift']());}catch(_0x798e2f){_0x40d5e7['push'](_0x40d5e7['shift']());}}}(a38_0x57d0,0xe7197));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';function a38_0x7357(_0x47e8b6,_0x21b3e9){_0x47e8b6=_0x47e8b6-0x1d3;const _0x57d019=a38_0x57d0();let _0x735709=_0x57d019[_0x47e8b6];return _0x735709;}import{computeFileHash}from'../../core/bff/hash.js';function a38_0x57d0(){const _0x3d7184=['filePath','status','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','\x20unchanged','bool','all','hash','\x20modified,\x20','5124039AKqieF','bff','length','appCode','78337280TKgWXq','remote','lockKey','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','functions','1687966ExfuoJ','read','486LOIuTQ','160538ACuCQI','datasetCode','All\x20BFF\x20scripts\x20are\x20in\x20sync.','scriptsRoot','apiDir','5808432tkSZPA','3195670WVfteb','\x20added,\x20','2710005RKknRQ','push','lockFilePath','\x20remote-only','map'];a38_0x57d0=function(){return _0x3d7184;};return a38_0x57d0();}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x388d6b(0x1d7),'command':'status','description':a38_0x388d6b(0x1f1),'risk':a38_0x388d6b(0x1e0),'flags':[{'name':a38_0x388d6b(0x1db),'type':'boolean','description':a38_0x388d6b(0x1dd)}],async 'execute'(_0x47d1cb){const _0x48fecf=a38_0x388d6b,_0x588026=loadBffProjectConfig(_0x47d1cb[_0x48fecf(0x1d9)]),_0x322f4b=await readBffLockFile(_0x588026[_0x48fecf(0x1ec)]),{appLock:_0x51763e}=ensureLockScope(_0x322f4b??createEmptyBffLock(),_0x47d1cb[_0x48fecf(0x1d9)],_0x588026[_0x48fecf(0x1e5)],_0x48fecf(0x1f0)),_0x14cf40=await scanLocalBffFunctions(_0x588026),_0x5a9851=[],_0x2cd411=[],_0x1d7195=[];for(const _0x9d4314 of _0x14cf40){const _0x5968b6=await computeFileHash(_0x9d4314[_0x48fecf(0x1ef)]),_0x267608=_0x51763e[_0x48fecf(0x1de)][_0x9d4314[_0x48fecf(0x1dc)]];if(!_0x267608)_0x5a9851[_0x48fecf(0x1eb)](_0x9d4314[_0x48fecf(0x1dc)]);else _0x267608[_0x48fecf(0x1d4)]!==_0x5968b6?_0x2cd411['push'](_0x9d4314[_0x48fecf(0x1dc)]):_0x1d7195[_0x48fecf(0x1eb)](_0x9d4314['lockKey']);}const _0x3bb84e=[];if(_0x47d1cb[_0x48fecf(0x1f3)](_0x48fecf(0x1db))){const _0x4e1926=loadAliasMap(_0x47d1cb[_0x48fecf(0x1e6)],undefined,resolveApiFilePath(_0x47d1cb['apiDir'],_0x47d1cb[_0x48fecf(0x1d9)])),_0x244f2e=new Map(_0x4e1926[_0x48fecf(0x1ee)](_0x331b28=>[_0x331b28[_0x48fecf(0x1e3)],_0x331b28['alias']])),[_0x6cc650,_0x411c11]=await Promise[_0x48fecf(0x1d3)]([listBffScripts(_0x47d1cb[_0x48fecf(0x1d9)]),getBffScriptStatistics(_0x47d1cb[_0x48fecf(0x1d9)])]),_0x144708=createHookLocationMap(_0x411c11),_0x33b655=new Set(_0x14cf40[_0x48fecf(0x1ee)](_0x1a1dc9=>_0x1a1dc9[_0x48fecf(0x1dc)]));for(const _0x364e4d of _0x6cc650){const _0x375d33=resolveRemoteScriptTarget(_0x588026,_0x364e4d,_0x144708,_0x51763e[_0x48fecf(0x1de)],_0x244f2e);_0x375d33&&!_0x33b655['has'](_0x375d33['lockKey'])&&_0x3bb84e[_0x48fecf(0x1eb)](_0x375d33['lockKey']);}}const _0x37ec6d=_0x5a9851[_0x48fecf(0x1d8)]===0x0&&_0x2cd411[_0x48fecf(0x1d8)]===0x0&&_0x3bb84e[_0x48fecf(0x1d8)]===0x0;return{'ok':!![],'data':{'added':_0x5a9851,'modified':_0x2cd411,'unchanged':_0x1d7195,'remoteOnly':_0x3bb84e},'message':_0x37ec6d?_0x48fecf(0x1e4):_0x5a9851[_0x48fecf(0x1d8)]+_0x48fecf(0x1e9)+_0x2cd411[_0x48fecf(0x1d8)]+_0x48fecf(0x1d5)+_0x1d7195[_0x48fecf(0x1d8)]+_0x48fecf(0x1f2)+(_0x3bb84e[_0x48fecf(0x1d8)]>0x0?',\x20'+_0x3bb84e[_0x48fecf(0x1d8)]+_0x48fecf(0x1ed):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a39_0x2d82(_0x4b66c9,_0x10b55b){_0x4b66c9=_0x4b66c9-0xac;const _0x5998b3=a39_0x5998();let _0x2d8212=_0x5998b3[_0x4b66c9];return _0x2d8212;}const a39_0x2e52ab=a39_0x2d82;(function(_0x34b36c,_0x24b28a){const _0x45a963=a39_0x2d82,_0x13d75f=_0x34b36c();while(!![]){try{const _0x6fc809=parseInt(_0x45a963(0xb0))/0x1+-parseInt(_0x45a963(0xbe))/0x2*(parseInt(_0x45a963(0xb7))/0x3)+-parseInt(_0x45a963(0xae))/0x4+parseInt(_0x45a963(0xba))/0x5*(parseInt(_0x45a963(0xbd))/0x6)+-parseInt(_0x45a963(0xc6))/0x7+parseInt(_0x45a963(0xbf))/0x8*(-parseInt(_0x45a963(0xb9))/0x9)+parseInt(_0x45a963(0xad))/0xa*(parseInt(_0x45a963(0xaf))/0xb);if(_0x6fc809===_0x24b28a)break;else _0x13d75f['push'](_0x13d75f['shift']());}catch(_0x358ac1){_0x13d75f['push'](_0x13d75f['shift']());}}}(a39_0x5998,0xa75a5));import{CliErrors}from'../../errors.js';function a39_0x5998(){const _0x1f437a=['log','5280478ASpVbA','unknown','cli-skill-install',')...','3320JoNCZV','1974912zsPpnv','54109OONHbY','695577aQMyWR','../../skills/npx-skills-add.js','inherit','skipped','write','cwd','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','1515PHSBdY','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','42219IlxjZt','99155kWxfKx','cli-skill','npx\x20skills\x20add\x20failed:\x20','366yzhKns','1674tTZPId','2016IXDveL','install','pipe','CLI\x20Built-in\x20Skill\x20installed','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20('];a39_0x5998=function(){return _0x1f437a;};return a39_0x5998();}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x2e52ab(0xbb),'command':a39_0x2e52ab(0xc0),'description':'Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','risk':a39_0x2e52ab(0xb4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2a3aca){const _0x2d60a1=a39_0x2e52ab;logger['setLogPath'](process[_0x2d60a1(0xb5)]()),logger['info'](_0x2d60a1(0xc8),_0x2d60a1(0xb6));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x4cbab3,RABETBASE_SKILL_SOURCE:_0x585b7f,runNpxSkillsAddGlobal:_0x39f737}=await import(_0x2d60a1(0xb1)),_0x41be2b=_0x2a3aca['nonInteractive']?_0x2d60a1(0xc1):_0x2d60a1(0xb2);console[_0x2d60a1(0xc5)](_0x2d60a1(0xc4)+_0x4cbab3+_0x2d60a1(0xac));const _0x4fb989=_0x39f737(process[_0x2d60a1(0xb5)](),_0x585b7f,{'stdio':_0x41be2b});if(_0x4fb989[_0x2d60a1(0xb3)])console['log'](_0x2d60a1(0xc3));else{if(_0x4fb989['ok'])console[_0x2d60a1(0xc5)](_0x2d60a1(0xc2));else throw CliErrors['apiError'](_0x2d60a1(0xbc)+(_0x4fb989['error']||_0x2d60a1(0xc7)),_0x2d60a1(0xb8)+_0x4cbab3);}return{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a40_0x3a9dd7=a40_0x4519;(function(_0x1550cc,_0x5a141c){const _0x42f0ab=a40_0x4519,_0x27a1c9=_0x1550cc();while(!![]){try{const _0x23ebde=parseInt(_0x42f0ab(0xa7))/0x1*(parseInt(_0x42f0ab(0x89))/0x2)+-parseInt(_0x42f0ab(0xc8))/0x3+parseInt(_0x42f0ab(0x99))/0x4+parseInt(_0x42f0ab(0xd6))/0x5+-parseInt(_0x42f0ab(0xa8))/0x6*(parseInt(_0x42f0ab(0xb6))/0x7)+parseInt(_0x42f0ab(0xd1))/0x8*(-parseInt(_0x42f0ab(0x93))/0x9)+-parseInt(_0x42f0ab(0xcc))/0xa;if(_0x23ebde===_0x5a141c)break;else _0x27a1c9['push'](_0x27a1c9['shift']());}catch(_0x180f4d){_0x27a1c9['push'](_0x27a1c9['shift']());}}}(a40_0x5ecb,0xeb63f));import a40_0x4ef10e from'chalk';import a40_0x3ebf76 from'ora';import a40_0x1c6616 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';function a40_0x5ecb(){const _0x2d7ba3=['Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','7585425ztAyjx','bun','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','entries','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','Beta\x20version:\x20','2ZIXIky','run','unknown','skipped','string','valid','Updating\x20via\x20','map','yellow','fail','4319046rThPug','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','version','write','update','npm','6597008NcBQyP','flag','nonInteractive','/dist-tags','info','latest','boolean','Already\x20up\x20to\x20date\x20(v','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','\x20cli-skill\x20install','Checking\x20for\x20updates...','source','https://registry.npmjs.org/-/package/','execPath','1643729dQTYQX','6FgQNgw','error','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','Current\x20version:\x20','Version\x20comparison\x20failed','\x20install\x20-g\x20','inherit','gray','bool','Updated\x20to\x20v','json','Update\x20available:\x20','...','message','3016517gMmnTJ','Update\x20failed','Invalid\x20version:\x20','\x20\x20Run\x20manually:\x20','object','no-skills','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','beta','succeed','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','validation','log','@latest','\x20→\x20','pipe','skills','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Requested\x20version:\x20','2643219PdnQJq','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','timeout','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','20540090qgGOyq','trim','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','includes','toLowerCase','8MXAPbf','cwd','green','warn'];a40_0x5ecb=function(){return _0x2d7ba3;};return a40_0x5ecb();}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(){return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x58467f=a40_0x4519,_0x23413f=process[_0x58467f(0xa6)][_0x58467f(0xd0)]();if(_0x23413f[_0x58467f(0xcf)](_0x58467f(0xd7)))return _0x58467f(0xd7);return'npm';}const updateFlags=[{'name':a40_0x3a9dd7(0xbd),'type':a40_0x3a9dd7(0x9f),'description':a40_0x3a9dd7(0x94),'default':![]},{'name':a40_0x3a9dd7(0x95),'type':a40_0x3a9dd7(0x8d),'description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':a40_0x3a9dd7(0xbb),'type':'boolean','description':a40_0x3a9dd7(0x84),'default':![]},{'name':'skills','type':a40_0x3a9dd7(0x9f),'description':a40_0x3a9dd7(0x87),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x1f7b76){const _0x588da7=a40_0x3a9dd7;return _0x1f7b76['str']('version')[_0x588da7(0xcd)]();}function shouldSkipCliSkill(_0x55dfab){const _0x96a3bb=a40_0x3a9dd7;return _0x55dfab[_0x96a3bb(0xb0)]('no-skills')||_0x55dfab[_0x96a3bb(0x9a)](_0x96a3bb(0xc5))===![];}async function validateUpdateFlags(_0xd79239){const _0x3b1f99=a40_0x3a9dd7,_0x2a11e9=_0xd79239[_0x3b1f99(0xb0)](_0x3b1f99(0xbd)),_0x2b6c30=getRequestedVersion(_0xd79239);if(_0x2a11e9&&_0x2b6c30)throw CliErrors['validation'](_0x3b1f99(0xcb),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x2b6c30&&!a40_0x1c6616['valid'](_0x2b6c30))throw CliErrors[_0x3b1f99(0xc0)](_0x3b1f99(0xb8)+_0x2b6c30,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x2bdfba=a40_0x3a9dd7;try{const _0x47d9f5=await fetch(_0x2bdfba(0xa5)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x2bdfba(0x9c),{'signal':AbortSignal[_0x2bdfba(0xca)](0x2710)});if(!_0x47d9f5['ok'])return null;const _0x5d58a6=await _0x47d9f5[_0x2bdfba(0xb2)]();if(!_0x5d58a6||typeof _0x5d58a6!==_0x2bdfba(0xba))return null;return Object['fromEntries'](Object[_0x2bdfba(0x86)](_0x5d58a6)['filter'](([,_0x16f88a])=>typeof _0x16f88a===_0x2bdfba(0x8d)&&_0x16f88a['trim']()['length']>0x0)[_0x2bdfba(0x90)](([_0x2935fd,_0x5250d6])=>[_0x2935fd,String(_0x5250d6)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x41f6a8){const _0x572eaa=await fetchNpmDistTags();return _0x572eaa?.[_0x41f6a8]??null;}async function fetchLatestVersion(){const _0x537ee3=a40_0x3a9dd7;return fetchNpmDistTagVersion(_0x537ee3(0x9e));}async function resolveTargetVersion(_0x24c830){const _0x4945e3=a40_0x3a9dd7,_0x5df522=getRequestedVersion(_0x24c830);if(_0x5df522)return{'version':_0x5df522,'source':_0x4945e3(0x95)};if(_0x24c830[_0x4945e3(0xb0)](_0x4945e3(0xbd))){const _0x22ca64=await fetchNpmDistTagVersion(_0x4945e3(0xbd));if(!_0x22ca64)return null;return{'version':_0x22ca64,'source':_0x4945e3(0xbd)};}const _0xc137f7=await fetchLatestVersion();if(!_0xc137f7)return null;return{'version':_0xc137f7,'source':_0x4945e3(0x9e)};}function shouldInstallTarget(_0x4e4f3d,_0x8c4f37){const _0x16d246=a40_0x3a9dd7;if(_0x8c4f37[_0x16d246(0xa4)]===_0x16d246(0x95)||_0x8c4f37[_0x16d246(0xa4)]===_0x16d246(0xbd))return!a40_0x1c6616['eq'](_0x4e4f3d,_0x8c4f37[_0x16d246(0x95)]);return a40_0x1c6616['lt'](_0x4e4f3d,_0x8c4f37['version']);}function a40_0x4519(_0x5a917d,_0x6fb299){_0x5a917d=_0x5a917d-0x84;const _0x5ecb03=a40_0x5ecb();let _0x451942=_0x5ecb03[_0x5a917d];return _0x451942;}function getInstallPlanLabel(_0x13d820,_0x26343e){const _0x2c4fe3=a40_0x3a9dd7;switch(_0x26343e[_0x2c4fe3(0xa4)]){case _0x2c4fe3(0xbd):return _0x2c4fe3(0x88)+a40_0x4ef10e[_0x2c4fe3(0x91)](_0x13d820)+'\x20→\x20'+a40_0x4ef10e[_0x2c4fe3(0xd3)](_0x26343e['version']);case _0x2c4fe3(0x95):return _0x2c4fe3(0xc7)+a40_0x4ef10e['yellow'](_0x13d820)+_0x2c4fe3(0xc3)+a40_0x4ef10e['green'](_0x26343e[_0x2c4fe3(0x95)]);case _0x2c4fe3(0x9e):default:return _0x2c4fe3(0xb3)+a40_0x4ef10e['yellow'](_0x13d820)+'\x20→\x20'+a40_0x4ef10e[_0x2c4fe3(0xd3)](_0x26343e[_0x2c4fe3(0x95)]);}}async function installCliSkill(_0x20b325){const _0x8549a0=a40_0x3a9dd7;console[_0x8549a0(0xc1)](a40_0x4ef10e[_0x8549a0(0xaf)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x2fc52d=runNpxSkillsAddGlobal(process[_0x8549a0(0xd2)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x20b325?_0x8549a0(0xc4):_0x8549a0(0xae)});if(_0x2fc52d[_0x8549a0(0x8c)]){console[_0x8549a0(0xc1)](a40_0x4ef10e[_0x8549a0(0xaf)](_0x8549a0(0xaa)));return;}if(_0x2fc52d['ok']){console['log'](a40_0x4ef10e[_0x8549a0(0xaf)](_0x8549a0(0xbc)));return;}console[_0x8549a0(0xd4)](a40_0x4ef10e[_0x8549a0(0x91)](_0x8549a0(0xbf)+(_0x2fc52d['error']||_0x8549a0(0x8b)))),console[_0x8549a0(0xc1)](a40_0x4ef10e[_0x8549a0(0xaf)](_0x8549a0(0xb9)+CLI_BIN_NAME+_0x8549a0(0xa2)));}async function execute(_0x55439a){const _0x50054e=a40_0x3a9dd7;await validateUpdateFlags(_0x55439a);const _0xbe0ff8=getCurrentVersion();console[_0x50054e(0xc1)](_0x50054e(0xab)+_0xbe0ff8);const _0x59b0a7=a40_0x3ebf76(_0x50054e(0xa3))['start'](),_0x2c6021=await resolveTargetVersion(_0x55439a);if(!_0x2c6021){const _0x22ea8e=_0x55439a['bool']('beta')?_0x50054e(0xa1):_0x50054e(0x85);return _0x59b0a7[_0x50054e(0x92)](_0x22ea8e),console[_0x50054e(0xc1)](a40_0x4ef10e['gray'](_0x50054e(0xc6)+NPM_PACKAGE_NAME+_0x50054e(0xc2))),{'ok':![],'message':_0x22ea8e};}const _0x139ac9=a40_0x1c6616[_0x50054e(0x8e)](VERSION),_0x5a91ae=a40_0x1c6616[_0x50054e(0x8e)](_0x2c6021[_0x50054e(0x95)]);if(!_0x139ac9||!_0x5a91ae)return _0x59b0a7[_0x50054e(0x92)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0x50054e(0xac)};if(!shouldInstallTarget(_0x139ac9,_0x2c6021)){const _0x2ff1c5=_0x2c6021[_0x50054e(0xa4)]===_0x50054e(0x95)?'Already\x20on\x20requested\x20version\x20(v'+_0x2c6021['version']+')':_0x50054e(0xa0)+_0x2c6021['version']+')';return _0x59b0a7['succeed'](_0x2ff1c5),shouldSkipCliSkill(_0x55439a)?console[_0x50054e(0xc1)](a40_0x4ef10e[_0x50054e(0xaf)](_0x50054e(0xd5))):await installCliSkill(_0x55439a[_0x50054e(0x9b)]),{'ok':!![]};}_0x59b0a7[_0x50054e(0x9d)](getInstallPlanLabel(_0xbe0ff8,_0x2c6021));const _0x235628=detectPackageManager(),_0x248bba=_0x235628===_0x50054e(0x98)?resolveNpmBin(_0x50054e(0x98)):_0x235628,_0x3a1a69=a40_0x3ebf76(_0x50054e(0x8f)+_0x235628+_0x50054e(0xb4))['start']();try{return await execa(_0x248bba,['install','-g',NPM_PACKAGE_NAME+'@'+_0x2c6021[_0x50054e(0x95)]],{'stdio':_0x50054e(0xc4)}),_0x3a1a69[_0x50054e(0xbe)](_0x50054e(0xb1)+_0x2c6021[_0x50054e(0x95)]),console[_0x50054e(0xc1)](a40_0x4ef10e['gray'](_0x50054e(0xce))),shouldSkipCliSkill(_0x55439a)?console[_0x50054e(0xc1)](a40_0x4ef10e[_0x50054e(0xaf)](_0x50054e(0xd5))):await installCliSkill(_0x55439a[_0x50054e(0x9b)]),{'ok':!![]};}catch(_0x132bf1){return _0x3a1a69['fail'](_0x50054e(0xb7)),console[_0x50054e(0xa9)](a40_0x4ef10e['red']('\x20\x20'+_0x132bf1[_0x50054e(0xb5)])),console[_0x50054e(0xc1)](a40_0x4ef10e[_0x50054e(0xaf)]('\x20\x20Try\x20manually:\x20'+_0x235628+_0x50054e(0xad)+NPM_PACKAGE_NAME+'@'+_0x2c6021['version'])),{'ok':![],'message':_0x132bf1[_0x50054e(0xb5)]};}}export const updateDefinition={'service':a40_0x3a9dd7(0x97),'command':a40_0x3a9dd7(0x8a),'description':a40_0x3a9dd7(0xc9),'risk':a40_0x3a9dd7(0x96),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a40_0x22344d=a40_0x179a;(function(_0xe7f849,_0x401554){const _0x4cbe10=a40_0x179a,_0x30fe5=_0xe7f849();while(!![]){try{const _0x520315=-parseInt(_0x4cbe10(0x16b))/0x1+parseInt(_0x4cbe10(0x155))/0x2*(-parseInt(_0x4cbe10(0x17c))/0x3)+parseInt(_0x4cbe10(0x18a))/0x4+parseInt(_0x4cbe10(0x15e))/0x5+-parseInt(_0x4cbe10(0x189))/0x6+-parseInt(_0x4cbe10(0x182))/0x7+-parseInt(_0x4cbe10(0x15b))/0x8*(-parseInt(_0x4cbe10(0x159))/0x9);if(_0x520315===_0x401554)break;else _0x30fe5['push'](_0x30fe5['shift']());}catch(_0x371d4e){_0x30fe5['push'](_0x30fe5['shift']());}}}(a40_0x6442,0x8d066));import a40_0x5324ed from'chalk';import a40_0xdbe9a6 from'ora';import a40_0x5497e4 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 _0x4d6d68=a40_0x179a;return GIT_COMMIT!==_0x4d6d68(0x162)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x4d6d68(0x180)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x434a22=a40_0x179a,_0x22bc9f=process[_0x434a22(0x166)][_0x434a22(0x176)]();if(_0x22bc9f['includes'](_0x434a22(0x15d)))return _0x434a22(0x15d);return _0x434a22(0x169);}const updateFlags=[{'name':a40_0x22344d(0x177),'type':'boolean','description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a40_0x22344d(0x184),'type':'string','description':a40_0x22344d(0x18d)},{'name':a40_0x22344d(0x179),'type':a40_0x22344d(0x16a),'description':a40_0x22344d(0x17a),'default':![]},{'name':'skills','type':'boolean','description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x4c20a8){const _0x2e13c0=a40_0x22344d;return _0x4c20a8['str'](_0x2e13c0(0x184))[_0x2e13c0(0x175)]();}function shouldSkipCliSkill(_0x223fee){const _0x320ebf=a40_0x22344d;return _0x223fee['bool'](_0x320ebf(0x179))||_0x223fee[_0x320ebf(0x172)]('skills')===![];}async function validateUpdateFlags(_0x4102f2){const _0x56e1ec=a40_0x22344d,_0x194264=_0x4102f2['bool'](_0x56e1ec(0x177)),_0x5c14f3=getRequestedVersion(_0x4102f2);if(_0x194264&&_0x5c14f3)throw CliErrors[_0x56e1ec(0x145)](_0x56e1ec(0x178),_0x56e1ec(0x14a));if(_0x5c14f3&&!a40_0x5497e4[_0x56e1ec(0x186)](_0x5c14f3))throw CliErrors['validation'](_0x56e1ec(0x17f)+_0x5c14f3,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x1bfa8d=a40_0x22344d;try{const _0x2c2990=await fetch(_0x1bfa8d(0x183)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x1bfa8d(0x144),{'signal':AbortSignal[_0x1bfa8d(0x151)](0x2710)});if(!_0x2c2990['ok'])return null;const _0xc99151=await _0x2c2990[_0x1bfa8d(0x148)]();if(!_0xc99151||typeof _0xc99151!==_0x1bfa8d(0x163))return null;return Object['fromEntries'](Object[_0x1bfa8d(0x14f)](_0xc99151)[_0x1bfa8d(0x16c)](([,_0x2354b7])=>typeof _0x2354b7==='string'&&_0x2354b7['trim']()['length']>0x0)['map'](([_0x10fb49,_0x3bde85])=>[_0x10fb49,String(_0x3bde85)[_0x1bfa8d(0x175)]()]));}catch{return null;}}function a40_0x179a(_0x20c310,_0x5b2b63){_0x20c310=_0x20c310-0x144;const _0x644237=a40_0x6442();let _0x179a25=_0x644237[_0x20c310];return _0x179a25;}async function fetchNpmDistTagVersion(_0x24f392){const _0x544fd7=await fetchNpmDistTags();return _0x544fd7?.[_0x24f392]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x4beaed){const _0x46662a=a40_0x22344d,_0x3ef641=getRequestedVersion(_0x4beaed);if(_0x3ef641)return{'version':_0x3ef641,'source':'version'};if(_0x4beaed[_0x46662a(0x154)](_0x46662a(0x177))){const _0x20f789=await fetchNpmDistTagVersion(_0x46662a(0x177));if(!_0x20f789)return null;return{'version':_0x20f789,'source':_0x46662a(0x177)};}const _0x530948=await fetchLatestVersion();if(!_0x530948)return null;return{'version':_0x530948,'source':'latest'};}function shouldInstallTarget(_0x35b024,_0x345d81){const _0x90cc96=a40_0x22344d;if(_0x345d81[_0x90cc96(0x14d)]===_0x90cc96(0x184)||_0x345d81[_0x90cc96(0x14d)]===_0x90cc96(0x177))return!a40_0x5497e4['eq'](_0x35b024,_0x345d81[_0x90cc96(0x184)]);return a40_0x5497e4['lt'](_0x35b024,_0x345d81[_0x90cc96(0x184)]);}function getInstallPlanLabel(_0x29cdd9,_0x4ca070){const _0x420e4d=a40_0x22344d;switch(_0x4ca070[_0x420e4d(0x14d)]){case _0x420e4d(0x177):return _0x420e4d(0x18b)+a40_0x5324ed[_0x420e4d(0x147)](_0x29cdd9)+'\x20→\x20'+a40_0x5324ed[_0x420e4d(0x168)](_0x4ca070[_0x420e4d(0x184)]);case _0x420e4d(0x184):return _0x420e4d(0x157)+a40_0x5324ed['yellow'](_0x29cdd9)+_0x420e4d(0x158)+a40_0x5324ed[_0x420e4d(0x168)](_0x4ca070['version']);case _0x420e4d(0x14b):default:return _0x420e4d(0x170)+a40_0x5324ed[_0x420e4d(0x147)](_0x29cdd9)+_0x420e4d(0x158)+a40_0x5324ed[_0x420e4d(0x168)](_0x4ca070[_0x420e4d(0x184)]);}}async function installCliSkill(_0x575e6b){const _0x20c28b=a40_0x22344d;console[_0x20c28b(0x14c)](a40_0x5324ed[_0x20c28b(0x188)](_0x20c28b(0x146)));const _0x5cd747=runNpxSkillsAddGlobal(process[_0x20c28b(0x16f)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x575e6b?'pipe':'inherit'});if(_0x5cd747['skipped']){console[_0x20c28b(0x14c)](a40_0x5324ed[_0x20c28b(0x188)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x5cd747['ok']){console[_0x20c28b(0x14c)](a40_0x5324ed[_0x20c28b(0x188)](_0x20c28b(0x174)));return;}console[_0x20c28b(0x164)](a40_0x5324ed[_0x20c28b(0x147)]('\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20'+(_0x5cd747[_0x20c28b(0x150)]||_0x20c28b(0x162)))),console[_0x20c28b(0x14c)](a40_0x5324ed['gray']('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+_0x20c28b(0x165)));}async function execute(_0x350c3c){const _0x554018=a40_0x22344d;await validateUpdateFlags(_0x350c3c);const _0x476845=getCurrentVersion();console['log']('Current\x20version:\x20'+_0x476845);const _0x315942=a40_0xdbe9a6(_0x554018(0x152))['start'](),_0x5f1be4=await resolveTargetVersion(_0x350c3c);if(!_0x5f1be4){const _0x3345fc=_0x350c3c[_0x554018(0x154)]('beta')?_0x554018(0x167):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x315942[_0x554018(0x161)](_0x3345fc),console[_0x554018(0x14c)](a40_0x5324ed[_0x554018(0x188)](_0x554018(0x17e)+NPM_PACKAGE_NAME+_0x554018(0x17d))),{'ok':![],'message':_0x3345fc};}const _0x36ae2e=a40_0x5497e4[_0x554018(0x186)](VERSION),_0x41dc06=a40_0x5497e4[_0x554018(0x186)](_0x5f1be4[_0x554018(0x184)]);if(!_0x36ae2e||!_0x41dc06)return _0x315942[_0x554018(0x161)](_0x554018(0x18c)),{'ok':![],'message':_0x554018(0x18c)};if(!shouldInstallTarget(_0x36ae2e,_0x5f1be4)){const _0x196a02=_0x5f1be4[_0x554018(0x14d)]===_0x554018(0x184)?'Already\x20on\x20requested\x20version\x20(v'+_0x5f1be4[_0x554018(0x184)]+')':'Already\x20up\x20to\x20date\x20(v'+_0x5f1be4[_0x554018(0x184)]+')';return _0x315942[_0x554018(0x15c)](_0x196a02),shouldSkipCliSkill(_0x350c3c)?console['log'](a40_0x5324ed[_0x554018(0x188)](_0x554018(0x173))):await installCliSkill(_0x350c3c[_0x554018(0x181)]),{'ok':!![]};}_0x315942[_0x554018(0x153)](getInstallPlanLabel(_0x476845,_0x5f1be4));const _0x5d0333=detectPackageManager(),_0x5b1766=_0x5d0333===_0x554018(0x169)?resolveNpmBin(_0x554018(0x169)):_0x5d0333,_0x51f59f=a40_0xdbe9a6(_0x554018(0x149)+_0x5d0333+_0x554018(0x156))[_0x554018(0x16e)]();try{return await execa(_0x5b1766,['install','-g',NPM_PACKAGE_NAME+'@'+_0x5f1be4[_0x554018(0x184)]],{'stdio':_0x554018(0x185)}),_0x51f59f[_0x554018(0x15c)](_0x554018(0x171)+_0x5f1be4[_0x554018(0x184)]),console[_0x554018(0x14c)](a40_0x5324ed[_0x554018(0x188)](_0x554018(0x17b))),shouldSkipCliSkill(_0x350c3c)?console[_0x554018(0x14c)](a40_0x5324ed[_0x554018(0x188)](_0x554018(0x173))):await installCliSkill(_0x350c3c[_0x554018(0x181)]),{'ok':!![]};}catch(_0x43ad9f){return _0x51f59f[_0x554018(0x161)](_0x554018(0x160)),console[_0x554018(0x150)](a40_0x5324ed[_0x554018(0x187)]('\x20\x20'+_0x43ad9f['message'])),console[_0x554018(0x14c)](a40_0x5324ed['gray']('\x20\x20Try\x20manually:\x20'+_0x5d0333+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x5f1be4['version'])),{'ok':![],'message':_0x43ad9f[_0x554018(0x15f)]};}}export const updateDefinition={'service':a40_0x22344d(0x14e),'command':a40_0x22344d(0x16d),'description':a40_0x22344d(0x15a),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};function a40_0x6442(){const _0x445835=['cwd','Update\x20available:\x20','Updated\x20to\x20v','flag','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','trim','toLowerCase','beta','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','no-skills','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','2685OOjbhr','@latest','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Invalid\x20version:\x20','slice','nonInteractive','4264673QfSrDD','https://registry.npmjs.org/-/package/','version','pipe','valid','red','gray','1873824iWvJJC','3462552KBRdfd','Beta\x20version:\x20','Version\x20comparison\x20failed','Install\x20a\x20specific\x20CLI\x20version','/dist-tags','validation','Checking\x20CLI\x20Built-in\x20Skill...','yellow','json','Updating\x20via\x20','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','latest','log','source','update','entries','error','timeout','Checking\x20for\x20updates...','info','bool','514ZENrvy','...','Requested\x20version:\x20','\x20→\x20','1377ijmNSr','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','88232JeWwdo','succeed','bun','276910pvuUBP','message','Update\x20failed','fail','unknown','object','warn','\x20cli-skill\x20install','execPath','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','green','npm','boolean','879261ZQPgoU','filter','run','start'];a40_0x6442=function(){return _0x445835;};return a40_0x6442();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x311f83,_0x228515){const _0xbdbe48=a41_0x19ac,_0x3b3c55=_0x311f83();while(!![]){try{const _0x4b2b56=-parseInt(_0xbdbe48(0x77))/0x1*(parseInt(_0xbdbe48(0x78))/0x2)+parseInt(_0xbdbe48(0x72))/0x3+parseInt(_0xbdbe48(0x6e))/0x4+parseInt(_0xbdbe48(0x76))/0x5*(parseInt(_0xbdbe48(0x73))/0x6)+-parseInt(_0xbdbe48(0x74))/0x7*(parseInt(_0xbdbe48(0x71))/0x8)+parseInt(_0xbdbe48(0x75))/0x9*(-parseInt(_0xbdbe48(0x6f))/0xa)+parseInt(_0xbdbe48(0x70))/0xb;if(_0x4b2b56===_0x228515)break;else _0x3b3c55['push'](_0x3b3c55['shift']());}catch(_0x426659){_0x3b3c55['push'](_0x3b3c55['shift']());}}}(a41_0x3ba6,0x82172));function a41_0x19ac(_0xc3cbfc,_0x43a136){_0xc3cbfc=_0xc3cbfc-0x6e;const _0x3ba67d=a41_0x3ba6();let _0x19ac6c=_0x3ba67d[_0xc3cbfc];return _0x19ac6c;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a41_0x3ba6(){const _0x12577f=['5816voimUu','2596674mBRBxA','3762498NDPTTf','4550kvJPuA','11745rHatRH','5QFKjvT','953331fNgmIb','2ZneaVS','3480848umAXOX','4520DVzQgc','2043118xDAPSe'];a41_0x3ba6=function(){return _0x12577f;};return a41_0x3ba6();}export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a42_0x5edffc=a42_0x464f;(function(_0x5c9974,_0x54d186){const _0x370aa4=a42_0x464f,_0x3a8047=_0x5c9974();while(!![]){try{const _0x43951a=parseInt(_0x370aa4(0x16f))/0x1*(parseInt(_0x370aa4(0x171))/0x2)+parseInt(_0x370aa4(0x162))/0x3+-parseInt(_0x370aa4(0x163))/0x4*(parseInt(_0x370aa4(0x16c))/0x5)+parseInt(_0x370aa4(0x173))/0x6*(parseInt(_0x370aa4(0x179))/0x7)+parseInt(_0x370aa4(0x164))/0x8+-parseInt(_0x370aa4(0x17a))/0x9*(-parseInt(_0x370aa4(0x175))/0xa)+-parseInt(_0x370aa4(0x17c))/0xb*(parseInt(_0x370aa4(0x170))/0xc);if(_0x43951a===_0x54d186)break;else _0x3a8047['push'](_0x3a8047['shift']());}catch(_0x346212){_0x3a8047['push'](_0x3a8047['shift']());}}}(a42_0x1b86,0x60656));function a42_0x464f(_0x8241c0,_0x533655){_0x8241c0=_0x8241c0-0x162;const _0x1b8613=a42_0x1b86();let _0x464fd2=_0x1b8613[_0x8241c0];return _0x464fd2;}function a42_0x1b86(){const _0x4a17a0=['27252kIXWaM','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','22cfzzxK','1882350joWuWb','949108OmgNRY','281760zatHoD','Omit\x20import\x20statements\x20from\x20generated\x20code','operation','read','tableName','code','str','alias','10AhXELM','appCode','boolean','23937mWVpwA','4404516WlYRjN','2FcBjgD','string','584274NxsqjN','codegen','1420ppVEpm','skip-imports','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','name','35EiubWR'];a42_0x1b86=function(){return _0x4a17a0;};return a42_0x1b86();}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0x5edffc(0x174),'command':'sdk','description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':a42_0x5edffc(0x167),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x5edffc(0x16b),'type':'string','description':a42_0x5edffc(0x177)},{'name':'operation','type':a42_0x5edffc(0x172),'required':!![],'description':a42_0x5edffc(0x17b)},{'name':a42_0x5edffc(0x176),'type':a42_0x5edffc(0x16e),'description':a42_0x5edffc(0x165)}],async 'execute'(_0x59c109){const _0xdd8c5b=a42_0x5edffc,{dataset:_0x9bda24,operation:_0x8128d8}=await getOperationDetail(_0x59c109[_0xdd8c5b(0x16d)],_0x59c109[_0xdd8c5b(0x16a)](_0xdd8c5b(0x169)),_0x59c109[_0xdd8c5b(0x16a)](_0xdd8c5b(0x166))),_0x2e8274=generateSdkCode(_0x9bda24,_0x8128d8,{'includeImports':!_0x59c109['bool'](_0xdd8c5b(0x176))});return{'ok':!![],'data':{'dataset':{'name':_0x9bda24[_0xdd8c5b(0x178)],'code':_0x9bda24[_0xdd8c5b(0x169)],'tableName':_0x9bda24[_0xdd8c5b(0x168)]},'operation':_0x59c109['str']('operation'),'code':_0x2e8274}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x47fdb1=a43_0x207d;function a43_0x2770(){const _0x6cdaa2=['appCode','3wbAqRB','12340KPymdQ','6GRWckA','181fziZkT','6515289wIXPsE','str','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','Omit\x20import\x20statements\x20from\x20generated\x20code','read','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','11ByjSlO','bff','sdk','2238250eESQyq','3780172PgSGNT','sqlcode','string','target','sql','no-imports','18511210jgSqtz','399925mWrvNy','bool','9402128EgupaN'];a43_0x2770=function(){return _0x6cdaa2;};return a43_0x2770();}(function(_0x2bfa0b,_0x5aa105){const _0x4c0dc4=a43_0x207d,_0x2b7e6c=_0x2bfa0b();while(!![]){try{const _0x2a529c=parseInt(_0x4c0dc4(0x11b))/0x1*(-parseInt(_0x4c0dc4(0x119))/0x2)+parseInt(_0x4c0dc4(0x131))/0x3*(-parseInt(_0x4c0dc4(0x126))/0x4)+-parseInt(_0x4c0dc4(0x12d))/0x5*(-parseInt(_0x4c0dc4(0x11a))/0x6)+parseInt(_0x4c0dc4(0x125))/0x7+parseInt(_0x4c0dc4(0x12f))/0x8+-parseInt(_0x4c0dc4(0x11c))/0x9+-parseInt(_0x4c0dc4(0x12c))/0xa*(-parseInt(_0x4c0dc4(0x122))/0xb);if(_0x2a529c===_0x5aa105)break;else _0x2b7e6c['push'](_0x2b7e6c['shift']());}catch(_0x325151){_0x2b7e6c['push'](_0x2b7e6c['shift']());}}}(a43_0x2770,0x9c584));function a43_0x207d(_0x24ef8c,_0x193d49){_0x24ef8c=_0x24ef8c-0x119;const _0x27704f=a43_0x2770();let _0x207d99=_0x27704f[_0x24ef8c];return _0x207d99;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':a43_0x47fdb1(0x12a),'description':a43_0x47fdb1(0x121),'risk':a43_0x47fdb1(0x120),'flags':[SQLCODE_FLAG,{'name':'target','type':a43_0x47fdb1(0x128),'description':a43_0x47fdb1(0x11e),'default':'sdk','enum':[a43_0x47fdb1(0x124),a43_0x47fdb1(0x123)]},{'name':a43_0x47fdb1(0x12b),'type':'boolean','description':a43_0x47fdb1(0x11f)}],async 'execute'(_0x5f467e){const _0x406519=a43_0x47fdb1,_0xcfc009=await getSqlQueryInfo(_0x5f467e[_0x406519(0x130)],_0x5f467e['str'](_0x406519(0x127))),_0x4ffb94=_0x5f467e[_0x406519(0x11d)](_0x406519(0x129))||'sdk',_0x15e4eb=generateSqlCodeTemplate(_0xcfc009,{'target':_0x4ffb94,'includeImports':!_0x5f467e[_0x406519(0x12e)](_0x406519(0x12b))});return{'ok':!![],'data':{'sqlCode':_0xcfc009['sqlCode'],'sqlName':_0xcfc009['sqlName'],'target':_0x4ffb94,'code':_0x15e4eb}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xdefb50,_0x189b0f){const _0x173568=a44_0xd4ac,_0x3ab183=_0xdefb50();while(!![]){try{const _0x11a86b=-parseInt(_0x173568(0xd6))/0x1*(parseInt(_0x173568(0xcc))/0x2)+-parseInt(_0x173568(0xd4))/0x3*(-parseInt(_0x173568(0xdd))/0x4)+parseInt(_0x173568(0xc5))/0x5+parseInt(_0x173568(0xeb))/0x6*(parseInt(_0x173568(0xe9))/0x7)+-parseInt(_0x173568(0xc1))/0x8+-parseInt(_0x173568(0xe0))/0x9*(parseInt(_0x173568(0xe8))/0xa)+-parseInt(_0x173568(0xc2))/0xb*(-parseInt(_0x173568(0xe5))/0xc);if(_0x11a86b===_0x189b0f)break;else _0x3ab183['push'](_0x3ab183['shift']());}catch(_0x5de5ad){_0x3ab183['push'](_0x3ab183['shift']());}}}(a44_0x214e,0x4ae3c));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a44_0x214e(){const _0xf6f614=['318kzzmbw','App\x20\x22','App\x20code','Use\x20global\x20config\x20scope','defaultApp','4166368JqPDZM','11385QhAptt','length','\x22\x20(appcode:\x20','2782190bAmfFL','validation','boolean','bool','Updated','str','\x20app\x20\x22','46126ZiJjQH','\x20<name>\x20--appcode\x20<code>','args','project','\x20<name>\x20[--global]','object','\x22\x20not\x20found.','Missing\x20app\x20name.','1110411ENPkGr','keys','4pzyPUM','trim','apps','\x20Default\x20app\x20changed\x20to\x20\x22','inherit','appcode','globalConfig','4LNJJnz','both','\x20Set\x20as\x20default\x20app.','5327109JkIHsT','projectConfig','global','Usage:\x20','\x20Note:\x20app\x20\x22','6588kxiyyN','string','Removed\x20app\x20\x22','10pCSmFc','2233UmFWzU','\x22\x20still\x20defined\x20in\x20'];a44_0x214e=function(){return _0xf6f614;};return a44_0x214e();}import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';function a44_0xd4ac(_0x5d749c,_0x4d8d25){_0x5d749c=_0x5d749c-0xbf;const _0x214edf=a44_0x214e();let _0xd4ac80=_0x214edf[_0x5d749c];return _0xd4ac80;}export function buildAppAddFlags(){const _0x57ef85=a44_0xd4ac;return[{'name':_0x57ef85(0xdb),'type':_0x57ef85(0xe6),'description':_0x57ef85(0xed),'required':!![]},{'name':_0x57ef85(0xe2),'type':_0x57ef85(0xc7),'description':_0x57ef85(0xbf),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x20d3f9=a44_0xd4ac;return[{'name':_0x20d3f9(0xe2),'type':_0x20d3f9(0xc7),'description':_0x20d3f9(0xbf),'default':![]}];}export async function validateAppName(_0x5155e1,_0x250dca){const _0x5d70c5=a44_0xd4ac,_0x4ea3a8=_0x5155e1[_0x5d70c5(0xce)][0x0]?.[_0x5d70c5(0xd7)]();if(!_0x4ea3a8)throw CliErrors[_0x5d70c5(0xc6)](_0x5d70c5(0xd3),_0x5d70c5(0xe3)+CLI_BIN_NAME+'\x20'+_0x250dca+'\x20<name>');}export async function runAppAdd(_0x147512,_0xc1aa81){const _0x295421=a44_0xd4ac,_0x22641b=_0x147512[_0x295421(0xce)][0x0]?.['trim']();if(!_0x22641b)throw CliErrors[_0x295421(0xc6)](_0x295421(0xd3),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0xc1aa81+_0x295421(0xcd));const _0x5e2a1e=_0x147512[_0x295421(0xca)](_0x295421(0xdb));if(!_0x5e2a1e)throw CliErrors['flagMissing'](_0x295421(0xdb),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0xc1aa81+_0x295421(0xcd));const _0xa3e4b7={'global':_0x147512[_0x295421(0xc8)](_0x295421(0xe2))},_0x1f2f2a=readConfig(_0xa3e4b7);if(!_0x1f2f2a[_0x295421(0xd8)])_0x1f2f2a['apps']={};const _0x5d7bba={'appcode':_0x5e2a1e,...collectAppProfileOverrides(_0x139e95=>_0x147512[_0x295421(0xca)](_0x139e95))},_0x43cf93=_0x1f2f2a[_0x295421(0xd8)],_0xe3f967=!!_0x43cf93[_0x22641b];_0x43cf93[_0x22641b]=_0x5d7bba;if(!_0x1f2f2a[_0x295421(0xc0)])_0x1f2f2a[_0x295421(0xc0)]=_0x22641b;writeConfig(_0x1f2f2a,_0xa3e4b7);const _0x1d7b06=!_0xe3f967&&_0x1f2f2a[_0x295421(0xc0)]===_0x22641b?_0x295421(0xdf):'',_0x408196=(_0xe3f967?_0x295421(0xc9):'Added')+_0x295421(0xcb)+_0x22641b+_0x295421(0xc4)+_0x5e2a1e+')'+scopeLabel(_0xa3e4b7)+'.'+_0x1d7b06;return{'ok':!![],'message':_0x408196};}export async function runAppRemove(_0x543735,_0x31c276){const _0x53e336=a44_0xd4ac,_0x3e6795=_0x543735[_0x53e336(0xce)][0x0]?.['trim']();if(!_0x3e6795)throw CliErrors['validation']('Missing\x20app\x20name.',_0x53e336(0xe3)+CLI_BIN_NAME+'\x20'+_0x31c276+_0x53e336(0xd0));const _0x1394e4=_0x543735[_0x53e336(0xc8)](_0x53e336(0xe2)),{config:_0x4ad4d4,layers:_0x56dde9}=readRawConfigWithLayers(),_0x2665df=_0x4ad4d4[_0x53e336(0xd8)]??{};if(!_0x2665df[_0x3e6795])throw CliErrors[_0x53e336(0xc6)]('App\x20\x22'+_0x3e6795+'\x22\x20not\x20found.');const _0x1add50=_0x56dde9['globalConfig'][_0x53e336(0xd8)]&&typeof _0x56dde9[_0x53e336(0xdc)][_0x53e336(0xd8)]===_0x53e336(0xd1)?_0x56dde9[_0x53e336(0xdc)]['apps']:{},_0x2fe7dc=_0x56dde9[_0x53e336(0xe1)][_0x53e336(0xd8)]&&typeof _0x56dde9[_0x53e336(0xe1)][_0x53e336(0xd8)]===_0x53e336(0xd1)?_0x56dde9[_0x53e336(0xe1)][_0x53e336(0xd8)]:{},_0x4e0989=appDefinedIn(_0x3e6795,_0x1add50,_0x2fe7dc,_0x56dde9[_0x53e336(0xe1)][_0x53e336(0xda)]===![]),_0x16b0ae=resolveAppScopeForWrite(_0x3e6795,_0x1394e4,_0x56dde9),_0x16b003={'global':_0x16b0ae===_0x53e336(0xe2)},_0x26394c=readConfig(_0x16b003),_0x187a54=_0x26394c[_0x53e336(0xd8)];if(!_0x187a54||!_0x187a54[_0x3e6795])throw CliErrors[_0x53e336(0xc6)](_0x53e336(0xec)+_0x3e6795+_0x53e336(0xd2));delete _0x187a54[_0x3e6795];let _0x4ca9d7='';if(_0x26394c['defaultApp']===_0x3e6795){const _0x19edc7=Object[_0x53e336(0xd5)](_0x187a54);_0x26394c[_0x53e336(0xc0)]=_0x19edc7[_0x53e336(0xc3)]>0x0?_0x19edc7[0x0]:undefined,_0x26394c[_0x53e336(0xc0)]?_0x4ca9d7=_0x53e336(0xd9)+_0x26394c[_0x53e336(0xc0)]+'\x22.':delete _0x26394c['defaultApp'];}Object[_0x53e336(0xd5)](_0x187a54)['length']===0x0&&(delete _0x26394c['apps'],delete _0x26394c[_0x53e336(0xc0)]);writeConfig(_0x26394c,_0x16b003);const _0xed4ba6=_0x4e0989===_0x53e336(0xde)?_0x53e336(0xe4)+_0x3e6795+_0x53e336(0xea)+(_0x16b0ae===_0x53e336(0xcf)?'global':_0x53e336(0xcf))+'\x20config.':'';return{'ok':!![],'message':_0x53e336(0xe7)+_0x3e6795+'\x22'+scopeLabel(_0x16b003)+'.'+_0x4ca9d7+_0xed4ba6};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xef9cb8,_0x488db4){const _0x26661e=a45_0x14ac,_0x55831d=_0xef9cb8();while(!![]){try{const _0xe25fef=-parseInt(_0x26661e(0xb4))/0x1*(parseInt(_0x26661e(0xca))/0x2)+parseInt(_0x26661e(0xc2))/0x3*(-parseInt(_0x26661e(0xcf))/0x4)+parseInt(_0x26661e(0xc8))/0x5+parseInt(_0x26661e(0xb8))/0x6*(-parseInt(_0x26661e(0xba))/0x7)+-parseInt(_0x26661e(0xb2))/0x8*(parseInt(_0x26661e(0xcd))/0x9)+-parseInt(_0x26661e(0xd7))/0xa*(parseInt(_0x26661e(0xc3))/0xb)+-parseInt(_0x26661e(0xb9))/0xc*(-parseInt(_0x26661e(0xc4))/0xd);if(_0xe25fef===_0x488db4)break;else _0x55831d['push'](_0x55831d['shift']());}catch(_0x325de3){_0x55831d['push'](_0x55831d['shift']());}}}(a45_0x449c,0xea54f));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x4106bb from'chalk';function a45_0x14ac(_0x543729,_0x1bd7f1){_0x543729=_0x543729-0xb0;const _0x449cd8=a45_0x449c();let _0x14ac15=_0x449cd8[_0x543729];return _0x14ac15;}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 _0x55f069=a45_0x14ac,_0x5d829a=await input({'message':_0x55f069(0xbc),'validate':_0x288340=>{const _0x100a8d=_0x55f069,_0x41f2f8=validateAppcode(_0x288340['trim']());return _0x41f2f8[_0x100a8d(0xd4)]||_0x41f2f8['message']||_0x100a8d(0xb7);}});return _0x5d829a['trim']();}export async function promptAppSelection(_0x5d5b07){const _0x19cc63=a45_0x14ac,_0xa3c281=[{'name':a45_0x4106bb['yellow'](_0x19cc63(0xc7)),'value':-0x1},..._0x5d5b07['map']((_0x446e2b,_0xf67682)=>({'name':_0x446e2b[_0x19cc63(0xd0)]+'\x20\x20'+a45_0x4106bb[_0x19cc63(0xbe)]('('+_0x446e2b[_0x19cc63(0xbb)]+')'),'value':_0xf67682}))],_0x4fa863=await checkbox({'message':_0x19cc63(0xd3)+a45_0x4106bb[_0x19cc63(0xc5)](_0x5d5b07['length'])+_0x19cc63(0xcb),'choices':_0xa3c281,'loop':![]});if(_0x4fa863[_0x19cc63(0xd5)](-0x1))return _0x19cc63(0xd1);if(_0x4fa863[_0x19cc63(0xbf)]===0x0)return'custom';return _0x4fa863[_0x19cc63(0xd8)](_0x2436b0=>_0x5d5b07[_0x2436b0]);}export async function promptSingleAppSelection(_0xacd60c){const _0x3d6daa=a45_0x14ac,_0x585c8a=[{'name':a45_0x4106bb['gray'](_0x3d6daa(0xce)),'value':_0x3d6daa(0xc0)},{'name':a45_0x4106bb[_0x3d6daa(0xb6)](_0x3d6daa(0xc7)),'value':_0x3d6daa(0xd1)},..._0xacd60c[_0x3d6daa(0xd8)](_0xdd89f=>({'name':_0xdd89f[_0x3d6daa(0xd0)]+'\x20\x20'+a45_0x4106bb[_0x3d6daa(0xbe)]('('+_0xdd89f[_0x3d6daa(0xbb)]+')'),'value':_0xdd89f[_0x3d6daa(0xbb)]}))],_0xe5c389=await select({'message':'请选择要绑定的应用:','choices':_0x585c8a});if(_0xe5c389===_0x3d6daa(0xc0))return _0x3d6daa(0xc0);if(_0xe5c389===_0x3d6daa(0xd1))return'custom';return _0xacd60c[_0x3d6daa(0xb3)](_0x426469=>_0x426469[_0x3d6daa(0xbb)]===_0xe5c389);}export async function selectSingleAppcode(_0x2abf47){const _0x5b754e=a45_0x14ac;if(!_0x2abf47)return writeCliSideChannelLine(a45_0x4106bb[_0x5b754e(0xbe)](_0x5b754e(0xc6))),_fallbackOrSkip();writeCliSideChannelLine(_0x5b754e(0xb0));let _0x527dcb;try{_0x527dcb=await withActiveCookie(_0x2abf47,()=>listRemoteApps());}catch(_0x3f3b1a){writeCliSideChannelLine(a45_0x4106bb[_0x5b754e(0xb6)]('无法获取远程应用列表,请手动输入。'));if(_0x3f3b1a instanceof Error)writeCliSideChannelLine(a45_0x4106bb[_0x5b754e(0xbe)](_0x5b754e(0xd6)+_0x3f3b1a[_0x5b754e(0xbd)]+')'));return _fallbackOrSkip();}if(_0x527dcb[_0x5b754e(0xbf)]===0x0)return writeCliSideChannelLine(a45_0x4106bb[_0x5b754e(0xb6)]('未找到可用应用。')),_fallbackOrSkip();const _0x333333=await promptSingleAppSelection(_0x527dcb);if(_0x333333==='skip')return'';if(_0x333333===_0x5b754e(0xd1))return promptCustomAppcode();return _0x333333[_0x5b754e(0xbb)];}export async function selectMultipleApps(_0xd6beed){const _0x466155=a45_0x14ac;writeCliSideChannelLine(_0x466155(0xb0));let _0x316b36;try{_0x316b36=await withActiveCookie(_0xd6beed,()=>listRemoteApps());}catch(_0x359d74){writeCliSideChannelLine(_0x466155(0xb1));if(_0x359d74 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x359d74[_0x466155(0xbd)]+')');return _0x466155(0xd1);}if(_0x316b36[_0x466155(0xbf)]===0x0)return writeCliSideChannelLine(_0x466155(0xc9)),_0x466155(0xd1);return promptAppSelection(_0x316b36);}async function _fallbackOrSkip(){const _0x5a4d3f=a45_0x14ac,_0x28b5fb=await select({'message':_0x5a4d3f(0xcc),'choices':[{'name':a45_0x4106bb[_0x5a4d3f(0xbe)](_0x5a4d3f(0xb5)),'value':_0x5a4d3f(0xc0)},{'name':a45_0x4106bb[_0x5a4d3f(0xb6)](_0x5a4d3f(0xc1)),'value':_0x5a4d3f(0xd2)}]});if(_0x28b5fb===_0x5a4d3f(0xc0))return'';return promptCustomAppcode();}function a45_0x449c(){const _0x55c46b=['(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','✎\x20自定义输入\x20appcode','7447565QDshKg','\x0a未找到可用应用。','2HPAZAs','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','App\x20Code:','101520aXtwiF','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','2564VsDMNS','appName','custom','manual','获取到\x20','valid','includes','\x20\x20(','190730EMmmkl','map','正在获取可用应用列表...','\x0a无法获取远程应用列表,请手动输入。','8ysvvSS','find','423649viuxLj','(跳过,稍后配置)','yellow','Invalid\x20App\x20Code','75678wOsnQg','5400LOwhBW','581OClged','appCode','请输入\x20App\x20Code:','message','gray','length','skip','✎\x20手动输入','6087HhcsYE','1001UHbpVy','115219dsqNNi','cyan'];a45_0x449c=function(){return _0x55c46b;};return a45_0x449c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x12b820=a46_0x239c;(function(_0x258c1a,_0x35d494){const _0x18f87d=a46_0x239c,_0x42b34d=_0x258c1a();while(!![]){try{const _0x2a4e64=parseInt(_0x18f87d(0x99))/0x1*(-parseInt(_0x18f87d(0x9f))/0x2)+parseInt(_0x18f87d(0xa6))/0x3+-parseInt(_0x18f87d(0xb2))/0x4*(parseInt(_0x18f87d(0x9c))/0x5)+parseInt(_0x18f87d(0xad))/0x6+parseInt(_0x18f87d(0xa1))/0x7*(parseInt(_0x18f87d(0xa8))/0x8)+parseInt(_0x18f87d(0xa9))/0x9+parseInt(_0x18f87d(0xb4))/0xa*(parseInt(_0x18f87d(0x9b))/0xb);if(_0x2a4e64===_0x35d494)break;else _0x42b34d['push'](_0x42b34d['shift']());}catch(_0x17f600){_0x42b34d['push'](_0x42b34d['shift']());}}}(a46_0x171a,0xada99));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a46_0x12b820(0xa5)]),NON_TERMINAL_STATUSES=new Set([a46_0x12b820(0xa7),'PROCESSING']);export function normalizeAsyncTask(_0x44e17d){const _0x582a68=a46_0x12b820,_0x3efe91=typeof _0x44e17d?.[_0x582a68(0xb0)]===_0x582a68(0xa0)?_0x44e17d[_0x582a68(0xb0)][_0x582a68(0x98)]():'';if(!_0x3efe91)throw CliErrors[_0x582a68(0xa2)](_0x582a68(0xb6));const _0x5b4ee4=typeof _0x44e17d[_0x582a68(0x96)]===_0x582a68(0xa0)?_0x44e17d[_0x582a68(0x96)]['trim']()[_0x582a68(0xb7)]():'';if(!_0x5b4ee4)throw CliErrors[_0x582a68(0xa2)]('Async\x20task\x20'+_0x3efe91+_0x582a68(0xb1));return{'taskId':_0x3efe91,'status':_0x5b4ee4,'errorMessage':typeof _0x44e17d[_0x582a68(0xac)]===_0x582a68(0xa0)&&_0x44e17d[_0x582a68(0xac)][_0x582a68(0x98)]()?_0x44e17d[_0x582a68(0xac)][_0x582a68(0x98)]():null,'isTerminal':TERMINAL_STATUSES[_0x582a68(0xae)](_0x5b4ee4),'knownStatus':TERMINAL_STATUSES[_0x582a68(0xae)](_0x5b4ee4)||NON_TERMINAL_STATUSES[_0x582a68(0xae)](_0x5b4ee4)};}export function buildAsyncTaskStatusCommand(_0x5b500c,_0x597530){const _0x280bba=a46_0x12b820;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x5b500c)+_0x280bba(0xb5)+quoteShellArg(_0x597530)+'\x20--format\x20compress';}export function asyncTaskMessage(_0x458437){const _0x243667=a46_0x12b820;switch(_0x458437[_0x243667(0x96)]){case _0x243667(0xa7):return'Task\x20'+_0x458437[_0x243667(0xb0)]+_0x243667(0x9a);case _0x243667(0xa4):return _0x243667(0x9d)+_0x458437['taskId']+_0x243667(0xaa);case _0x243667(0xb3):return _0x243667(0x9d)+_0x458437[_0x243667(0xb0)]+_0x243667(0x97);case _0x243667(0xa5):return _0x458437[_0x243667(0xac)]?'Task\x20'+_0x458437[_0x243667(0xb0)]+_0x243667(0x9e)+_0x458437[_0x243667(0xac)]:_0x243667(0x9d)+_0x458437[_0x243667(0xb0)]+_0x243667(0xaf);default:return _0x243667(0x9d)+_0x458437[_0x243667(0xb0)]+'\x20returned\x20unknown\x20status\x20'+_0x458437['status']+'.';}}function a46_0x239c(_0xcb1c13,_0x3333fb){_0xcb1c13=_0xcb1c13-0x96;const _0x171a49=a46_0x171a();let _0x239cd0=_0x171a49[_0xcb1c13];return _0x239cd0;}function quoteShellArg(_0x288105){const _0x559aa7=a46_0x12b820;return'\x27'+_0x288105[_0x559aa7(0xab)](/'/g,_0x559aa7(0xa3))+'\x27';}function a46_0x171a(){const _0x1c58fb=['60MlCroC','SUCCESS','26200GmDLAH','\x20--appcode\x20','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','toUpperCase','status','\x20completed\x20successfully.','trim','9278ABlTfh','\x20is\x20pending.','1243YvVqvm','135805eGcmbq','Task\x20','\x20failed:\x20','302cKFbch','string','334754DNaVAW','apiError','\x27\x5c\x27\x27','PROCESSING','FAILED','2810484CDdHix','PENDING','96VKFCUv','1116216xrfjGH','\x20is\x20processing.','replace','errorMessage','3533628wvCvNG','has','\x20failed.','taskId','\x20response\x20did\x20not\x20contain\x20a\x20status.'];a46_0x171a=function(){return _0x1c58fb;};return a46_0x171a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a47_0xe4a5(){var _0x4ee97b=['273009HtOSNO','url','1706184HkiCnx','method','247425cUjSXP','111282NssiED','2773856NyJetp','168YYRGtR','2217Ssvohm','defineProperties','description','752bWmgar','9843093etyaeA'];a47_0xe4a5=function(){return _0x4ee97b;};return a47_0xe4a5();}function a47_0x3bd2(_0x18273a,_0x5b46b0){_0x18273a=_0x18273a-0xa8;var _0xe4a53=a47_0xe4a5();var _0x3bd22f=_0xe4a53[_0x18273a];return _0x3bd22f;}(function(_0x2f3054,_0x135435){var _0x4552ac=a47_0x3bd2,_0x40dc4e=_0x2f3054();while(!![]){try{var _0x2a6eeb=-parseInt(_0x4552ac(0xaa))/0x1+parseInt(_0x4552ac(0xa8))/0x2*(-parseInt(_0x4552ac(0xb2))/0x3)+-parseInt(_0x4552ac(0xac))/0x4+parseInt(_0x4552ac(0xae))/0x5+-parseInt(_0x4552ac(0xaf))/0x6*(-parseInt(_0x4552ac(0xb1))/0x7)+-parseInt(_0x4552ac(0xb0))/0x8+parseInt(_0x4552ac(0xa9))/0x9;if(_0x2a6eeb===_0x135435)break;else _0x40dc4e['push'](_0x40dc4e['shift']());}catch(_0x3decde){_0x40dc4e['push'](_0x40dc4e['shift']());}}}(a47_0xe4a5,0x407cb));export function asDryRunResult(_0x4a2e74,_0x2f8f44){var _0x23ed82=a47_0x3bd2;return Object[_0x23ed82(0xb3)](_0x4a2e74,{'method':{'value':_0x2f8f44[_0x23ed82(0xad)],'enumerable':![]},'url':{'value':_0x2f8f44[_0x23ed82(0xab)],'enumerable':![]},..._0x2f8f44[_0x23ed82(0xb4)]?{'description':{'value':_0x2f8f44[_0x23ed82(0xb4)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a48_0x39d755=a48_0x5e86;(function(_0x540d16,_0x3a569d){const _0x1984b7=a48_0x5e86,_0x534956=_0x540d16();while(!![]){try{const _0xb7778=parseInt(_0x1984b7(0xc0))/0x1*(-parseInt(_0x1984b7(0xcd))/0x2)+-parseInt(_0x1984b7(0xb8))/0x3*(-parseInt(_0x1984b7(0xc1))/0x4)+parseInt(_0x1984b7(0xbb))/0x5*(parseInt(_0x1984b7(0xbc))/0x6)+-parseInt(_0x1984b7(0xc4))/0x7*(parseInt(_0x1984b7(0xbf))/0x8)+-parseInt(_0x1984b7(0xc6))/0x9+-parseInt(_0x1984b7(0xb7))/0xa+parseInt(_0x1984b7(0xc8))/0xb;if(_0xb7778===_0x3a569d)break;else _0x534956['push'](_0x534956['shift']());}catch(_0x436f78){_0x534956['push'](_0x534956['shift']());}}}(a48_0xcf78,0x27744));function a48_0xcf78(){const _0x26491c=['SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','6869665dpwDaT','string','dbtype','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','POSTGRESQL','108806ZFgEGf','datasetcode','App\x20code\x20(e.g.\x20app-xxxxx)','code','2577120prXnsu','250167Ffnipt','sqlcode','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','10leLHXh','227436wOVRBL','Database\x20product\x20type','number','914864HITUqw','4hhhBmx','4mdRUVt','appcode','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','7jYUGvd','Dataset\x20code\x20(32-char\x20hex\x20UUID)','291870JoOHAr'];a48_0xcf78=function(){return _0x26491c;};return a48_0xcf78();}export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a48_0x39d755(0xc3)};export const CODE_FLAG={'name':a48_0x39d755(0xb6),'type':'string','required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x39d755(0xce),'description':a48_0x39d755(0xc5)};export const SQLCODE_FLAG={'name':a48_0x39d755(0xb9),'type':a48_0x39d755(0xc9),'required':!![],'description':a48_0x39d755(0xc7),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x39d755(0xcb)}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0x39d755(0xc2),'type':a48_0x39d755(0xc9),'required':![],'description':a48_0x39d755(0xba)};function a48_0x5e86(_0x20104e,_0x9215da){_0x20104e=_0x20104e-0xb6;const _0xcf789b=a48_0xcf78();let _0x5e86fd=_0xcf789b[_0x20104e];return _0x5e86fd;}export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x39d755(0xcf)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x39d755(0xbe),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':a48_0x39d755(0xca),'type':'string','required':!![],'description':a48_0x39d755(0xbd),'enum':['MYSQL',a48_0x39d755(0xcc)]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a49_0x3ec2(_0x30ee38,_0x2284c7){_0x30ee38=_0x30ee38-0xad;const _0x443558=a49_0x4435();let _0x3ec275=_0x443558[_0x30ee38];return _0x3ec275;}(function(_0x43ac51,_0x481ebf){const _0x11a405=a49_0x3ec2,_0x53654e=_0x43ac51();while(!![]){try{const _0x19fb61=-parseInt(_0x11a405(0xba))/0x1*(-parseInt(_0x11a405(0xad))/0x2)+-parseInt(_0x11a405(0xbd))/0x3+-parseInt(_0x11a405(0xb8))/0x4+-parseInt(_0x11a405(0xb5))/0x5*(-parseInt(_0x11a405(0xb2))/0x6)+-parseInt(_0x11a405(0xbc))/0x7+parseInt(_0x11a405(0xaf))/0x8+-parseInt(_0x11a405(0xae))/0x9*(-parseInt(_0x11a405(0xb0))/0xa);if(_0x19fb61===_0x481ebf)break;else _0x53654e['push'](_0x53654e['shift']());}catch(_0x125d1e){_0x53654e['push'](_0x53654e['shift']());}}}(a49_0x4435,0xf2005));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a49_0x4435(){const _0x1f49e8=['4996527odiYBa','3184CmDlAl','25548921PwmqKD','11644448YQQGpp','10uMTvAB','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','7417902yQemuB','size','toFixed','5OzBcfr','\x20path\x20is\x20required.','File\x20is\x20not\x20a\x20regular\x20file:\x20','7510452KxGRnL','File\x20not\x20found:\x20','338Vbrxmv','validation','10740653brJdct'];a49_0x4435=function(){return _0x1f49e8;};return a49_0x4435();}function formatBytes(_0xec6396){const _0x181475=a49_0x3ec2;if(_0xec6396>=BYTES_PER_MB){const _0x51fe13=Math['ceil'](_0xec6396/BYTES_PER_MB*0x64)/0x64;return _0x51fe13[_0x181475(0xb4)](0x2)+'\x20MB';}return _0xec6396+'\x20B';}export function requireDevelopmentUploadFile(_0x30302b,_0x4c46c7){const _0x101830=a49_0x3ec2,_0x51d0a3=_0x30302b['trim']();if(!_0x51d0a3)throw CliErrors['validation'](_0x4c46c7+_0x101830(0xb6));if(!existsSync(_0x51d0a3))throw CliErrors[_0x101830(0xbb)](_0x101830(0xb9)+_0x51d0a3);const _0x36a8c1=statSync(_0x51d0a3);if(!_0x36a8c1['isFile']())throw CliErrors[_0x101830(0xbb)](_0x101830(0xb7)+_0x51d0a3);if(_0x36a8c1[_0x101830(0xb3)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation'](_0x101830(0xb1)+_0x51d0a3+'\x20('+formatBytes(_0x36a8c1[_0x101830(0xb3)])+')');return{'path':_0x51d0a3,'size':_0x36a8c1[_0x101830(0xb3)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x478788,_0x27ee09){const _0x9220a5=a50_0x579b,_0x191373=_0x478788();while(!![]){try{const _0x81d10f=parseInt(_0x9220a5(0x9f))/0x1*(-parseInt(_0x9220a5(0xa1))/0x2)+-parseInt(_0x9220a5(0xa0))/0x3+parseInt(_0x9220a5(0x96))/0x4*(-parseInt(_0x9220a5(0xa2))/0x5)+-parseInt(_0x9220a5(0x99))/0x6*(parseInt(_0x9220a5(0x97))/0x7)+parseInt(_0x9220a5(0x9b))/0x8*(parseInt(_0x9220a5(0x9e))/0x9)+-parseInt(_0x9220a5(0x9a))/0xa+parseInt(_0x9220a5(0x9c))/0xb*(parseInt(_0x9220a5(0x9d))/0xc);if(_0x81d10f===_0x27ee09)break;else _0x191373['push'](_0x191373['shift']());}catch(_0x238157){_0x191373['push'](_0x191373['shift']());}}}(a50_0x4360,0x3dfa5));function a50_0x579b(_0x4122fa,_0x5d6436){_0x4122fa=_0x4122fa-0x93;const _0x4360ec=a50_0x4360();let _0x579b43=_0x4360ec[_0x4122fa];return _0x579b43;}export function validateAppcode(_0x2d9a86){const _0x7c5b11=a50_0x579b,_0x2a810e=_0x2d9a86['trim']();if(!_0x2a810e)return{'valid':![],'message':_0x7c5b11(0x95)};if(_0x2a810e['length']>0x64)return{'valid':![],'message':_0x7c5b11(0x93)};if(!/^[A-Za-z0-9_-]+$/[_0x7c5b11(0x98)](_0x2a810e))return{'valid':![],'message':_0x7c5b11(0x94)};return{'valid':!![]};}function a50_0x4360(){const _0x2322ab=['Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','App\x20Code\x20cannot\x20be\x20empty','694236UYgkRc','7QuyFul','test','2976558tRNBUE','4483170zBukCu','3104zqbJjR','187jUQlas','1452972ExDkZs','2403eDflun','28187Ybdvwt','1440258zuQDeO','22GtfjjY','5xAKopP','App\x20Code\x20cannot\x20exceed\x20100\x20characters'];a50_0x4360=function(){return _0x2322ab;};return a50_0x4360();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a51_0x6c04(){const _0xf29400=['object','str','config','29220516GCJeYq','1276603QUHByu','1526752UmxCEm','appcode','Key\x20not\x20found:\x20','5312788JRUCxl','Usage:\x20','Missing\x20key.','30fGxaTt','validation','key','408086iDadrn','884205eHHYzD','Get\x20a\x20config\x20value\x20by\x20key','get','app','8dYsFLS','read','\x20config\x20get\x20--key\x20<key>','1047110HeZhbJ'];a51_0x6c04=function(){return _0xf29400;};return a51_0x6c04();}const a51_0x2ed4ac=a51_0x3b74;(function(_0xe53ec6,_0x3303b5){const _0x375bcd=a51_0x3b74,_0x4323ab=_0xe53ec6();while(!![]){try{const _0x14baab=-parseInt(_0x375bcd(0x8d))/0x1+parseInt(_0x375bcd(0x8e))/0x2+parseInt(_0x375bcd(0x98))/0x3+-parseInt(_0x375bcd(0x91))/0x4+-parseInt(_0x375bcd(0x9f))/0x5*(parseInt(_0x375bcd(0x94))/0x6)+-parseInt(_0x375bcd(0x97))/0x7*(-parseInt(_0x375bcd(0x9c))/0x8)+parseInt(_0x375bcd(0x8c))/0x9;if(_0x14baab===_0x3303b5)break;else _0x4323ab['push'](_0x4323ab['shift']());}catch(_0x436eb7){_0x4323ab['push'](_0x4323ab['shift']());}}}(a51_0x6c04,0xada37));function a51_0x3b74(_0x237705,_0x40ef8d){_0x237705=_0x237705-0x8a;const _0x6c04c2=a51_0x6c04();let _0x3b743c=_0x6c04c2[_0x237705];return _0x3b743c;}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x5dcb72){const _0x2d5596=a51_0x3b74,_0xd4bf6b=_0x5dcb72[_0x2d5596(0x8a)](_0x2d5596(0x96));if(!_0xd4bf6b)throw CliErrors[_0x2d5596(0x95)](_0x2d5596(0x93),_0x2d5596(0x92)+CLI_BIN_NAME+_0x2d5596(0x9e));const _0x5244fb=readConfig(),_0x3fd8ab=_0xd4bf6b===_0x2d5596(0x9b)?_0x2d5596(0x8f):_0xd4bf6b,_0x37273d=_0x5244fb[_0x3fd8ab];if(_0x37273d===undefined)throw CliErrors[_0x2d5596(0x95)](_0x2d5596(0x90)+_0xd4bf6b);return{'ok':!![],'data':typeof _0x37273d===_0x2d5596(0xa0)?_0x37273d:{[_0x3fd8ab]:_0x37273d},'message':typeof _0x37273d===_0x2d5596(0xa0)?undefined:String(_0x37273d)};}export const configGetDefinition={'service':a51_0x2ed4ac(0x8b),'command':a51_0x2ed4ac(0x9a),'description':a51_0x2ed4ac(0x99),'risk':a51_0x2ed4ac(0x9d),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a52_0x5c3c(_0x47c12a,_0x5412a3){_0x47c12a=_0x47c12a-0x88;const _0x4d1cc2=a52_0x4d1c();let _0x5c3ceb=_0x4d1cc2[_0x47c12a];return _0x5c3ceb;}function a52_0x4d1c(){const _0x2e067d=['1546140LafAzO','5987130qRvHZb','2192057YAQYvV','1827448Ngqatd','264723ARAjZI','9zmJArz','470740DjZjSi','165189XPESEM','6EPMwxk','2igANHn'];a52_0x4d1c=function(){return _0x2e067d;};return a52_0x4d1c();}(function(_0x561b83,_0xaf5a5){const _0x301cc1=a52_0x5c3c,_0x5b6bbf=_0x561b83();while(!![]){try{const _0x2ef2a6=parseInt(_0x301cc1(0x88))/0x1+-parseInt(_0x301cc1(0x8a))/0x2*(-parseInt(_0x301cc1(0x8f))/0x3)+parseInt(_0x301cc1(0x91))/0x4+parseInt(_0x301cc1(0x8b))/0x5+parseInt(_0x301cc1(0x89))/0x6*(parseInt(_0x301cc1(0x8d))/0x7)+-parseInt(_0x301cc1(0x8e))/0x8+-parseInt(_0x301cc1(0x90))/0x9*(parseInt(_0x301cc1(0x8c))/0xa);if(_0x2ef2a6===_0xaf5a5)break;else _0x5b6bbf['push'](_0x5b6bbf['shift']());}catch(_0x136c14){_0x5b6bbf['push'](_0x5b6bbf['shift']());}}}(a52_0x4d1c,0x289ce));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
|