@lovrabet/rabetbase-cli 2.3.8-beta.1 → 2.3.9-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/commands/bff/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a36_0x6c2eda=a36_0x3e5a;(function(_0x2ca4a0,_0x575dd2){const _0x33293f=a36_0x3e5a,_0x114847=_0x2ca4a0();while(!![]){try{const _0x1d3d80=parseInt(_0x33293f(0x143))/0x1*(parseInt(_0x33293f(0x14e))/0x2)+-parseInt(_0x33293f(0x171))/0x3*(parseInt(_0x33293f(0x158))/0x4)+-parseInt(_0x33293f(0x178))/0x5*(parseInt(_0x33293f(0x14c))/0x6)+parseInt(_0x33293f(0x165))/0x7*(parseInt(_0x33293f(0x146))/0x8)+parseInt(_0x33293f(0x177))/0x9+parseInt(_0x33293f(0x16d))/0xa+parseInt(_0x33293f(0x161))/0xb*(-parseInt(_0x33293f(0x151))/0xc);if(_0x1d3d80===_0x575dd2)break;else _0x114847['push'](_0x114847['shift']());}catch(_0x11e739){_0x114847['push'](_0x114847['shift']());}}}(a36_0x5196,0xdf4c0));function a36_0x3e5a(_0x4b9be7,_0x5d0a11){_0x4b9be7=_0x4b9be7-0x13a;const _0x519643=a36_0x5196();let _0x3e5a8e=_0x519643[_0x4b9be7];return _0x3e5a8e;}import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a36_0x5196(){const _0x1fb36b=['toLowerCase','push','\x20skipped,\x20','\x20remote\x20BFF\x20script(s)\x20for\x20pull','38uEhNVj','nonInteractive','pull','62888kwIuuQ','Remote\x20script\x20missing\x20id.','HOOK','Force\x20overwrite\x20local\x20unsynced\x20changes','cancelled','lastSync','95292KekyfW','yes','11962ArRmHz','scriptsRoot','Lock\x20scope\x20for\x20app\x20\x22','23758140mnfGEo','stderr','type','lockFilePath','hash','map','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','4NAPQEx','hookLocation','would_pull','str','GET','Pull\x20complete:\x20','length','lockKey','Remote\x20script\x20missing\x20content.','11KtzsYt','conflict','parse','functionNode','1064gJEjYn','apiDir','stringify','operationType','close','\x20failed','local\x20unsynced\x20changes','trim','13992050NinwAb','appCode','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','Force\x20pull\x20cancelled.','1664235QcdEQp','boolean','\x22\x20not\x20found\x20after\x20ensureLockScope.','validation','skipped','alias','9795933WPIRaH','145ThGRKq','version','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','message','force','question','functions','write','all','filePath','datasetCode','includes','/api/management/library/scripts/list?appCode=','ENDPOINT','scriptContent','functionName'];a36_0x5196=function(){return _0x1fb36b;};return a36_0x5196();}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':'bff','command':a36_0x6c2eda(0x145),'description':a36_0x6c2eda(0x16f),'risk':a36_0x6c2eda(0x17f),'flags':[{'name':a36_0x6c2eda(0x153),'type':'string','description':'Pull\x20only\x20this\x20script\x20type','enum':['COMMON',a36_0x6c2eda(0x13c),a36_0x6c2eda(0x148)]},{'name':a36_0x6c2eda(0x17c),'type':a36_0x6c2eda(0x172),'description':a36_0x6c2eda(0x149)}],async 'dryRun'(_0xa6dd8){const _0x3f2794=a36_0x6c2eda,_0x1f07f3=loadBffProjectConfig(_0xa6dd8[_0x3f2794(0x16e)]),_0xf5f699=await readBffLockFile(_0x1f07f3['lockFilePath']),{appLock:_0xb67f7c}=ensureLockScope(_0xf5f699??createEmptyBffLock(),_0xa6dd8['appCode'],_0x1f07f3[_0x3f2794(0x14f)],_0x3f2794(0x145)),_0x5d5d6d=normalizeBffType(_0xa6dd8['str'](_0x3f2794(0x153)))??undefined,_0x47a712=buildDatasetCodeToAliasMap(_0xa6dd8[_0x3f2794(0x166)],_0xa6dd8[_0x3f2794(0x16e)]),[_0x5b7edf,_0x232cb7]=await Promise[_0x3f2794(0x180)]([listBffScripts(_0xa6dd8[_0x3f2794(0x16e)],_0x5d5d6d),getBffScriptStatistics(_0xa6dd8[_0x3f2794(0x16e)])]),_0x365cba=createHookLocationMap(_0x232cb7),_0x35d01f=[];for(const _0x7cc71d of _0x5b7edf){const _0x5a4d14=resolveRemoteScriptTarget(_0x1f07f3,_0x7cc71d,_0x365cba,_0xb67f7c[_0x3f2794(0x17e)],_0x47a712);if(!_0x5a4d14){_0x35d01f[_0x3f2794(0x140)]({'scriptType':_0x7cc71d['scriptType'],'functionName':_0x7cc71d[_0x3f2794(0x13e)]??'','status':_0x3f2794(0x175),'reason':'unresolvable\x20target\x20path'});continue;}const _0x2abcd2=_0xb67f7c[_0x3f2794(0x17e)][_0x5a4d14[_0x3f2794(0x15f)]],_0x5622f6=_0x7cc71d[_0x3f2794(0x13d)]!=null?computeContentHash(_0x7cc71d[_0x3f2794(0x13d)]):undefined,_0x3e5278=await hasUnsyncedLocalChanges(_0x5a4d14[_0x3f2794(0x181)],_0x2abcd2,_0x5622f6);_0x35d01f[_0x3f2794(0x140)]({'lockKey':_0x5a4d14[_0x3f2794(0x15f)],'filePath':_0x5a4d14['filePath'],'remoteId':_0x7cc71d['id']??null,'status':_0x3e5278?_0x3f2794(0x162):_0x3f2794(0x15a)});}return{'method':_0x3f2794(0x15c),'url':_0x3f2794(0x13b)+_0xa6dd8['appCode']+(_0x5d5d6d?'&type='+_0x5d5d6d:''),'body':{'appCode':_0xa6dd8[_0x3f2794(0x16e)],'filterType':_0x5d5d6d??null,'files':_0x35d01f},'description':'Would\x20inspect\x20'+_0x35d01f[_0x3f2794(0x15e)]+_0x3f2794(0x142)};},async 'execute'(_0x1082b3){const _0x4834b3=a36_0x6c2eda,_0x2fa737=loadBffProjectConfig(_0x1082b3[_0x4834b3(0x16e)]),_0x1b2e49=await readBffLockFile(_0x2fa737[_0x4834b3(0x154)]),{lockData:_0x2dc54b,appLock:_0x28d237}=ensureLockScope(_0x1b2e49??createEmptyBffLock(),_0x1082b3[_0x4834b3(0x16e)],_0x2fa737[_0x4834b3(0x14f)],_0x4834b3(0x145)),_0x3b878f=normalizeBffType(_0x1082b3[_0x4834b3(0x15b)](_0x4834b3(0x153)))??undefined;if(_0x1082b3[_0x4834b3(0x15b)](_0x4834b3(0x153))&&!_0x3b878f)throw CliErrors[_0x4834b3(0x174)](_0x4834b3(0x157));const [_0x244a3a,_0x311b4f]=await Promise[_0x4834b3(0x180)]([listBffScripts(_0x1082b3[_0x4834b3(0x16e)],_0x3b878f),getBffScriptStatistics(_0x1082b3[_0x4834b3(0x16e)])]);if(_0x244a3a[_0x4834b3(0x15e)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20BFF\x20scripts\x20found.'};const _0x23a40e=_0x1082b3['bool'](_0x4834b3(0x17c));if(_0x23a40e&&!_0x1082b3[_0x4834b3(0x144)]){const _0x1ddd0b=await confirmForce();if(!_0x1ddd0b)throw CliErrors[_0x4834b3(0x14a)](_0x4834b3(0x170));}if(_0x23a40e&&_0x1082b3[_0x4834b3(0x144)]){}const _0x2dcae3=buildDatasetCodeToAliasMap(_0x1082b3[_0x4834b3(0x166)],_0x1082b3['appCode']),_0xfb2f0=createHookLocationMap(_0x311b4f),_0x51827c=JSON[_0x4834b3(0x163)](JSON[_0x4834b3(0x167)](_0x2dc54b)),_0x9453dd=_0x1082b3[_0x4834b3(0x16e)],_0x4e0da4=_0x51827c['apps'][_0x9453dd];if(!_0x4e0da4)throw new Error(_0x4834b3(0x150)+_0x9453dd+_0x4834b3(0x173));const _0x3c8331=[],_0x214bf8=[],_0x540097=[];for(const _0x36518d of _0x244a3a){const _0x4cbf5b=resolveRemoteScriptTarget(_0x2fa737,_0x36518d,_0xfb2f0,_0x28d237[_0x4834b3(0x17e)],_0x2dcae3);if(!_0x4cbf5b){_0x214bf8[_0x4834b3(0x140)]({'lockKey':_0x36518d['scriptType']+'/'+_0x36518d['functionName'],'reason':'unresolvable\x20target\x20path'});continue;}const _0x1ce923=_0x28d237[_0x4834b3(0x17e)][_0x4cbf5b['lockKey']];try{if(!_0x36518d['id'])throw new Error(_0x4834b3(0x147));if(_0x36518d[_0x4834b3(0x13d)]==null)throw new Error(_0x4834b3(0x160));const _0x3567ec=_0x36518d[_0x4834b3(0x13d)],_0x113c78=computeContentHash(_0x3567ec);if(!_0x23a40e){const _0xeae455=await hasUnsyncedLocalChanges(_0x4cbf5b['filePath'],_0x1ce923,_0x113c78);if(_0xeae455){_0x214bf8[_0x4834b3(0x140)]({'lockKey':_0x4cbf5b[_0x4834b3(0x15f)],'reason':_0x4834b3(0x16b)});continue;}}await ensureParentDirectory(_0x4cbf5b[_0x4834b3(0x181)]),await writeFile(_0x4cbf5b[_0x4834b3(0x181)],_0x3567ec,'utf8');const _0x170ffe={'hash':_0x113c78,'remoteId':_0x36518d['id'],'version':_0x36518d[_0x4834b3(0x179)]};_0x4cbf5b[_0x4834b3(0x153)]===_0x4834b3(0x148)&&_0x4cbf5b[_0x4834b3(0x159)]&&(_0x170ffe['alias']=_0x4cbf5b['hookLocation'][_0x4834b3(0x176)],_0x170ffe[_0x4834b3(0x182)]=_0x4cbf5b[_0x4834b3(0x159)][_0x4834b3(0x182)],_0x170ffe[_0x4834b3(0x168)]=_0x4cbf5b[_0x4834b3(0x159)][_0x4834b3(0x168)],_0x170ffe[_0x4834b3(0x164)]=_0x4cbf5b[_0x4834b3(0x159)]['functionNode']),_0x4e0da4[_0x4834b3(0x17e)][_0x4cbf5b[_0x4834b3(0x15f)]]=_0x170ffe,_0x3c8331[_0x4834b3(0x140)]({'lockKey':_0x4cbf5b[_0x4834b3(0x15f)],'remoteId':_0x36518d['id']});}catch(_0x2ae972){_0x540097['push']({'lockKey':_0x4cbf5b[_0x4834b3(0x15f)],'error':_0x2ae972 instanceof Error?_0x2ae972[_0x4834b3(0x17b)]:String(_0x2ae972)});}}return _0x4e0da4[_0x4834b3(0x14b)]=new Date()['toISOString'](),await writeBffLockFile(_0x2fa737['lockFilePath'],_0x51827c),{'ok':_0x540097[_0x4834b3(0x15e)]===0x0,'data':{'pulled':_0x3c8331,'skipped':_0x214bf8,'failed':_0x540097},'message':_0x4834b3(0x15d)+_0x3c8331[_0x4834b3(0x15e)]+'\x20pulled,\x20'+_0x214bf8['length']+_0x4834b3(0x141)+_0x540097[_0x4834b3(0x15e)]+_0x4834b3(0x16a)};}};async function hasUnsyncedLocalChanges(_0x13070a,_0x483cf9,_0x2b8669){const _0x29f960=a36_0x6c2eda;if(!await fileExists(_0x13070a))return![];const _0x2ac705=await computeFileHash(_0x13070a);if(!_0x483cf9)return _0x2b8669?_0x2ac705!==_0x2b8669:!![];return _0x2ac705!==_0x483cf9[_0x29f960(0x155)];}function buildDatasetCodeToAliasMap(_0x2b73b0,_0x2632ee){const _0x19289b=a36_0x6c2eda,_0x547496=loadAliasMap(_0x2b73b0,undefined,resolveApiFilePath(_0x2b73b0,_0x2632ee));return new Map(_0x547496[_0x19289b(0x156)](_0x36a520=>[_0x36a520['datasetCode'],_0x36a520['alias']]));}async function confirmForce(){const _0x1e789e=a36_0x6c2eda,_0x33e229=createInterface({'input':process['stdin'],'output':process[_0x1e789e(0x152)]}),_0x3fe5a5=await new Promise(_0x1bbba3=>{const _0x2ce8cd=_0x1e789e;_0x33e229[_0x2ce8cd(0x17d)](_0x2ce8cd(0x17a),_0x1bbba3);});return _0x33e229[_0x1e789e(0x169)](),['y',_0x1e789e(0x14d)][_0x1e789e(0x13a)](_0x3fe5a5[_0x1e789e(0x16c)]()[_0x1e789e(0x13f)]());}
|
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a37_0x2a1e70=a37_0x40b6;(function(_0x548b91,_0x2ca3be){const _0x555c13=a37_0x40b6,_0x5af861=_0x548b91();while(!![]){try{const _0x267fae=-parseInt(_0x555c13(0x148))/0x1*(parseInt(_0x555c13(0x163))/0x2)+-parseInt(_0x555c13(0x14f))/0x3*(-parseInt(_0x555c13(0x16e))/0x4)+parseInt(_0x555c13(0x162))/0x5+parseInt(_0x555c13(0x12b))/0x6+-parseInt(_0x555c13(0x147))/0x7*(-parseInt(_0x555c13(0x158))/0x8)+parseInt(_0x555c13(0x164))/0x9*(-parseInt(_0x555c13(0x14c))/0xa)+-parseInt(_0x555c13(0x12f))/0xb;if(_0x267fae===_0x2ca3be)break;else _0x5af861['push'](_0x5af861['shift']());}catch(_0x257b65){_0x5af861['push'](_0x5af861['shift']());}}}(a37_0x4285,0xe8186));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';function a37_0x40b6(_0x4a8d94,_0x40a2ae){_0x4a8d94=_0x4a8d94-0x127;const _0x42856f=a37_0x4285();let _0x40b69b=_0x42856f[_0x4a8d94];return _0x40b69b;}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a37_0x2a1e70(0x140),'command':a37_0x2a1e70(0x144),'description':a37_0x2a1e70(0x167),'risk':a37_0x2a1e70(0x127),'flags':[{'name':a37_0x2a1e70(0x13b),'type':'string','description':'Push\x20only\x20this\x20script\x20type','enum':['COMMON',a37_0x2a1e70(0x173),'HOOK']},{'name':'name','type':a37_0x2a1e70(0x150),'description':a37_0x2a1e70(0x176)},{'name':a37_0x2a1e70(0x133),'type':a37_0x2a1e70(0x12e),'description':a37_0x2a1e70(0x160)}],async 'dryRun'(_0x5f5223){const _0x15655c=a37_0x2a1e70,_0x54e982=loadBffProjectConfig(_0x5f5223[_0x15655c(0x13e)]),_0x5459ab=await readBffLockFile(_0x54e982[_0x15655c(0x153)]),{appLock:_0x395755}=ensureLockScope(_0x5459ab??createEmptyBffLock(),_0x5f5223[_0x15655c(0x13e)],_0x54e982['scriptsRoot'],_0x15655c(0x144)),_0x4bf979=await getTargetFunctions(_0x54e982,_0x5f5223),_0x3d4c61=_0x5f5223[_0x15655c(0x131)](_0x15655c(0x133)),_0x29bca0=[];for(const _0x1cb535 of _0x4bf979){const _0x3e65ae=await computeFileHash(_0x1cb535[_0x15655c(0x149)]),_0x1a2d45=_0x395755['functions'][_0x1cb535[_0x15655c(0x16a)]],_0x422e73=!!_0x1a2d45&&_0x1a2d45[_0x15655c(0x16b)]===_0x3e65ae;_0x29bca0[_0x15655c(0x144)]({'lockKey':_0x1cb535['lockKey'],'filePath':_0x1cb535[_0x15655c(0x149)],'remoteId':_0x1a2d45?.[_0x15655c(0x16c)]??null,'mode':_0x1a2d45?.['remoteId']?_0x15655c(0x172):_0x15655c(0x15b),'status':!_0x3d4c61&&_0x422e73?_0x15655c(0x15d):_0x15655c(0x157)});}return{'method':'POST','url':'/api/management/library/scripts/save','body':{'appCode':_0x5f5223[_0x15655c(0x13e)],'force':_0x3d4c61,'files':_0x29bca0,'cacheClearAtRuntime':_0x29bca0[_0x15655c(0x12d)](_0x577dd6=>_0x577dd6['status']===_0x15655c(0x157)),'cacheClearAtRuntimeTimes':_0x29bca0[_0x15655c(0x12d)](_0x1f298b=>_0x1f298b[_0x15655c(0x145)]===_0x15655c(0x157))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x15655c(0x169)+_0x29bca0[_0x15655c(0x170)]+'\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0x12532c){const _0x468e9a=a37_0x2a1e70,_0x9742d6=loadBffProjectConfig(_0x12532c['appCode']),_0x2ac109=await readBffLockFile(_0x9742d6['lockFilePath']),{lockData:_0x15cad6,appLock:_0x15e403}=ensureLockScope(_0x2ac109??createEmptyBffLock(),_0x12532c[_0x468e9a(0x13e)],_0x9742d6[_0x468e9a(0x14d)],'push'),_0x110d0d=await getTargetFunctions(_0x9742d6,_0x12532c);if(_0x110d0d[_0x468e9a(0x170)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x468e9a(0x159)};const _0x3bee4c=_0x12532c[_0x468e9a(0x131)]('force'),_0x4f33b0=JSON[_0x468e9a(0x129)](JSON[_0x468e9a(0x142)](_0x15cad6)),_0x7d52a7=_0x4f33b0['apps'][_0x12532c[_0x468e9a(0x13e)]];if(!_0x7d52a7)throw new Error(_0x468e9a(0x128)+_0x12532c[_0x468e9a(0x13e)]+_0x468e9a(0x14e));const _0x466ebf=await buildHookMaps(_0x12532c[_0x468e9a(0x13e)],_0x12532c[_0x468e9a(0x13c)],_0x110d0d,_0x7d52a7),_0x584fdf=[],_0x2a1912=[],_0x4c60a2=[];for(const _0x2abf35 of _0x110d0d){const _0x42f599=await computeFileHash(_0x2abf35[_0x468e9a(0x149)]),_0x51a85a=_0x7d52a7[_0x468e9a(0x16d)][_0x2abf35[_0x468e9a(0x16a)]];if(!_0x3bee4c&&_0x51a85a&&_0x51a85a[_0x468e9a(0x16b)]===_0x42f599){_0x2a1912['push']({'lockKey':_0x2abf35['lockKey'],'reason':_0x468e9a(0x15d)});continue;}try{await uploadSingleFunction(_0x12532c[_0x468e9a(0x13e)],_0x2abf35,_0x7d52a7,_0x466ebf);const _0x4435f2=_0x7d52a7['functions'][_0x2abf35[_0x468e9a(0x16a)]];_0x584fdf[_0x468e9a(0x144)]({'lockKey':_0x2abf35[_0x468e9a(0x16a)],'remoteId':_0x4435f2?.[_0x468e9a(0x16c)]??0x0});}catch(_0x3dd4c0){_0x4c60a2[_0x468e9a(0x144)]({'lockKey':_0x2abf35[_0x468e9a(0x16a)],'error':_0x3dd4c0 instanceof Error?_0x3dd4c0['message']:String(_0x3dd4c0)});}}_0x7d52a7[_0x468e9a(0x16f)]=new Date()[_0x468e9a(0x151)](),await writeBffLockFile(_0x9742d6[_0x468e9a(0x153)],_0x4f33b0),await waitForUploadedLockEntries(_0x9742d6[_0x468e9a(0x153)],_0x12532c[_0x468e9a(0x13e)],_0x584fdf[_0x468e9a(0x14b)](_0x5df7a7=>_0x5df7a7[_0x468e9a(0x16a)]));let _0x2c3c19={'attempted':![],'cleared':![]};if(_0x584fdf['length']>0x0)try{let _0x272158='';for(let _0x662692=0x0;_0x662692<CACHE_CLEAR_ATTEMPTS;_0x662692+=0x1){_0x272158=await clearBffScriptCache(),_0x662692<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x2c3c19={'attempted':!![],'cleared':!![],'message':_0x272158||_0x468e9a(0x171)};}catch(_0x5804da){_0x2c3c19={'attempted':!![],'cleared':![],'error':_0x5804da instanceof Error?_0x5804da['message']:String(_0x5804da)};}const _0x26e7aa=_0x4c60a2[_0x468e9a(0x170)]===0x0&&(_0x2c3c19[_0x468e9a(0x136)]?_0x2c3c19[_0x468e9a(0x15e)]:!![]),_0x14eedb=_0x2c3c19[_0x468e9a(0x136)]?_0x2c3c19[_0x468e9a(0x15e)]?_0x468e9a(0x13a):_0x468e9a(0x138):'runtime\x20cache\x20not\x20needed';return{'ok':_0x26e7aa,'data':{'uploaded':_0x584fdf,'skipped':_0x2a1912,'failed':_0x4c60a2,'cacheClear':_0x2c3c19},'message':_0x468e9a(0x141)+_0x584fdf[_0x468e9a(0x170)]+'\x20uploaded,\x20'+_0x2a1912[_0x468e9a(0x170)]+_0x468e9a(0x13d)+_0x4c60a2[_0x468e9a(0x170)]+'\x20failed,\x20'+_0x14eedb};}};async function getTargetFunctions(_0x218386,_0x28a83d){const _0x121b1f=a37_0x2a1e70,_0x3be5e3=_0x28a83d[_0x121b1f(0x137)]('type'),_0x140526=_0x28a83d[_0x121b1f(0x137)](_0x121b1f(0x15a)),_0x7fb7e=normalizeBffType(_0x3be5e3)??undefined;if(_0x140526&&!_0x7fb7e)throw CliErrors[_0x121b1f(0x154)](_0x121b1f(0x152));const _0x46f277=await scanLocalBffFunctions(_0x218386,_0x7fb7e);if(_0x140526){const _0x5d3bf3=_0x46f277['filter'](_0x4bd8d9=>_0x4bd8d9[_0x121b1f(0x15a)]===_0x140526);if(_0x5d3bf3[_0x121b1f(0x170)]===0x0)throw CliErrors['validation'](_0x121b1f(0x146)+_0x7fb7e+'/'+_0x140526);return _0x5d3bf3;}return _0x46f277;}function a37_0x4285(){const _0xf41619=['872199QoehuF','has','Run\x20`','Push\x20local\x20BFF\x20scripts\x20to\x20remote','functionNode','Would\x20inspect\x20','lockKey','hash','remoteId','functions','2105528RjMCaI','lastSync','length','Runtime\x20script\x20cache\x20cleared.','update','ENDPOINT','alias','code','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','description','datasetId','high-risk-write','Lock\x20scope\x20for\x20app\x20\x22','parse','HOOK','11116374RzicmC','aliasToDatasetCode','some','boolean','6882546jGMVlP','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','bool','datasetCode','force','apps','version','attempted','str','runtime\x20cache\x20clear\x20failed','operationType','runtime\x20cache\x20cleared','type','apiDir','\x20skipped,\x20','appCode','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','bff','Push\x20complete:\x20','stringify','get','push','status','Local\x20function\x20not\x20found:\x20','1804999wTHVOT','150901EFhTJY','filePath','join','map','50GrANyq','scriptsRoot','\x22\x20not\x20found\x20after\x20ensureLockScope.','3AAwFIS','string','toISOString','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','lockFilePath','validation','utf8',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','would_push','16uhJZYK','No\x20local\x20BFF\x20functions\x20found.','name','create','Cannot\x20resolve\x20dataset\x20for\x20\x22','unchanged','cleared','datasetCodeToDataset','Force\x20push\x20ignoring\x20hash\x20protection','every','357420fpITFx','12WhaLCT'];a37_0x4285=function(){return _0xf41619;};return a37_0x4285();}async function buildHookMaps(_0x47bcc9,_0x2194c9,_0x3652af,_0x41e3bf){const _0x3ba61e=a37_0x2a1e70,_0x12b93b=_0x3652af[_0x3ba61e(0x12d)](_0x9e6016=>_0x9e6016[_0x3ba61e(0x13b)]===_0x3ba61e(0x12a));if(!_0x12b93b)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x448f5a=loadAliasMap(_0x2194c9,undefined,resolveApiFilePath(_0x2194c9,_0x47bcc9)),_0x5f5b80=new Map(_0x448f5a['map'](_0x53546e=>[_0x53546e[_0x3ba61e(0x174)],_0x53546e[_0x3ba61e(0x132)]]));for(const _0x47605d of Object['values'](_0x41e3bf[_0x3ba61e(0x16d)])){_0x47605d[_0x3ba61e(0x174)]&&_0x47605d[_0x3ba61e(0x132)]&&!_0x5f5b80[_0x3ba61e(0x165)](_0x47605d[_0x3ba61e(0x174)])&&_0x5f5b80['set'](_0x47605d['alias'],_0x47605d[_0x3ba61e(0x132)]);}const _0x4c34a1=await listDatasets(_0x47bcc9),_0x2a46fb=new Map(_0x4c34a1[_0x3ba61e(0x14b)](_0xf13c8f=>[_0xf13c8f[_0x3ba61e(0x175)],_0xf13c8f]));return{'aliasToDatasetCode':_0x5f5b80,'datasetCodeToDataset':_0x2a46fb};}async function uploadSingleFunction(_0x29df0c,_0x570019,_0x14b732,_0x22d836){const _0x2ebaf5=a37_0x2a1e70,_0x287c58=await readFile(_0x570019[_0x2ebaf5(0x149)],_0x2ebaf5(0x155)),_0x3d6733=await computeFileHash(_0x570019[_0x2ebaf5(0x149)]),_0x3d2909=_0x14b732[_0x2ebaf5(0x16d)][_0x570019[_0x2ebaf5(0x16a)]];if(_0x3d2909?.[_0x2ebaf5(0x16c)]&&_0x3d2909[_0x2ebaf5(0x135)]==null)throw CliErrors[_0x2ebaf5(0x154)](_0x570019[_0x2ebaf5(0x16a)]+_0x2ebaf5(0x156));let _0x18b86a=extractScriptDescription(_0x287c58);if(!_0x18b86a&&_0x3d2909?.['remoteId']){const _0x18ccaa=await getBffScriptInfo(_0x3d2909['remoteId']);_0x18b86a=_0x18ccaa['description']||undefined;}const _0x2293de={'appCode':_0x29df0c,'functionName':_0x570019[_0x2ebaf5(0x15a)],'scriptType':_0x570019[_0x2ebaf5(0x13b)],'scriptContent':_0x287c58};if(_0x3d2909?.[_0x2ebaf5(0x16c)])_0x2293de['id']=_0x3d2909['remoteId'];if(_0x3d2909?.[_0x2ebaf5(0x135)]!=null)_0x2293de[_0x2ebaf5(0x135)]=_0x3d2909[_0x2ebaf5(0x135)];if(_0x18b86a)_0x2293de[_0x2ebaf5(0x177)]=_0x18b86a;if(_0x570019['type']===_0x2ebaf5(0x12a)){const _0x1122b=_0x570019['alias'];if(!_0x1122b||!_0x570019[_0x2ebaf5(0x139)]||!_0x570019[_0x2ebaf5(0x168)])throw CliErrors[_0x2ebaf5(0x154)]('Incomplete\x20HOOK\x20path:\x20'+_0x570019[_0x2ebaf5(0x16a)]);const _0x520aa7=_0x22d836[_0x2ebaf5(0x12c)][_0x2ebaf5(0x143)](_0x1122b)??_0x3d2909?.[_0x2ebaf5(0x132)]??_0x1122b,_0x3858f3=_0x22d836[_0x2ebaf5(0x15f)][_0x2ebaf5(0x143)](_0x520aa7);if(!_0x3858f3)throw CliErrors['validation'](_0x2ebaf5(0x15c)+_0x1122b+'\x22.\x20'+(_0x2ebaf5(0x166)+CLI_BIN_NAME+_0x2ebaf5(0x130)));_0x2293de[_0x2ebaf5(0x178)]=_0x3858f3['id'],_0x2293de['operationType']=_0x570019[_0x2ebaf5(0x139)],_0x2293de[_0x2ebaf5(0x168)]=_0x570019[_0x2ebaf5(0x168)];}const _0x443201=await saveBffScript(_0x2293de),_0x59cd84=_0x443201['id'],_0x5322e0=_0x443201['script']??await getBffScriptInfo(_0x59cd84),_0x2183d3={'hash':_0x3d6733,'remoteId':_0x59cd84,'version':_0x5322e0[_0x2ebaf5(0x135)]};if(_0x570019[_0x2ebaf5(0x13b)]===_0x2ebaf5(0x12a)){const _0x2a1f5e=_0x570019[_0x2ebaf5(0x174)],_0x513791=_0x22d836['aliasToDatasetCode']['get'](_0x2a1f5e)??_0x3d2909?.[_0x2ebaf5(0x132)]??_0x2a1f5e;_0x22d836[_0x2ebaf5(0x12c)][_0x2ebaf5(0x165)](_0x2a1f5e)?_0x2183d3[_0x2ebaf5(0x174)]=_0x2a1f5e:_0x2183d3[_0x2ebaf5(0x174)]=_0x3d2909?.[_0x2ebaf5(0x174)],_0x2183d3[_0x2ebaf5(0x132)]=_0x513791,_0x2183d3[_0x2ebaf5(0x139)]=_0x570019['operationType'],_0x2183d3[_0x2ebaf5(0x168)]=_0x570019[_0x2ebaf5(0x168)];}_0x14b732[_0x2ebaf5(0x16d)][_0x570019['lockKey']]=_0x2183d3;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x2dc3e4,_0x3de100,_0x356ffe){const _0x40dc73=a37_0x2a1e70;if(_0x356ffe['length']===0x0)return;for(let _0x5b7466=0x0;_0x5b7466<LOCK_SETTLE_RETRY_COUNT;_0x5b7466+=0x1){const _0x57fe9c=await readBffLockFile(_0x2dc3e4),_0x448f05=_0x57fe9c?.[_0x40dc73(0x134)]?.[_0x3de100]?.['functions']??{},_0x548127=_0x356ffe[_0x40dc73(0x161)](_0x1aa4e3=>!!_0x448f05[_0x1aa4e3]?.[_0x40dc73(0x16c)]);if(_0x548127)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x40dc73(0x13f)+_0x356ffe[_0x40dc73(0x14a)](',\x20')+'.');}
|
|
1
|
+
const a37_0x380763=a37_0x4a28;(function(_0x49807e,_0x1b0dbb){const _0x2cd230=a37_0x4a28,_0x1c5477=_0x49807e();while(!![]){try{const _0x5b3d3f=parseInt(_0x2cd230(0x8c))/0x1+-parseInt(_0x2cd230(0xa6))/0x2+-parseInt(_0x2cd230(0xb6))/0x3+-parseInt(_0x2cd230(0x7b))/0x4*(parseInt(_0x2cd230(0xa0))/0x5)+-parseInt(_0x2cd230(0xa8))/0x6*(-parseInt(_0x2cd230(0x92))/0x7)+parseInt(_0x2cd230(0x79))/0x8+parseInt(_0x2cd230(0x9a))/0x9;if(_0x5b3d3f===_0x1b0dbb)break;else _0x1c5477['push'](_0x1c5477['shift']());}catch(_0x58e41a){_0x1c5477['push'](_0x1c5477['shift']());}}}(a37_0x197e,0xf0e30));function a37_0x197e(){const _0x1671c3=['datasetCode','parse','has','type','str','Push\x20only\x20this\x20script\x20type','runtime\x20cache\x20clear\x20failed','Would\x20inspect\x20','5849883eIiLAx','every','/api/management/library/scripts/save','\x20uploaded,\x20','get','Incomplete\x20HOOK\x20path:\x20','toISOString','\x20skipped,\x20','string','description','hash','apiDir','script','operationType','datasetCodeToDataset','create','apps','some','name','7311544uolWfD','datasetId','1507276xofXak','values','cleared','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','push','\x22\x20not\x20found\x20after\x20ensureLockScope.','message','COMMON','status','Push\x20complete:\x20','attempted','scriptsRoot','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','join','remoteId','appCode','1580745ZzROsd','No\x20local\x20BFF\x20functions\x20found.','Push\x20local\x20BFF\x20scripts\x20to\x20remote','lockKey','alias','Force\x20push\x20ignoring\x20hash\x20protection','63HippYL','map','bool','aliasToDatasetCode','HOOK','filePath','boolean','code','22485888sotUla',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','runtime\x20cache\x20not\x20needed','length','runtime\x20cache\x20cleared','high-risk-write','15FgRZIq','lockFilePath','functions','Lock\x20scope\x20for\x20app\x20\x22','validation','bff','2727598CuJrww','functionNode','291846SiAnps','update','version','Local\x20function\x20not\x20found:\x20','would_push','ENDPOINT'];a37_0x197e=function(){return _0x1671c3;};return a37_0x197e();}import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';function a37_0x4a28(_0x4963ee,_0x483836){_0x4963ee=_0x4963ee-0x6d;const _0x197e0=a37_0x197e();let _0x4a28ed=_0x197e0[_0x4963ee];return _0x4a28ed;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a37_0x380763(0xa5),'command':a37_0x380763(0x7f),'description':a37_0x380763(0x8e),'risk':a37_0x380763(0x9f),'flags':[{'name':a37_0x380763(0xb1),'type':a37_0x380763(0x6e),'description':a37_0x380763(0xb3),'enum':[a37_0x380763(0x82),a37_0x380763(0xad),a37_0x380763(0x96)]},{'name':a37_0x380763(0x78),'type':'string','description':a37_0x380763(0x87)},{'name':'force','type':a37_0x380763(0x98),'description':a37_0x380763(0x91)}],async 'dryRun'(_0x140409){const _0x4ce3c2=a37_0x380763,_0x1a8fe4=loadBffProjectConfig(_0x140409['appCode']),_0x6deb24=await readBffLockFile(_0x1a8fe4[_0x4ce3c2(0xa1)]),{appLock:_0x11a207}=ensureLockScope(_0x6deb24??createEmptyBffLock(),_0x140409[_0x4ce3c2(0x8b)],_0x1a8fe4['scriptsRoot'],_0x4ce3c2(0x7f)),_0x8ad77d=await getTargetFunctions(_0x1a8fe4,_0x140409),_0x43b16d=_0x140409['bool']('force'),_0x3d27a9=[];for(const _0x3c8230 of _0x8ad77d){const _0x176d2d=await computeFileHash(_0x3c8230[_0x4ce3c2(0x97)]),_0x3f81bb=_0x11a207[_0x4ce3c2(0xa2)][_0x3c8230[_0x4ce3c2(0x8f)]],_0x20923c=!!_0x3f81bb&&_0x3f81bb['hash']===_0x176d2d;_0x3d27a9[_0x4ce3c2(0x7f)]({'lockKey':_0x3c8230['lockKey'],'filePath':_0x3c8230[_0x4ce3c2(0x97)],'remoteId':_0x3f81bb?.[_0x4ce3c2(0x8a)]??null,'mode':_0x3f81bb?.[_0x4ce3c2(0x8a)]?_0x4ce3c2(0xa9):_0x4ce3c2(0x75),'status':!_0x43b16d&&_0x20923c?'unchanged':_0x4ce3c2(0xac)});}return{'method':'POST','url':_0x4ce3c2(0xb8),'body':{'appCode':_0x140409[_0x4ce3c2(0x8b)],'force':_0x43b16d,'files':_0x3d27a9,'cacheClearAtRuntime':_0x3d27a9[_0x4ce3c2(0x77)](_0x13ce2f=>_0x13ce2f[_0x4ce3c2(0x83)]===_0x4ce3c2(0xac)),'cacheClearAtRuntimeTimes':_0x3d27a9[_0x4ce3c2(0x77)](_0xa8e6d6=>_0xa8e6d6[_0x4ce3c2(0x83)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x4ce3c2(0xb5)+_0x3d27a9[_0x4ce3c2(0x9d)]+_0x4ce3c2(0x88)};},async 'execute'(_0x4feb99){const _0xc19dad=a37_0x380763,_0x232b43=loadBffProjectConfig(_0x4feb99[_0xc19dad(0x8b)]),_0x4b0821=await readBffLockFile(_0x232b43['lockFilePath']),{lockData:_0x451903,appLock:_0x51c3e6}=ensureLockScope(_0x4b0821??createEmptyBffLock(),_0x4feb99[_0xc19dad(0x8b)],_0x232b43[_0xc19dad(0x86)],'push'),_0x43c903=await getTargetFunctions(_0x232b43,_0x4feb99);if(_0x43c903[_0xc19dad(0x9d)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0xc19dad(0x8d)};const _0x230d9b=_0x4feb99[_0xc19dad(0x94)]('force'),_0x75567=JSON[_0xc19dad(0xaf)](JSON['stringify'](_0x451903)),_0x3ec58b=_0x75567[_0xc19dad(0x76)][_0x4feb99[_0xc19dad(0x8b)]];if(!_0x3ec58b)throw new Error(_0xc19dad(0xa3)+_0x4feb99[_0xc19dad(0x8b)]+_0xc19dad(0x80));const _0x57db70=await buildHookMaps(_0x4feb99[_0xc19dad(0x8b)],_0x4feb99[_0xc19dad(0x71)],_0x43c903,_0x3ec58b),_0x47ea53=[],_0x45816b=[],_0x3351cb=[];for(const _0xb1e013 of _0x43c903){const _0x79c26d=await computeFileHash(_0xb1e013[_0xc19dad(0x97)]),_0x369a2c=_0x3ec58b[_0xc19dad(0xa2)][_0xb1e013[_0xc19dad(0x8f)]];if(!_0x230d9b&&_0x369a2c&&_0x369a2c[_0xc19dad(0x70)]===_0x79c26d){_0x45816b['push']({'lockKey':_0xb1e013[_0xc19dad(0x8f)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x4feb99[_0xc19dad(0x8b)],_0xb1e013,_0x3ec58b,_0x57db70);const _0x34fedb=_0x3ec58b[_0xc19dad(0xa2)][_0xb1e013[_0xc19dad(0x8f)]];_0x47ea53[_0xc19dad(0x7f)]({'lockKey':_0xb1e013[_0xc19dad(0x8f)],'remoteId':_0x34fedb?.[_0xc19dad(0x8a)]??0x0});}catch(_0x1c8c53){_0x3351cb[_0xc19dad(0x7f)]({'lockKey':_0xb1e013['lockKey'],'error':_0x1c8c53 instanceof Error?_0x1c8c53[_0xc19dad(0x81)]:String(_0x1c8c53)});}}_0x3ec58b['lastSync']=new Date()[_0xc19dad(0xbc)](),await writeBffLockFile(_0x232b43[_0xc19dad(0xa1)],_0x75567),await waitForUploadedLockEntries(_0x232b43['lockFilePath'],_0x4feb99[_0xc19dad(0x8b)],_0x47ea53['map'](_0x18df07=>_0x18df07[_0xc19dad(0x8f)]));let _0x3bf0cd={'attempted':![],'cleared':![]};if(_0x47ea53[_0xc19dad(0x9d)]>0x0)try{let _0x53f9fc='';for(let _0x324834=0x0;_0x324834<CACHE_CLEAR_ATTEMPTS;_0x324834+=0x1){_0x53f9fc=await clearBffScriptCache(),_0x324834<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x3bf0cd={'attempted':!![],'cleared':!![],'message':_0x53f9fc||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x296a07){_0x3bf0cd={'attempted':!![],'cleared':![],'error':_0x296a07 instanceof Error?_0x296a07[_0xc19dad(0x81)]:String(_0x296a07)};}const _0xeb0795=_0x3351cb[_0xc19dad(0x9d)]===0x0&&(_0x3bf0cd['attempted']?_0x3bf0cd[_0xc19dad(0x7d)]:!![]),_0x154844=_0x3bf0cd[_0xc19dad(0x85)]?_0x3bf0cd[_0xc19dad(0x7d)]?_0xc19dad(0x9e):_0xc19dad(0xb4):_0xc19dad(0x9c);return{'ok':_0xeb0795,'data':{'uploaded':_0x47ea53,'skipped':_0x45816b,'failed':_0x3351cb,'cacheClear':_0x3bf0cd},'message':_0xc19dad(0x84)+_0x47ea53[_0xc19dad(0x9d)]+_0xc19dad(0xb9)+_0x45816b[_0xc19dad(0x9d)]+_0xc19dad(0x6d)+_0x3351cb[_0xc19dad(0x9d)]+'\x20failed,\x20'+_0x154844};}};async function getTargetFunctions(_0x3244a7,_0xd7b1b5){const _0x41ed51=a37_0x380763,_0x30aa5f=_0xd7b1b5[_0x41ed51(0xb2)]('type'),_0x288652=_0xd7b1b5['str'](_0x41ed51(0x78)),_0x11ec74=normalizeBffType(_0x30aa5f)??undefined;if(_0x288652&&!_0x11ec74)throw CliErrors['validation']('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x1fb033=await scanLocalBffFunctions(_0x3244a7,_0x11ec74);if(_0x288652){const _0x187936=_0x1fb033['filter'](_0x3f22b9=>_0x3f22b9[_0x41ed51(0x78)]===_0x288652);if(_0x187936[_0x41ed51(0x9d)]===0x0)throw CliErrors[_0x41ed51(0xa4)](_0x41ed51(0xab)+_0x11ec74+'/'+_0x288652);return _0x187936;}return _0x1fb033;}async function buildHookMaps(_0x3d9ae5,_0x1d3f86,_0x28b9c5,_0x3bddaa){const _0x13b4dc=a37_0x380763,_0x225147=_0x28b9c5[_0x13b4dc(0x77)](_0x4d8bde=>_0x4d8bde[_0x13b4dc(0xb1)]==='HOOK');if(!_0x225147)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x5f543c=loadAliasMap(_0x1d3f86,undefined,resolveApiFilePath(_0x1d3f86,_0x3d9ae5)),_0x22bb67=new Map(_0x5f543c[_0x13b4dc(0x93)](_0x3aca70=>[_0x3aca70[_0x13b4dc(0x90)],_0x3aca70[_0x13b4dc(0xae)]]));for(const _0xaaace7 of Object[_0x13b4dc(0x7c)](_0x3bddaa[_0x13b4dc(0xa2)])){_0xaaace7['alias']&&_0xaaace7[_0x13b4dc(0xae)]&&!_0x22bb67[_0x13b4dc(0xb0)](_0xaaace7[_0x13b4dc(0x90)])&&_0x22bb67['set'](_0xaaace7[_0x13b4dc(0x90)],_0xaaace7['datasetCode']);}const _0x1e6f8a=await listDatasets(_0x3d9ae5),_0x283dc3=new Map(_0x1e6f8a['map'](_0x37dcb1=>[_0x37dcb1[_0x13b4dc(0x99)],_0x37dcb1]));return{'aliasToDatasetCode':_0x22bb67,'datasetCodeToDataset':_0x283dc3};}async function uploadSingleFunction(_0x1a2066,_0x3e6161,_0x1e9250,_0x3e87eb){const _0x294014=a37_0x380763,_0x2fdbdf=await readFile(_0x3e6161[_0x294014(0x97)],'utf8'),_0x249c01=await computeFileHash(_0x3e6161['filePath']),_0x2c6fdb=_0x1e9250[_0x294014(0xa2)][_0x3e6161[_0x294014(0x8f)]];if(_0x2c6fdb?.[_0x294014(0x8a)]&&_0x2c6fdb[_0x294014(0xaa)]==null)throw CliErrors[_0x294014(0xa4)](_0x3e6161[_0x294014(0x8f)]+_0x294014(0x9b));let _0x2264a6=extractScriptDescription(_0x2fdbdf);if(!_0x2264a6&&_0x2c6fdb?.[_0x294014(0x8a)]){const _0x402cd2=await getBffScriptInfo(_0x2c6fdb[_0x294014(0x8a)]);_0x2264a6=_0x402cd2[_0x294014(0x6f)]||undefined;}const _0x2b6f60={'appCode':_0x1a2066,'functionName':_0x3e6161['name'],'scriptType':_0x3e6161[_0x294014(0xb1)],'scriptContent':_0x2fdbdf};if(_0x2c6fdb?.[_0x294014(0x8a)])_0x2b6f60['id']=_0x2c6fdb[_0x294014(0x8a)];if(_0x2c6fdb?.[_0x294014(0xaa)]!=null)_0x2b6f60['version']=_0x2c6fdb[_0x294014(0xaa)];if(_0x2264a6)_0x2b6f60[_0x294014(0x6f)]=_0x2264a6;if(_0x3e6161['type']===_0x294014(0x96)){const _0x4e34aa=_0x3e6161[_0x294014(0x90)];if(!_0x4e34aa||!_0x3e6161[_0x294014(0x73)]||!_0x3e6161[_0x294014(0xa7)])throw CliErrors[_0x294014(0xa4)](_0x294014(0xbb)+_0x3e6161[_0x294014(0x8f)]);const _0x239e22=_0x3e87eb[_0x294014(0x95)][_0x294014(0xba)](_0x4e34aa)??_0x2c6fdb?.[_0x294014(0xae)]??_0x4e34aa,_0x2c5a27=_0x3e87eb[_0x294014(0x74)]['get'](_0x239e22);if(!_0x2c5a27)throw CliErrors['validation']('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x4e34aa+'\x22.\x20'+('Run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x2b6f60[_0x294014(0x7a)]=_0x2c5a27['id'],_0x2b6f60[_0x294014(0x73)]=_0x3e6161[_0x294014(0x73)],_0x2b6f60[_0x294014(0xa7)]=_0x3e6161[_0x294014(0xa7)];}const _0x5ea9ae=await saveBffScript(_0x2b6f60),_0x457857=_0x5ea9ae['id'],_0x353bb4=_0x5ea9ae[_0x294014(0x72)]??await getBffScriptInfo(_0x457857),_0x53eef6={'hash':_0x249c01,'remoteId':_0x457857,'version':_0x353bb4[_0x294014(0xaa)]};if(_0x3e6161['type']===_0x294014(0x96)){const _0x5af475=_0x3e6161[_0x294014(0x90)],_0x5334f9=_0x3e87eb[_0x294014(0x95)][_0x294014(0xba)](_0x5af475)??_0x2c6fdb?.[_0x294014(0xae)]??_0x5af475;_0x3e87eb[_0x294014(0x95)][_0x294014(0xb0)](_0x5af475)?_0x53eef6[_0x294014(0x90)]=_0x5af475:_0x53eef6['alias']=_0x2c6fdb?.[_0x294014(0x90)],_0x53eef6[_0x294014(0xae)]=_0x5334f9,_0x53eef6[_0x294014(0x73)]=_0x3e6161[_0x294014(0x73)],_0x53eef6['functionNode']=_0x3e6161[_0x294014(0xa7)];}_0x1e9250[_0x294014(0xa2)][_0x3e6161['lockKey']]=_0x53eef6;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0xf850eb,_0x742618,_0x39bcba){const _0x5846a9=a37_0x380763;if(_0x39bcba[_0x5846a9(0x9d)]===0x0)return;for(let _0x186ba8=0x0;_0x186ba8<LOCK_SETTLE_RETRY_COUNT;_0x186ba8+=0x1){const _0x166e0e=await readBffLockFile(_0xf850eb),_0x149269=_0x166e0e?.[_0x5846a9(0x76)]?.[_0x742618]?.[_0x5846a9(0xa2)]??{},_0x21a2de=_0x39bcba[_0x5846a9(0xb7)](_0x420021=>!!_0x149269[_0x420021]?.[_0x5846a9(0x8a)]);if(_0x21a2de)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x5846a9(0x7e)+_0x39bcba[_0x5846a9(0x89)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a38_0xdf4945=a38_0x4655;(function(_0x47d3b8,_0x1baf63){const _0x42240c=a38_0x4655,_0x3416a5=_0x47d3b8();while(!![]){try{const _0x5b33c4=-parseInt(_0x42240c(0x18a))/0x1+-parseInt(_0x42240c(0x19e))/0x2*(-parseInt(_0x42240c(0x192))/0x3)+-parseInt(_0x42240c(0x183))/0x4+parseInt(_0x42240c(0x193))/0x5+-parseInt(_0x42240c(0x187))/0x6*(-parseInt(_0x42240c(0x181))/0x7)+-parseInt(_0x42240c(0x19c))/0x8*(-parseInt(_0x42240c(0x196))/0x9)+parseInt(_0x42240c(0x189))/0xa*(-parseInt(_0x42240c(0x1a0))/0xb);if(_0x5b33c4===_0x1baf63)break;else _0x3416a5['push'](_0x3416a5['shift']());}catch(_0x124f56){_0x3416a5['push'](_0x3416a5['shift']());}}}(a38_0x43f0,0x736f4));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a38_0x43f0(){const _0x4a73e5=['alias','\x20added,\x20','functions','length','60492zDGYiG','2613355KXUYfg','\x20remote-only','datasetCode','2965122nUBquJ','boolean','remote','\x20unchanged','\x20modified,\x20','apiDir','8UcUFMG','status','14rWNZRh','All\x20BFF\x20scripts\x20are\x20in\x20sync.','3763804WUFWcC','scriptsRoot','4360482PAdcCn','bool','135564oUkzpm','push','read','appCode','6rsyiwk','all','30QlRQkQ','83000rWzzrr','map','lockKey','filePath'];a38_0x43f0=function(){return _0x4a73e5;};return a38_0x43f0();}function a38_0x4655(_0x4afd20,_0x52ac2d){_0x4afd20=_0x4afd20-0x180;const _0x43f084=a38_0x43f0();let _0x465553=_0x43f084[_0x4afd20];return _0x465553;}import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':'bff','command':a38_0xdf4945(0x19d),'description':'Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','risk':a38_0xdf4945(0x185),'flags':[{'name':'remote','type':a38_0xdf4945(0x197),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x4332b9){const _0x35f615=a38_0xdf4945,_0x2b822e=loadBffProjectConfig(_0x4332b9[_0x35f615(0x186)]),_0x35ae6c=await readBffLockFile(_0x2b822e['lockFilePath']),{appLock:_0x5055fb}=ensureLockScope(_0x35ae6c??createEmptyBffLock(),_0x4332b9[_0x35f615(0x186)],_0x2b822e[_0x35f615(0x180)],_0x35f615(0x19d)),_0x1183c0=await scanLocalBffFunctions(_0x2b822e),_0x3541d8=[],_0x39cd03=[],_0x154873=[];for(const _0x32105f of _0x1183c0){const _0x238fa8=await computeFileHash(_0x32105f[_0x35f615(0x18d)]),_0x22e44b=_0x5055fb[_0x35f615(0x190)][_0x32105f[_0x35f615(0x18c)]];if(!_0x22e44b)_0x3541d8[_0x35f615(0x184)](_0x32105f[_0x35f615(0x18c)]);else _0x22e44b['hash']!==_0x238fa8?_0x39cd03[_0x35f615(0x184)](_0x32105f[_0x35f615(0x18c)]):_0x154873[_0x35f615(0x184)](_0x32105f['lockKey']);}const _0x53029f=[];if(_0x4332b9[_0x35f615(0x182)](_0x35f615(0x198))){const _0x2421ff=loadAliasMap(_0x4332b9[_0x35f615(0x19b)],undefined,resolveApiFilePath(_0x4332b9[_0x35f615(0x19b)],_0x4332b9['appCode'])),_0x5e5452=new Map(_0x2421ff[_0x35f615(0x18b)](_0x1ccde5=>[_0x1ccde5[_0x35f615(0x195)],_0x1ccde5[_0x35f615(0x18e)]])),[_0x3eb2c4,_0x14ba34]=await Promise[_0x35f615(0x188)]([listBffScripts(_0x4332b9['appCode']),getBffScriptStatistics(_0x4332b9[_0x35f615(0x186)])]),_0x5deaf9=createHookLocationMap(_0x14ba34),_0x3aa850=new Set(_0x1183c0[_0x35f615(0x18b)](_0x2c5bd=>_0x2c5bd['lockKey']));for(const _0x4e49a8 of _0x3eb2c4){const _0x4cf7c7=resolveRemoteScriptTarget(_0x2b822e,_0x4e49a8,_0x5deaf9,_0x5055fb[_0x35f615(0x190)],_0x5e5452);_0x4cf7c7&&!_0x3aa850['has'](_0x4cf7c7['lockKey'])&&_0x53029f[_0x35f615(0x184)](_0x4cf7c7[_0x35f615(0x18c)]);}}const _0x235e7c=_0x3541d8['length']===0x0&&_0x39cd03[_0x35f615(0x191)]===0x0&&_0x53029f[_0x35f615(0x191)]===0x0;return{'ok':!![],'data':{'added':_0x3541d8,'modified':_0x39cd03,'unchanged':_0x154873,'remoteOnly':_0x53029f},'message':_0x235e7c?_0x35f615(0x19f):_0x3541d8[_0x35f615(0x191)]+_0x35f615(0x18f)+_0x39cd03['length']+_0x35f615(0x19a)+_0x154873[_0x35f615(0x191)]+_0x35f615(0x199)+(_0x53029f[_0x35f615(0x191)]>0x0?',\x20'+_0x53029f[_0x35f615(0x191)]+_0x35f615(0x194):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a39_0x1d92c0=a39_0x2409;(function(_0x1427fa,_0x27045f){const _0x148e48=a39_0x2409,_0x303eb9=_0x1427fa();while(!![]){try{const _0x2cb206=parseInt(_0x148e48(0x1c7))/0x1+parseInt(_0x148e48(0x1da))/0x2*(-parseInt(_0x148e48(0x1cd))/0x3)+-parseInt(_0x148e48(0x1e0))/0x4*(parseInt(_0x148e48(0x1e1))/0x5)+parseInt(_0x148e48(0x1cf))/0x6+-parseInt(_0x148e48(0x1c5))/0x7+-parseInt(_0x148e48(0x1d6))/0x8*(parseInt(_0x148e48(0x1d5))/0x9)+parseInt(_0x148e48(0x1d7))/0xa;if(_0x2cb206===_0x27045f)break;else _0x303eb9['push'](_0x303eb9['shift']());}catch(_0x2e45ef){_0x303eb9['push'](_0x303eb9['shift']());}}}(a39_0x341f,0xa4d07));import{CliErrors}from'../../errors.js';function a39_0x341f(){const _0x92a3e1=['skipped','cli-skill','error','CLI\x20Built-in\x20Skill\x20installed','pipe','1444244JYSOnX','15yRHbvr','8070013vHnsJa','info','852351bkULmF','unknown','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','install','cwd','apiError','3zTVTpP','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','8041278xulgbV','log','inherit','write','../../skills/npx-skills-add.js','npx\x20skills\x20add\x20failed:\x20','1341ICpyJs','20048ZpJAgD','14344930YYWwah','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','685084tgYpOg'];a39_0x341f=function(){return _0x92a3e1;};return a39_0x341f();}import{logger}from'../../utils/logger.js';function a39_0x2409(_0x8acab9,_0x569a6d){_0x8acab9=_0x8acab9-0x1c5;const _0x341f57=a39_0x341f();let _0x240915=_0x341f57[_0x8acab9];return _0x240915;}export const cliSkillDefinitions=[{'service':a39_0x1d92c0(0x1dc),'command':a39_0x1d92c0(0x1ca),'description':'Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','risk':a39_0x1d92c0(0x1d2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x32e23a){const _0x30e1c7=a39_0x1d92c0;logger['setLogPath'](process[_0x30e1c7(0x1cb)]()),logger[_0x30e1c7(0x1c6)]('cli-skill-install',_0x30e1c7(0x1d8));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x43d7c7,RABETBASE_SKILL_SOURCE:_0x574165,runNpxSkillsAddGlobal:_0x864fae}=await import(_0x30e1c7(0x1d3)),_0x507a08=_0x32e23a['nonInteractive']?_0x30e1c7(0x1df):_0x30e1c7(0x1d1);console['log'](_0x30e1c7(0x1d9)+_0x43d7c7+')...');const _0x332c76=_0x864fae(process[_0x30e1c7(0x1cb)](),_0x574165,{'stdio':_0x507a08});if(_0x332c76[_0x30e1c7(0x1db)])console[_0x30e1c7(0x1d0)](_0x30e1c7(0x1ce));else{if(_0x332c76['ok'])console[_0x30e1c7(0x1d0)](_0x30e1c7(0x1de));else throw CliErrors[_0x30e1c7(0x1cc)](_0x30e1c7(0x1d4)+(_0x332c76[_0x30e1c7(0x1dd)]||_0x30e1c7(0x1c8)),_0x30e1c7(0x1c9)+_0x43d7c7);}return{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a40_0x11cb73=a40_0x3657;function a40_0x3657(_0x1d23ee,_0x54a01f){_0x1d23ee=_0x1d23ee-0x10f;const _0x5bd9b8=a40_0x5bd9();let _0x365778=_0x5bd9b8[_0x1d23ee];return _0x365778;}(function(_0x58bbd9,_0x189f0a){const _0x56f561=a40_0x3657,_0xb8bf9e=_0x58bbd9();while(!![]){try{const _0x5073c8=parseInt(_0x56f561(0x142))/0x1*(-parseInt(_0x56f561(0x14b))/0x2)+-parseInt(_0x56f561(0x151))/0x3*(-parseInt(_0x56f561(0x162))/0x4)+-parseInt(_0x56f561(0x147))/0x5*(parseInt(_0x56f561(0x155))/0x6)+parseInt(_0x56f561(0x148))/0x7+parseInt(_0x56f561(0x150))/0x8*(-parseInt(_0x56f561(0x129))/0x9)+parseInt(_0x56f561(0x144))/0xa*(parseInt(_0x56f561(0x118))/0xb)+parseInt(_0x56f561(0x14c))/0xc;if(_0x5073c8===_0x189f0a)break;else _0xb8bf9e['push'](_0xb8bf9e['shift']());}catch(_0x4bd462){_0xb8bf9e['push'](_0xb8bf9e['shift']());}}}(a40_0x5bd9,0x3ad73));import a40_0x296863 from'chalk';import a40_0x3846ca from'ora';import a40_0x31d99d from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x293046=a40_0x3657;return GIT_COMMIT!==_0x293046(0x11e)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x3adf34=a40_0x3657,_0x5ad6c3=process[_0x3adf34(0x132)]['toLowerCase']();if(_0x5ad6c3[_0x3adf34(0x134)](_0x3adf34(0x113)))return _0x3adf34(0x113);return'npm';}const updateFlags=[{'name':'beta','type':'boolean','description':a40_0x11cb73(0x146),'default':![]},{'name':a40_0x11cb73(0x159),'type':'string','description':a40_0x11cb73(0x119)},{'name':'no-skills','type':a40_0x11cb73(0x13f),'description':a40_0x11cb73(0x13a),'default':![]},{'name':a40_0x11cb73(0x136),'type':a40_0x11cb73(0x13f),'description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x14ffbc){const _0x3e5f40=a40_0x11cb73;return _0x14ffbc[_0x3e5f40(0x112)](_0x3e5f40(0x159))['trim']();}function shouldSkipCliSkill(_0x4e55de){const _0x5b5c42=a40_0x11cb73;return _0x4e55de[_0x5b5c42(0x10f)](_0x5b5c42(0x158))||_0x4e55de[_0x5b5c42(0x115)]('skills')===![];}async function validateUpdateFlags(_0x3a5c02){const _0x1f7bcc=a40_0x11cb73,_0x2217db=_0x3a5c02[_0x1f7bcc(0x10f)](_0x1f7bcc(0x156)),_0x10dc31=getRequestedVersion(_0x3a5c02);if(_0x2217db&&_0x10dc31)throw CliErrors[_0x1f7bcc(0x116)](_0x1f7bcc(0x126),_0x1f7bcc(0x15e));if(_0x10dc31&&!a40_0x31d99d[_0x1f7bcc(0x122)](_0x10dc31))throw CliErrors['validation'](_0x1f7bcc(0x133)+_0x10dc31,_0x1f7bcc(0x153));}async function fetchNpmDistTags(){const _0x49e154=a40_0x11cb73;try{const _0x17b48a=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x49e154(0x12a),{'signal':AbortSignal[_0x49e154(0x13d)](0x2710)});if(!_0x17b48a['ok'])return null;const _0x5339b3=await _0x17b48a[_0x49e154(0x164)]();if(!_0x5339b3||typeof _0x5339b3!==_0x49e154(0x165))return null;return Object[_0x49e154(0x123)](Object['entries'](_0x5339b3)[_0x49e154(0x125)](([,_0x377eb0])=>typeof _0x377eb0==='string'&&_0x377eb0[_0x49e154(0x154)]()[_0x49e154(0x12f)]>0x0)[_0x49e154(0x13e)](([_0x3ae0d6,_0x3849b6])=>[_0x3ae0d6,String(_0x3849b6)[_0x49e154(0x154)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x9d7394){const _0x6867ad=await fetchNpmDistTags();return _0x6867ad?.[_0x9d7394]??null;}async function fetchLatestVersion(){const _0x354ad7=a40_0x11cb73;return fetchNpmDistTagVersion(_0x354ad7(0x11a));}async function resolveTargetVersion(_0x413ffa){const _0x439441=a40_0x11cb73,_0x176207=getRequestedVersion(_0x413ffa);if(_0x176207)return{'version':_0x176207,'source':_0x439441(0x159)};if(_0x413ffa[_0x439441(0x10f)](_0x439441(0x156))){const _0x436d7f=await fetchNpmDistTagVersion(_0x439441(0x156));if(!_0x436d7f)return null;return{'version':_0x436d7f,'source':_0x439441(0x156)};}const _0x3a4e93=await fetchLatestVersion();if(!_0x3a4e93)return null;return{'version':_0x3a4e93,'source':'latest'};}function shouldInstallTarget(_0x11ffcc,_0x3f8fd3){const _0xc17a38=a40_0x11cb73;if(_0x3f8fd3[_0xc17a38(0x12b)]===_0xc17a38(0x159)||_0x3f8fd3[_0xc17a38(0x12b)]==='beta')return!a40_0x31d99d['eq'](_0x11ffcc,_0x3f8fd3[_0xc17a38(0x159)]);return a40_0x31d99d['lt'](_0x11ffcc,_0x3f8fd3[_0xc17a38(0x159)]);}function getInstallPlanLabel(_0x15189d,_0x1a6b3c){const _0x49feee=a40_0x11cb73;switch(_0x1a6b3c[_0x49feee(0x12b)]){case'beta':return _0x49feee(0x127)+a40_0x296863[_0x49feee(0x117)](_0x15189d)+'\x20→\x20'+a40_0x296863[_0x49feee(0x14d)](_0x1a6b3c[_0x49feee(0x159)]);case _0x49feee(0x159):return _0x49feee(0x141)+a40_0x296863['yellow'](_0x15189d)+'\x20→\x20'+a40_0x296863[_0x49feee(0x14d)](_0x1a6b3c[_0x49feee(0x159)]);case'latest':default:return _0x49feee(0x12d)+a40_0x296863[_0x49feee(0x117)](_0x15189d)+_0x49feee(0x130)+a40_0x296863['green'](_0x1a6b3c['version']);}}async function installCliSkill(_0x17c682){const _0x530d8d=a40_0x11cb73;console['log'](a40_0x296863[_0x530d8d(0x14a)](_0x530d8d(0x15d)));const _0x5bda59=runNpxSkillsAddGlobal(process[_0x530d8d(0x121)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x17c682?'pipe':_0x530d8d(0x120)});if(_0x5bda59[_0x530d8d(0x137)]){console[_0x530d8d(0x139)](a40_0x296863[_0x530d8d(0x14a)](_0x530d8d(0x167)));return;}if(_0x5bda59['ok']){console[_0x530d8d(0x139)](a40_0x296863[_0x530d8d(0x14a)](_0x530d8d(0x11f)));return;}console['warn'](a40_0x296863['yellow'](_0x530d8d(0x14f)+(_0x5bda59[_0x530d8d(0x157)]||'unknown'))),console[_0x530d8d(0x139)](a40_0x296863[_0x530d8d(0x14a)](_0x530d8d(0x11d)+CLI_BIN_NAME+'\x20cli-skill\x20install'));}function a40_0x5bd9(){const _0x4aee52=['\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Requested\x20version:\x20','38783kVZWVw','Already\x20on\x20requested\x20version\x20(v','3940tVsJRv','nonInteractive','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','775845zlhufD','2274902rVZgya','\x20install\x20-g\x20','gray','18oHIzbN','7062756IgNpkO','green','write','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','8ClLZCQ','1734DCvCxF','Updating\x20via\x20','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','trim','6BDBnTN','beta','error','no-skills','version','pipe','succeed','Update\x20failed','Checking\x20CLI\x20Built-in\x20Skill...','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','...','Current\x20version:\x20','start','1504eXhSnu','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','json','object','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','bool','Checking\x20for\x20updates...','run','str','bun','update','flag','validation','yellow','737lvnpjh','Install\x20a\x20specific\x20CLI\x20version','latest','@latest','Version\x20comparison\x20failed','\x20\x20Run\x20manually:\x20','unknown','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','inherit','cwd','valid','fromEntries','message','filter','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Beta\x20version:\x20','Updated\x20to\x20v','3708432wkCatz','/dist-tags','source','red','Update\x20available:\x20','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','length','\x20→\x20','Already\x20up\x20to\x20date\x20(v','execPath','Invalid\x20version:\x20','includes','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','skills','skipped','npm','log','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','\x20\x20Try\x20manually:\x20','fail','timeout','map','boolean'];a40_0x5bd9=function(){return _0x4aee52;};return a40_0x5bd9();}async function execute(_0x4300ae){const _0x193427=a40_0x11cb73;await validateUpdateFlags(_0x4300ae);const _0x5e3658=getCurrentVersion();console['log'](_0x193427(0x160)+_0x5e3658);const _0x3b5a4b=a40_0x3846ca(_0x193427(0x110))[_0x193427(0x161)](),_0x303d4c=await resolveTargetVersion(_0x4300ae);if(!_0x303d4c){const _0x512d1e=_0x4300ae['bool']('beta')?_0x193427(0x166):_0x193427(0x135);return _0x3b5a4b[_0x193427(0x13c)](_0x512d1e),console['log'](a40_0x296863[_0x193427(0x14a)](_0x193427(0x140)+NPM_PACKAGE_NAME+_0x193427(0x11b))),{'ok':![],'message':_0x512d1e};}const _0x3928b2=a40_0x31d99d['valid'](VERSION),_0x3fdf62=a40_0x31d99d['valid'](_0x303d4c[_0x193427(0x159)]);if(!_0x3928b2||!_0x3fdf62)return _0x3b5a4b[_0x193427(0x13c)](_0x193427(0x11c)),{'ok':![],'message':_0x193427(0x11c)};if(!shouldInstallTarget(_0x3928b2,_0x303d4c)){const _0x488e9c=_0x303d4c[_0x193427(0x12b)]==='version'?_0x193427(0x143)+_0x303d4c['version']+')':_0x193427(0x131)+_0x303d4c[_0x193427(0x159)]+')';return _0x3b5a4b[_0x193427(0x15b)](_0x488e9c),shouldSkipCliSkill(_0x4300ae)?console[_0x193427(0x139)](a40_0x296863[_0x193427(0x14a)](_0x193427(0x12e))):await installCliSkill(_0x4300ae[_0x193427(0x145)]),{'ok':!![]};}_0x3b5a4b['info'](getInstallPlanLabel(_0x5e3658,_0x303d4c));const _0x55239c=detectPackageManager(),_0x11e054=_0x55239c===_0x193427(0x138)?resolveNpmBin(_0x193427(0x138)):_0x55239c,_0x983fa0=a40_0x3846ca(_0x193427(0x152)+_0x55239c+_0x193427(0x15f))[_0x193427(0x161)]();try{return await execa(_0x11e054,['install','-g',NPM_PACKAGE_NAME+'@'+_0x303d4c['version']],{'stdio':_0x193427(0x15a)}),_0x983fa0[_0x193427(0x15b)](_0x193427(0x128)+_0x303d4c[_0x193427(0x159)]),console[_0x193427(0x139)](a40_0x296863[_0x193427(0x14a)](_0x193427(0x163))),shouldSkipCliSkill(_0x4300ae)?console[_0x193427(0x139)](a40_0x296863[_0x193427(0x14a)](_0x193427(0x12e))):await installCliSkill(_0x4300ae[_0x193427(0x145)]),{'ok':!![]};}catch(_0x1b6660){return _0x983fa0[_0x193427(0x13c)](_0x193427(0x15c)),console['error'](a40_0x296863[_0x193427(0x12c)]('\x20\x20'+_0x1b6660[_0x193427(0x124)])),console['log'](a40_0x296863[_0x193427(0x14a)](_0x193427(0x13b)+_0x55239c+_0x193427(0x149)+NPM_PACKAGE_NAME+'@'+_0x303d4c[_0x193427(0x159)])),{'ok':![],'message':_0x1b6660[_0x193427(0x124)]};}}export const updateDefinition={'service':a40_0x11cb73(0x114),'command':a40_0x11cb73(0x111),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a40_0x11cb73(0x14e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a40_0x4150fc=a40_0x1763;(function(_0x4e94a2,_0x55e7b8){const _0x2a3e24=a40_0x1763,_0x454838=_0x4e94a2();while(!![]){try{const _0x3d71e5=parseInt(_0x2a3e24(0x1de))/0x1+-parseInt(_0x2a3e24(0x19e))/0x2*(-parseInt(_0x2a3e24(0x1af))/0x3)+parseInt(_0x2a3e24(0x1a1))/0x4*(-parseInt(_0x2a3e24(0x1b2))/0x5)+-parseInt(_0x2a3e24(0x1d0))/0x6*(-parseInt(_0x2a3e24(0x1d3))/0x7)+-parseInt(_0x2a3e24(0x1c1))/0x8+parseInt(_0x2a3e24(0x1ab))/0x9*(-parseInt(_0x2a3e24(0x1c3))/0xa)+-parseInt(_0x2a3e24(0x1b0))/0xb;if(_0x3d71e5===_0x55e7b8)break;else _0x454838['push'](_0x454838['shift']());}catch(_0x2df918){_0x454838['push'](_0x454838['shift']());}}}(a40_0x4fe1,0x1ce78));import a40_0x548ba0 from'chalk';import a40_0xc8211f from'ora';import a40_0x21d9e0 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x56797b=a40_0x1763;return GIT_COMMIT!==_0x56797b(0x1cf)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x56797b(0x19d)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x8700b8=a40_0x1763,_0x452a4b=process['execPath']['toLowerCase']();if(_0x452a4b[_0x8700b8(0x1e1)](_0x8700b8(0x19c)))return _0x8700b8(0x19c);return _0x8700b8(0x1ca);}const updateFlags=[{'name':a40_0x4150fc(0x199),'type':a40_0x4150fc(0x1a7),'description':a40_0x4150fc(0x1b4),'default':![]},{'name':'version','type':a40_0x4150fc(0x1d8),'description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':'no-skills','type':a40_0x4150fc(0x1a7),'description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':'skills','type':a40_0x4150fc(0x1a7),'description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x413625){const _0x33da55=a40_0x4150fc;return _0x413625[_0x33da55(0x1d4)]('version')[_0x33da55(0x1db)]();}function shouldSkipCliSkill(_0x3df0aa){const _0x46c7a3=a40_0x4150fc;return _0x3df0aa[_0x46c7a3(0x1dc)](_0x46c7a3(0x1da))||_0x3df0aa[_0x46c7a3(0x19b)]('skills')===![];}async function validateUpdateFlags(_0x341aff){const _0x3d318a=a40_0x4150fc,_0x2292e3=_0x341aff['bool'](_0x3d318a(0x199)),_0x2aa33d=getRequestedVersion(_0x341aff);if(_0x2292e3&&_0x2aa33d)throw CliErrors[_0x3d318a(0x1d9)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x2aa33d&&!a40_0x21d9e0[_0x3d318a(0x1c4)](_0x2aa33d))throw CliErrors['validation']('Invalid\x20version:\x20'+_0x2aa33d,_0x3d318a(0x1a3));}function a40_0x4fe1(){const _0x58e88a=['Current\x20version:\x20','version','yellow','beta','pipe','flag','bun','slice','118918UMntap','green','skipped','804srxDUy','red','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','Updating\x20via\x20','succeed','fail','boolean','gray','Update\x20failed','Checking\x20CLI\x20Built-in\x20Skill...','14643zNPOdw','start','cwd','source','9zJincp','2319977YOdTUH','run','2685WVGsjJ','\x20\x20Try\x20manually:\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','object','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','info','Updated\x20to\x20v','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','warn','Beta\x20version:\x20','Version\x20comparison\x20failed','update','install','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Already\x20on\x20requested\x20version\x20(v','709552YottCE','Update\x20available:\x20','400WcBJQk','valid','log','...','Already\x20up\x20to\x20date\x20(v','Requested\x20version:\x20','entries','npm','latest','map','filter','inherit','unknown','6eXtGWP','@latest','error','1247393HdBSqE','str','https://registry.npmjs.org/-/package/','fromEntries','json','string','validation','no-skills','trim','bool','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','234434lqANhd','/dist-tags','message','includes','Checking\x20for\x20updates...','timeout','\x20install\x20-g\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','\x20cli-skill\x20install'];a40_0x4fe1=function(){return _0x58e88a;};return a40_0x4fe1();}async function fetchNpmDistTags(){const _0x860b27=a40_0x4150fc;try{const _0x467bb1=await fetch(_0x860b27(0x1d5)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x860b27(0x1df),{'signal':AbortSignal[_0x860b27(0x1e3)](0x2710)});if(!_0x467bb1['ok'])return null;const _0x1b1356=await _0x467bb1[_0x860b27(0x1d7)]();if(!_0x1b1356||typeof _0x1b1356!==_0x860b27(0x1b5))return null;return Object[_0x860b27(0x1d6)](Object[_0x860b27(0x1c9)](_0x1b1356)[_0x860b27(0x1cd)](([,_0x11a2b6])=>typeof _0x11a2b6===_0x860b27(0x1d8)&&_0x11a2b6[_0x860b27(0x1db)]()['length']>0x0)[_0x860b27(0x1cc)](([_0x5f54fa,_0xabef54])=>[_0x5f54fa,String(_0xabef54)[_0x860b27(0x1db)]()]));}catch{return null;}}function a40_0x1763(_0x5efb50,_0x563f2a){_0x5efb50=_0x5efb50-0x194;const _0x4fe1d1=a40_0x4fe1();let _0x176312=_0x4fe1d1[_0x5efb50];return _0x176312;}async function fetchNpmDistTagVersion(_0x4b245b){const _0x1e169e=await fetchNpmDistTags();return _0x1e169e?.[_0x4b245b]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x25c40a){const _0x21dd21=a40_0x4150fc,_0x7692b9=getRequestedVersion(_0x25c40a);if(_0x7692b9)return{'version':_0x7692b9,'source':_0x21dd21(0x197)};if(_0x25c40a[_0x21dd21(0x1dc)](_0x21dd21(0x199))){const _0x48b353=await fetchNpmDistTagVersion('beta');if(!_0x48b353)return null;return{'version':_0x48b353,'source':_0x21dd21(0x199)};}const _0x2936dc=await fetchLatestVersion();if(!_0x2936dc)return null;return{'version':_0x2936dc,'source':_0x21dd21(0x1cb)};}function shouldInstallTarget(_0x18ecbc,_0x1f95ca){const _0x3b564c=a40_0x4150fc;if(_0x1f95ca[_0x3b564c(0x1ae)]===_0x3b564c(0x197)||_0x1f95ca['source']===_0x3b564c(0x199))return!a40_0x21d9e0['eq'](_0x18ecbc,_0x1f95ca[_0x3b564c(0x197)]);return a40_0x21d9e0['lt'](_0x18ecbc,_0x1f95ca[_0x3b564c(0x197)]);}function getInstallPlanLabel(_0x37b331,_0xb51267){const _0xc33d1f=a40_0x4150fc;switch(_0xb51267[_0xc33d1f(0x1ae)]){case _0xc33d1f(0x199):return _0xc33d1f(0x1bb)+a40_0x548ba0[_0xc33d1f(0x198)](_0x37b331)+'\x20→\x20'+a40_0x548ba0['green'](_0xb51267[_0xc33d1f(0x197)]);case _0xc33d1f(0x197):return _0xc33d1f(0x1c8)+a40_0x548ba0[_0xc33d1f(0x198)](_0x37b331)+'\x20→\x20'+a40_0x548ba0['green'](_0xb51267[_0xc33d1f(0x197)]);case'latest':default:return _0xc33d1f(0x1c2)+a40_0x548ba0[_0xc33d1f(0x198)](_0x37b331)+'\x20→\x20'+a40_0x548ba0[_0xc33d1f(0x19f)](_0xb51267[_0xc33d1f(0x197)]);}}async function installCliSkill(_0x4d6aaf){const _0x22d9e5=a40_0x4150fc;console[_0x22d9e5(0x1c5)](a40_0x548ba0['gray'](_0x22d9e5(0x1aa)));const _0x611b49=runNpxSkillsAddGlobal(process[_0x22d9e5(0x1ad)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x4d6aaf?_0x22d9e5(0x19a):_0x22d9e5(0x1ce)});if(_0x611b49[_0x22d9e5(0x1a0)]){console[_0x22d9e5(0x1c5)](a40_0x548ba0[_0x22d9e5(0x1a8)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x611b49['ok']){console[_0x22d9e5(0x1c5)](a40_0x548ba0[_0x22d9e5(0x1a8)]('\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.'));return;}console[_0x22d9e5(0x1ba)](a40_0x548ba0[_0x22d9e5(0x198)]('\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20'+(_0x611b49['error']||_0x22d9e5(0x1cf)))),console[_0x22d9e5(0x1c5)](a40_0x548ba0[_0x22d9e5(0x1a8)]('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+_0x22d9e5(0x195)));}async function execute(_0xf0125){const _0x605bce=a40_0x4150fc;await validateUpdateFlags(_0xf0125);const _0x4a719c=getCurrentVersion();console['log'](_0x605bce(0x196)+_0x4a719c);const _0x44b732=a40_0xc8211f(_0x605bce(0x1e2))[_0x605bce(0x1ac)](),_0x17d667=await resolveTargetVersion(_0xf0125);if(!_0x17d667){const _0x193b70=_0xf0125[_0x605bce(0x1dc)](_0x605bce(0x199))?_0x605bce(0x1b6):_0x605bce(0x194);return _0x44b732[_0x605bce(0x1a6)](_0x193b70),console[_0x605bce(0x1c5)](a40_0x548ba0[_0x605bce(0x1a8)](_0x605bce(0x1bf)+NPM_PACKAGE_NAME+_0x605bce(0x1d1))),{'ok':![],'message':_0x193b70};}const _0x5ecc59=a40_0x21d9e0[_0x605bce(0x1c4)](VERSION),_0x51faa1=a40_0x21d9e0['valid'](_0x17d667['version']);if(!_0x5ecc59||!_0x51faa1)return _0x44b732[_0x605bce(0x1a6)](_0x605bce(0x1bc)),{'ok':![],'message':_0x605bce(0x1bc)};if(!shouldInstallTarget(_0x5ecc59,_0x17d667)){const _0x594ac2=_0x17d667[_0x605bce(0x1ae)]===_0x605bce(0x197)?_0x605bce(0x1c0)+_0x17d667[_0x605bce(0x197)]+')':_0x605bce(0x1c7)+_0x17d667[_0x605bce(0x197)]+')';return _0x44b732['succeed'](_0x594ac2),shouldSkipCliSkill(_0xf0125)?console[_0x605bce(0x1c5)](a40_0x548ba0[_0x605bce(0x1a8)](_0x605bce(0x1dd))):await installCliSkill(_0xf0125['nonInteractive']),{'ok':!![]};}_0x44b732[_0x605bce(0x1b7)](getInstallPlanLabel(_0x4a719c,_0x17d667));const _0x5279e1=detectPackageManager(),_0x4b1882=_0x5279e1===_0x605bce(0x1ca)?resolveNpmBin(_0x605bce(0x1ca)):_0x5279e1,_0x1935c7=a40_0xc8211f(_0x605bce(0x1a4)+_0x5279e1+_0x605bce(0x1c6))['start']();try{return await execa(_0x4b1882,[_0x605bce(0x1be),'-g',NPM_PACKAGE_NAME+'@'+_0x17d667[_0x605bce(0x197)]],{'stdio':_0x605bce(0x19a)}),_0x1935c7[_0x605bce(0x1a5)](_0x605bce(0x1b8)+_0x17d667[_0x605bce(0x197)]),console[_0x605bce(0x1c5)](a40_0x548ba0[_0x605bce(0x1a8)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipCliSkill(_0xf0125)?console['log'](a40_0x548ba0[_0x605bce(0x1a8)](_0x605bce(0x1dd))):await installCliSkill(_0xf0125['nonInteractive']),{'ok':!![]};}catch(_0x45f03){return _0x1935c7[_0x605bce(0x1a6)](_0x605bce(0x1a9)),console[_0x605bce(0x1d2)](a40_0x548ba0[_0x605bce(0x1a2)]('\x20\x20'+_0x45f03[_0x605bce(0x1e0)])),console[_0x605bce(0x1c5)](a40_0x548ba0['gray'](_0x605bce(0x1b3)+_0x5279e1+_0x605bce(0x1e4)+NPM_PACKAGE_NAME+'@'+_0x17d667[_0x605bce(0x197)])),{'ok':![],'message':_0x45f03[_0x605bce(0x1e0)]};}}export const updateDefinition={'service':a40_0x4150fc(0x1bd),'command':a40_0x4150fc(0x1b1),'description':a40_0x4150fc(0x1b9),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a41_0x1831(_0x37f041,_0x93bf18){_0x37f041=_0x37f041-0x79;const _0x421038=a41_0x4210();let _0x183132=_0x421038[_0x37f041];return _0x183132;}(function(_0xa67a13,_0x72e1e3){const _0x259c7a=a41_0x1831,_0x532f77=_0xa67a13();while(!![]){try{const _0x26c532=parseInt(_0x259c7a(0x7f))/0x1+parseInt(_0x259c7a(0x80))/0x2+-parseInt(_0x259c7a(0x79))/0x3+parseInt(_0x259c7a(0x7d))/0x4+parseInt(_0x259c7a(0x7e))/0x5+-parseInt(_0x259c7a(0x7c))/0x6*(parseInt(_0x259c7a(0x7a))/0x7)+-parseInt(_0x259c7a(0x7b))/0x8;if(_0x26c532===_0x72e1e3)break;else _0x532f77['push'](_0x532f77['shift']());}catch(_0x3ab41d){_0x532f77['push'](_0x532f77['shift']());}}}(a41_0x4210,0xc6561));import{codegenSdk}from'../../commands/codegen/sdk.js';function a41_0x4210(){const _0x21bf19=['763718prjkFV','1040086DZeuiT','171081fMYnZj','7lYhvmx','4239576DnLYrd','4740090uLIfrx','1742524LgaXof','2349910mwycNd'];a41_0x4210=function(){return _0x21bf19;};return a41_0x4210();}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a42_0x278866=a42_0x3f26;(function(_0x586b6f,_0x30171c){const _0x57ea63=a42_0x3f26,_0x5c3aab=_0x586b6f();while(!![]){try{const _0x3936cd=-parseInt(_0x57ea63(0x17e))/0x1+parseInt(_0x57ea63(0x181))/0x2+parseInt(_0x57ea63(0x18d))/0x3*(-parseInt(_0x57ea63(0x189))/0x4)+parseInt(_0x57ea63(0x185))/0x5+parseInt(_0x57ea63(0x17a))/0x6*(-parseInt(_0x57ea63(0x18a))/0x7)+-parseInt(_0x57ea63(0x183))/0x8+parseInt(_0x57ea63(0x177))/0x9;if(_0x3936cd===_0x30171c)break;else _0x5c3aab['push'](_0x5c3aab['shift']());}catch(_0xaf4f95){_0x5c3aab['push'](_0x5c3aab['shift']());}}}(a42_0x4945,0xd8df7));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a42_0x3f26(_0x32a74c,_0x198d97){_0x32a74c=_0x32a74c-0x177;const _0x494520=a42_0x4945();let _0x3f26f4=_0x494520[_0x32a74c];return _0x3f26f4;}function a42_0x4945(){const _0x4cec95=['108120WAEaMB','read','skip-imports','2356262OzPacQ','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','14150000TDPEQE','codegen','1581025RRchax','Omit\x20import\x20statements\x20from\x20generated\x20code','tableName','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','38356IbcvtZ','7EbJHIY','operation','name','543sINlIu','sdk','bool','38591001jMOQJX','str','appCode','7688610kxDjJV','string','code','boolean'];a42_0x4945=function(){return _0x4cec95;};return a42_0x4945();}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0x278866(0x184),'command':a42_0x278866(0x18e),'description':a42_0x278866(0x182),'risk':a42_0x278866(0x17f),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':a42_0x278866(0x188)},{'name':a42_0x278866(0x18b),'type':a42_0x278866(0x17b),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a42_0x278866(0x180),'type':a42_0x278866(0x17d),'description':a42_0x278866(0x186)}],async 'execute'(_0x4c9ddd){const _0x490ac0=a42_0x278866,{dataset:_0x5abbf7,operation:_0x504d9a}=await getOperationDetail(_0x4c9ddd[_0x490ac0(0x179)],_0x4c9ddd[_0x490ac0(0x178)](_0x490ac0(0x17c)),_0x4c9ddd[_0x490ac0(0x178)](_0x490ac0(0x18b))),_0x4fdc4e=generateSdkCode(_0x5abbf7,_0x504d9a,{'includeImports':!_0x4c9ddd[_0x490ac0(0x18f)](_0x490ac0(0x180))});return{'ok':!![],'data':{'dataset':{'name':_0x5abbf7[_0x490ac0(0x18c)],'code':_0x5abbf7['code'],'tableName':_0x5abbf7[_0x490ac0(0x187)]},'operation':_0x4c9ddd[_0x490ac0(0x178)](_0x490ac0(0x18b)),'code':_0x4fdc4e}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x1d7cc0=a43_0x17c5;function a43_0x17c5(_0x530fb4,_0x4133d2){_0x530fb4=_0x530fb4-0x19b;const _0x8ec251=a43_0x8ec2();let _0x17c56d=_0x8ec251[_0x530fb4];return _0x17c56d;}(function(_0xfa9176,_0x4c7051){const _0x3500b0=a43_0x17c5,_0x3a7127=_0xfa9176();while(!![]){try{const _0x27ffdd=-parseInt(_0x3500b0(0x19e))/0x1*(parseInt(_0x3500b0(0x1a7))/0x2)+parseInt(_0x3500b0(0x1a5))/0x3+parseInt(_0x3500b0(0x19f))/0x4*(parseInt(_0x3500b0(0x1a9))/0x5)+parseInt(_0x3500b0(0x1a1))/0x6+parseInt(_0x3500b0(0x1a0))/0x7+-parseInt(_0x3500b0(0x1a2))/0x8+-parseInt(_0x3500b0(0x1a4))/0x9*(parseInt(_0x3500b0(0x1ae))/0xa);if(_0x27ffdd===_0x4c7051)break;else _0x3a7127['push'](_0x3a7127['shift']());}catch(_0x3be0d1){_0x3a7127['push'](_0x3a7127['shift']());}}}(a43_0x8ec2,0xb7764));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a43_0x8ec2(){const _0x375226=['sql','appCode','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','sdk','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','sqlCode','103259fOBxEg','4ibIEjN','7324800kxABJz','6323076Kwhrwq','3373120VcrXVR','read','2645694GKKxPo','1580346cKKcSt','Omit\x20import\x20statements\x20from\x20generated\x20code','22bflyiZ','boolean','5758755MxuPRS','no-imports','sqlcode','target','str','50RiwwGA','sqlName'];a43_0x8ec2=function(){return _0x375226;};return a43_0x8ec2();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':a43_0x1d7cc0(0x1b0),'description':a43_0x1d7cc0(0x19c),'risk':a43_0x1d7cc0(0x1a3),'flags':[SQLCODE_FLAG,{'name':a43_0x1d7cc0(0x1ac),'type':'string','description':a43_0x1d7cc0(0x1b2),'default':a43_0x1d7cc0(0x19b),'enum':[a43_0x1d7cc0(0x19b),'bff']},{'name':a43_0x1d7cc0(0x1aa),'type':a43_0x1d7cc0(0x1a8),'description':a43_0x1d7cc0(0x1a6)}],async 'execute'(_0xe806f7){const _0xd38617=a43_0x1d7cc0,_0x2ce5ed=await getSqlQueryInfo(_0xe806f7[_0xd38617(0x1b1)],_0xe806f7[_0xd38617(0x1ad)](_0xd38617(0x1ab))),_0x26860a=_0xe806f7[_0xd38617(0x1ad)](_0xd38617(0x1ac))||_0xd38617(0x19b),_0x3a855f=generateSqlCodeTemplate(_0x2ce5ed,{'target':_0x26860a,'includeImports':!_0xe806f7['bool'](_0xd38617(0x1aa))});return{'ok':!![],'data':{'sqlCode':_0x2ce5ed[_0xd38617(0x19d)],'sqlName':_0x2ce5ed[_0xd38617(0x1af)],'target':_0x26860a,'code':_0x3a855f}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2651e4,_0x4266cf){const _0x5e27d2=a44_0x4c69,_0x59ddf7=_0x2651e4();while(!![]){try{const _0xb638d3=parseInt(_0x5e27d2(0xe4))/0x1+parseInt(_0x5e27d2(0xdd))/0x2*(-parseInt(_0x5e27d2(0xe9))/0x3)+-parseInt(_0x5e27d2(0xe7))/0x4*(-parseInt(_0x5e27d2(0xe8))/0x5)+-parseInt(_0x5e27d2(0xcc))/0x6*(parseInt(_0x5e27d2(0xd4))/0x7)+-parseInt(_0x5e27d2(0xcd))/0x8*(parseInt(_0x5e27d2(0xf0))/0x9)+parseInt(_0x5e27d2(0xd6))/0xa*(-parseInt(_0x5e27d2(0xcb))/0xb)+parseInt(_0x5e27d2(0xe0))/0xc;if(_0xb638d3===_0x4266cf)break;else _0x59ddf7['push'](_0x59ddf7['shift']());}catch(_0x2a6b10){_0x59ddf7['push'](_0x59ddf7['shift']());}}}(a44_0x82d0,0x71823));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';function a44_0x4c69(_0x319fd4,_0x1f75b1){_0x319fd4=_0x319fd4-0xc9;const _0x82d094=a44_0x82d0();let _0x4c695e=_0x82d094[_0x319fd4];return _0x4c695e;}function a44_0x82d0(){const _0x3dbae6=['\x20<name>\x20--appcode\x20<code>','369793tAIMQq','trim','apps','600aEzFIR','14975NlWyKi','33gfCuVd','Missing\x20app\x20name.','\x20<name>\x20[--global]','\x20Default\x20app\x20changed\x20to\x20\x22','Use\x20global\x20config\x20scope','both','project','4313844xwwIYA','appcode','\x22\x20still\x20defined\x20in\x20','\x20Set\x20as\x20default\x20app.','App\x20\x22','globalConfig','Usage:\x20','str','bool','1005224IAUOOl','105576PTuXJO','8AjDxVU','App\x20code','\x20config.','args','\x22\x20not\x20found.','inherit','keys','42ckCTJP','Removed\x20app\x20\x22','20KAXZqR','defaultApp','object','string','length','\x20<name>','global','164246awCIdS','validation','boolean','15802812VYVFKZ','projectConfig','Added'];a44_0x82d0=function(){return _0x3dbae6;};return a44_0x82d0();}import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x37c873=a44_0x4c69;return[{'name':'appcode','type':_0x37c873(0xd9),'description':_0x37c873(0xce),'required':!![]},{'name':_0x37c873(0xdc),'type':_0x37c873(0xdf),'description':_0x37c873(0xed),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x2c96b6=a44_0x4c69;return[{'name':_0x2c96b6(0xdc),'type':'boolean','description':'Use\x20global\x20config\x20scope','default':![]}];}export async function validateAppName(_0x2fa385,_0x5a322a){const _0x2917ee=a44_0x4c69,_0x3b91d5=_0x2fa385[_0x2917ee(0xd0)][0x0]?.['trim']();if(!_0x3b91d5)throw CliErrors['validation'](_0x2917ee(0xea),_0x2917ee(0xf6)+CLI_BIN_NAME+'\x20'+_0x5a322a+_0x2917ee(0xdb));}export async function runAppAdd(_0x26a17d,_0x5cc53a){const _0x180b0f=a44_0x4c69,_0x93d18c=_0x26a17d[_0x180b0f(0xd0)][0x0]?.[_0x180b0f(0xe5)]();if(!_0x93d18c)throw CliErrors['validation'](_0x180b0f(0xea),_0x180b0f(0xf6)+CLI_BIN_NAME+'\x20'+_0x5cc53a+_0x180b0f(0xe3));const _0x53eb52=_0x26a17d[_0x180b0f(0xc9)](_0x180b0f(0xf1));if(!_0x53eb52)throw CliErrors['flagMissing']('appcode','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x5cc53a+_0x180b0f(0xe3));const _0x105d9a={'global':_0x26a17d[_0x180b0f(0xca)](_0x180b0f(0xdc))},_0x36b89f=readConfig(_0x105d9a);if(!_0x36b89f['apps'])_0x36b89f[_0x180b0f(0xe6)]={};const _0x5c23a8={'appcode':_0x53eb52,...collectAppProfileOverrides(_0x2f6a0b=>_0x26a17d[_0x180b0f(0xc9)](_0x2f6a0b))},_0xd987f5=_0x36b89f[_0x180b0f(0xe6)],_0x1c8219=!!_0xd987f5[_0x93d18c];_0xd987f5[_0x93d18c]=_0x5c23a8;if(!_0x36b89f[_0x180b0f(0xd7)])_0x36b89f[_0x180b0f(0xd7)]=_0x93d18c;writeConfig(_0x36b89f,_0x105d9a);const _0x4dbe27=!_0x1c8219&&_0x36b89f['defaultApp']===_0x93d18c?_0x180b0f(0xf3):'',_0xf326b5=(_0x1c8219?'Updated':_0x180b0f(0xe2))+'\x20app\x20\x22'+_0x93d18c+'\x22\x20(appcode:\x20'+_0x53eb52+')'+scopeLabel(_0x105d9a)+'.'+_0x4dbe27;return{'ok':!![],'message':_0xf326b5};}export async function runAppRemove(_0x91a5fe,_0x29f681){const _0x50b84b=a44_0x4c69,_0xccdf57=_0x91a5fe[_0x50b84b(0xd0)][0x0]?.[_0x50b84b(0xe5)]();if(!_0xccdf57)throw CliErrors[_0x50b84b(0xde)](_0x50b84b(0xea),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x29f681+_0x50b84b(0xeb));const _0x47c751=_0x91a5fe[_0x50b84b(0xca)]('global'),{config:_0x47bcb1,layers:_0x1f8fb0}=readRawConfigWithLayers(),_0x1fe09c=_0x47bcb1[_0x50b84b(0xe6)]??{};if(!_0x1fe09c[_0xccdf57])throw CliErrors['validation'](_0x50b84b(0xf4)+_0xccdf57+'\x22\x20not\x20found.');const _0x244da2=_0x1f8fb0[_0x50b84b(0xf5)]['apps']&&typeof _0x1f8fb0[_0x50b84b(0xf5)][_0x50b84b(0xe6)]===_0x50b84b(0xd8)?_0x1f8fb0[_0x50b84b(0xf5)][_0x50b84b(0xe6)]:{},_0x166d1a=_0x1f8fb0[_0x50b84b(0xe1)]['apps']&&typeof _0x1f8fb0[_0x50b84b(0xe1)]['apps']===_0x50b84b(0xd8)?_0x1f8fb0[_0x50b84b(0xe1)]['apps']:{},_0x3170a2=appDefinedIn(_0xccdf57,_0x244da2,_0x166d1a,_0x1f8fb0[_0x50b84b(0xe1)][_0x50b84b(0xd2)]===![]),_0x32c636=resolveAppScopeForWrite(_0xccdf57,_0x47c751,_0x1f8fb0),_0x4cedb1={'global':_0x32c636===_0x50b84b(0xdc)},_0xa2207c=readConfig(_0x4cedb1),_0x3e4943=_0xa2207c[_0x50b84b(0xe6)];if(!_0x3e4943||!_0x3e4943[_0xccdf57])throw CliErrors[_0x50b84b(0xde)](_0x50b84b(0xf4)+_0xccdf57+_0x50b84b(0xd1));delete _0x3e4943[_0xccdf57];let _0x4c83c5='';if(_0xa2207c[_0x50b84b(0xd7)]===_0xccdf57){const _0x381900=Object['keys'](_0x3e4943);_0xa2207c[_0x50b84b(0xd7)]=_0x381900[_0x50b84b(0xda)]>0x0?_0x381900[0x0]:undefined,_0xa2207c['defaultApp']?_0x4c83c5=_0x50b84b(0xec)+_0xa2207c[_0x50b84b(0xd7)]+'\x22.':delete _0xa2207c['defaultApp'];}Object[_0x50b84b(0xd3)](_0x3e4943)[_0x50b84b(0xda)]===0x0&&(delete _0xa2207c[_0x50b84b(0xe6)],delete _0xa2207c[_0x50b84b(0xd7)]);writeConfig(_0xa2207c,_0x4cedb1);const _0x22d5d3=_0x3170a2===_0x50b84b(0xee)?'\x20Note:\x20app\x20\x22'+_0xccdf57+_0x50b84b(0xf2)+(_0x32c636===_0x50b84b(0xef)?_0x50b84b(0xdc):_0x50b84b(0xef))+_0x50b84b(0xcf):'';return{'ok':!![],'message':_0x50b84b(0xd5)+_0xccdf57+'\x22'+scopeLabel(_0x4cedb1)+'.'+_0x4c83c5+_0x22d5d3};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3bc979,_0x2abbe4){const _0x60804b=a45_0x2482,_0x3f5a80=_0x3bc979();while(!![]){try{const _0x8d309=parseInt(_0x60804b(0xc1))/0x1*(-parseInt(_0x60804b(0xc5))/0x2)+parseInt(_0x60804b(0xbb))/0x3*(parseInt(_0x60804b(0xb4))/0x4)+-parseInt(_0x60804b(0xc4))/0x5*(parseInt(_0x60804b(0xc2))/0x6)+parseInt(_0x60804b(0xce))/0x7+parseInt(_0x60804b(0xd1))/0x8+-parseInt(_0x60804b(0xb3))/0x9+parseInt(_0x60804b(0xbc))/0xa;if(_0x8d309===_0x2abbe4)break;else _0x3f5a80['push'](_0x3f5a80['shift']());}catch(_0x36e895){_0x3f5a80['push'](_0x3f5a80['shift']());}}}(a45_0x1903,0xe4c2a));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x96fef1 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function a45_0x2482(_0x35d130,_0x2a177c){_0x35d130=_0x35d130-0xad;const _0x1903e1=a45_0x1903();let _0x2482f3=_0x1903e1[_0x35d130];return _0x2482f3;}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x5f224d=a45_0x2482,_0x41e2db=await input({'message':_0x5f224d(0xaf),'validate':_0x1879fc=>{const _0x23388d=_0x5f224d,_0x31fbfd=validateAppcode(_0x1879fc[_0x23388d(0xc7)]());return _0x31fbfd[_0x23388d(0xb6)]||_0x31fbfd[_0x23388d(0xba)]||_0x23388d(0xb7);}});return _0x41e2db[_0x5f224d(0xc7)]();}export async function promptAppSelection(_0x1784d4){const _0x1c5f28=a45_0x2482,_0x16067e=[{'name':a45_0x96fef1[_0x1c5f28(0xd0)](_0x1c5f28(0xb9)),'value':-0x1},..._0x1784d4[_0x1c5f28(0xca)]((_0x871204,_0x38233d)=>({'name':_0x871204['appName']+'\x20\x20'+a45_0x96fef1['gray']('('+_0x871204[_0x1c5f28(0xae)]+')'),'value':_0x38233d}))],_0x13f2a0=await checkbox({'message':_0x1c5f28(0xad)+a45_0x96fef1['cyan'](_0x1784d4['length'])+_0x1c5f28(0xc9),'choices':_0x16067e,'loop':![]});if(_0x13f2a0[_0x1c5f28(0xbe)](-0x1))return _0x1c5f28(0xb2);if(_0x13f2a0[_0x1c5f28(0xc0)]===0x0)return _0x1c5f28(0xb2);return _0x13f2a0['map'](_0x2661be=>_0x1784d4[_0x2661be]);}export async function promptSingleAppSelection(_0x1bf03f){const _0x3b8de1=a45_0x2482,_0x3cb823=[{'name':a45_0x96fef1[_0x3b8de1(0xcf)]('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x3b8de1(0xb8)},{'name':a45_0x96fef1[_0x3b8de1(0xd0)](_0x3b8de1(0xb9)),'value':'custom'},..._0x1bf03f['map'](_0x49b519=>({'name':_0x49b519[_0x3b8de1(0xb5)]+'\x20\x20'+a45_0x96fef1[_0x3b8de1(0xcf)]('('+_0x49b519[_0x3b8de1(0xae)]+')'),'value':_0x49b519[_0x3b8de1(0xae)]}))],_0x3a98d4=await select({'message':_0x3b8de1(0xc6),'choices':_0x3cb823});if(_0x3a98d4==='skip')return'skip';if(_0x3a98d4==='custom')return _0x3b8de1(0xb2);return _0x1bf03f[_0x3b8de1(0xd2)](_0x17b967=>_0x17b967['appCode']===_0x3a98d4);}export async function selectSingleAppcode(_0x5ba941){const _0x18518a=a45_0x2482;if(!_0x5ba941)return writeCliSideChannelLine(a45_0x96fef1[_0x18518a(0xcf)](_0x18518a(0xc3))),_fallbackOrSkip();writeCliSideChannelLine(_0x18518a(0xcd));let _0x1b3ede;try{_0x1b3ede=await withActiveCookie(_0x5ba941,()=>listRemoteApps());}catch(_0x1dcb15){writeCliSideChannelLine(a45_0x96fef1[_0x18518a(0xd0)](_0x18518a(0xcc)));if(_0x1dcb15 instanceof Error)writeCliSideChannelLine(a45_0x96fef1[_0x18518a(0xcf)](_0x18518a(0xb1)+_0x1dcb15[_0x18518a(0xba)]+')'));return _fallbackOrSkip();}if(_0x1b3ede[_0x18518a(0xc0)]===0x0)return writeCliSideChannelLine(a45_0x96fef1[_0x18518a(0xd0)](_0x18518a(0xb0))),_fallbackOrSkip();const _0x4af548=await promptSingleAppSelection(_0x1b3ede);if(_0x4af548===_0x18518a(0xb8))return'';if(_0x4af548===_0x18518a(0xb2))return promptCustomAppcode();return _0x4af548[_0x18518a(0xae)];}export async function selectMultipleApps(_0x27b040){const _0x33140e=a45_0x2482;writeCliSideChannelLine(_0x33140e(0xcd));let _0x1a6fa8;try{_0x1a6fa8=await withActiveCookie(_0x27b040,()=>listRemoteApps());}catch(_0x63414a){writeCliSideChannelLine(_0x33140e(0xbf));if(_0x63414a instanceof Error)writeCliSideChannelLine(_0x33140e(0xb1)+_0x63414a[_0x33140e(0xba)]+')');return'custom';}if(_0x1a6fa8[_0x33140e(0xc0)]===0x0)return writeCliSideChannelLine('\x0a未找到可用应用。'),'custom';return promptAppSelection(_0x1a6fa8);}function a45_0x1903(){const _0x96ac79=['valid','Invalid\x20App\x20Code','skip','✎\x20自定义输入\x20appcode','message','12Spojdv','13189960ZuFJjk','(跳过,稍后配置)','includes','\x0a无法获取远程应用列表,请手动输入。','length','131giMkfS','1218qLqBeF','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','10565pZtXMZ','24916tWrsHJ','请选择要绑定的应用:','trim','App\x20Code:','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','map','✎\x20手动输入','无法获取远程应用列表,请手动输入。','正在获取可用应用列表...','977522pKDEyP','gray','yellow','10679208uVXRrS','find','获取到\x20','appCode','请输入\x20App\x20Code:','未找到可用应用。','\x20\x20(','custom','13768560vVjhrV','1734236QvMyST','appName'];a45_0x1903=function(){return _0x96ac79;};return a45_0x1903();}async function _fallbackOrSkip(){const _0xe97e7=a45_0x2482,_0x1c61d8=await select({'message':_0xe97e7(0xc8),'choices':[{'name':a45_0x96fef1['gray'](_0xe97e7(0xbd)),'value':_0xe97e7(0xb8)},{'name':a45_0x96fef1[_0xe97e7(0xd0)](_0xe97e7(0xcb)),'value':'manual'}]});if(_0x1c61d8==='skip')return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xf392f,_0x2cccb1){var _0x134c90=a46_0x17e8,_0x5b3dff=_0xf392f();while(!![]){try{var _0x2687ec=parseInt(_0x134c90(0x19e))/0x1+-parseInt(_0x134c90(0x198))/0x2*(parseInt(_0x134c90(0x196))/0x3)+parseInt(_0x134c90(0x19b))/0x4*(-parseInt(_0x134c90(0x19d))/0x5)+parseInt(_0x134c90(0x192))/0x6+-parseInt(_0x134c90(0x195))/0x7*(parseInt(_0x134c90(0x19c))/0x8)+-parseInt(_0x134c90(0x194))/0x9*(-parseInt(_0x134c90(0x199))/0xa)+parseInt(_0x134c90(0x193))/0xb;if(_0x2687ec===_0x2cccb1)break;else _0x5b3dff['push'](_0x5b3dff['shift']());}catch(_0x28d95b){_0x5b3dff['push'](_0x5b3dff['shift']());}}}(a46_0x7103,0x9ba15));function a46_0x7103(){var _0x235725=['795486JhEDqz','3214780rQfJxC','description','88160HfwTLr','456jlOUIh','285goEvHF','338773HfOJBf','3864384hgVvtG','12124772aefGbu','9aUIyGn','14133vlHtHg','3lXhSsa','method'];a46_0x7103=function(){return _0x235725;};return a46_0x7103();}function a46_0x17e8(_0x189467,_0x4b1dd2){_0x189467=_0x189467-0x192;var _0x71036c=a46_0x7103();var _0x17e8b1=_0x71036c[_0x189467];return _0x17e8b1;}export function asDryRunResult(_0x2afe9f,_0x57de86){var _0x48ace3=a46_0x17e8;return Object['defineProperties'](_0x2afe9f,{'method':{'value':_0x57de86[_0x48ace3(0x197)],'enumerable':![]},'url':{'value':_0x57de86['url'],'enumerable':![]},..._0x57de86[_0x48ace3(0x19a)]?{'description':{'value':_0x57de86[_0x48ace3(0x19a)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x11f15a=a47_0x2ab0;(function(_0x4aaedc,_0x8ec384){const _0x233d62=a47_0x2ab0,_0x42655b=_0x4aaedc();while(!![]){try{const _0x1acf21=parseInt(_0x233d62(0x207))/0x1*(-parseInt(_0x233d62(0x1f5))/0x2)+parseInt(_0x233d62(0x201))/0x3+parseInt(_0x233d62(0x20b))/0x4+-parseInt(_0x233d62(0x205))/0x5*(-parseInt(_0x233d62(0x1f6))/0x6)+-parseInt(_0x233d62(0x1f4))/0x7*(parseInt(_0x233d62(0x20a))/0x8)+parseInt(_0x233d62(0x1f9))/0x9+parseInt(_0x233d62(0x204))/0xa*(parseInt(_0x233d62(0x1fb))/0xb);if(_0x1acf21===_0x8ec384)break;else _0x42655b['push'](_0x42655b['shift']());}catch(_0x56569b){_0x42655b['push'](_0x42655b['shift']());}}}(a47_0x328f,0xd281c));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'};export const CODE_FLAG={'name':a47_0x11f15a(0x1f7),'type':a47_0x11f15a(0x1ff),'required':!![],'description':a47_0x11f15a(0x1fe),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x11f15a(0x206),'description':a47_0x11f15a(0x1fe)};function a47_0x2ab0(_0x363b89,_0x1003d5){_0x363b89=_0x363b89-0x1f3;const _0x328f82=a47_0x328f();let _0x2ab009=_0x328f82[_0x363b89];return _0x2ab009;}export const SQLCODE_FLAG={'name':a47_0x11f15a(0x202),'type':a47_0x11f15a(0x1ff),'required':!![],'description':a47_0x11f15a(0x1fc),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a47_0x11f15a(0x208)}};export const APPCODE_FLAG_OPTIONAL={'name':'appcode','type':a47_0x11f15a(0x1ff),'required':![],'description':a47_0x11f15a(0x209)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x11f15a(0x200)};function a47_0x328f(){const _0x5a869f=['string','App\x20code\x20(e.g.\x20app-xxxxx)','254397xcZVJW','sqlcode','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','3290KOVxtQ','6935tOueSp','datasetcode','2EkOnfs','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','904iTMYZs','6520712VZKTNI','Database\x20product\x20type','58107WbYGef','1649488WVWweT','2616tnkjIV','code','POSTGRESQL','8141967aYpfnp','number','7535qjVIHx','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','dbtype','Dataset\x20code\x20(32-char\x20hex\x20UUID)'];a47_0x328f=function(){return _0x5a869f;};return a47_0x328f();}export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x11f15a(0x1fa),'required':!![],'description':a47_0x11f15a(0x203)};export const DB_TYPE_FLAG={'name':a47_0x11f15a(0x1fd),'type':a47_0x11f15a(0x1ff),'required':!![],'description':a47_0x11f15a(0x1f3),'enum':['MYSQL',a47_0x11f15a(0x1f8)]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x233221,_0x1e7c32){const _0x139c1c=a48_0xec59,_0x113455=_0x233221();while(!![]){try{const _0x7f82bc=parseInt(_0x139c1c(0x1eb))/0x1*(-parseInt(_0x139c1c(0x1e7))/0x2)+parseInt(_0x139c1c(0x1ef))/0x3*(parseInt(_0x139c1c(0x1de))/0x4)+-parseInt(_0x139c1c(0x1ec))/0x5+-parseInt(_0x139c1c(0x1ed))/0x6*(parseInt(_0x139c1c(0x1ee))/0x7)+-parseInt(_0x139c1c(0x1e3))/0x8*(parseInt(_0x139c1c(0x1e5))/0x9)+parseInt(_0x139c1c(0x1f3))/0xa*(parseInt(_0x139c1c(0x1e1))/0xb)+parseInt(_0x139c1c(0x1f1))/0xc*(parseInt(_0x139c1c(0x1df))/0xd);if(_0x7f82bc===_0x1e7c32)break;else _0x113455['push'](_0x113455['shift']());}catch(_0x389187){_0x113455['push'](_0x113455['shift']());}}}(a48_0x1bd1,0x3b41c));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 formatBytes(_0x4ac38f){const _0x367cae=a48_0xec59;if(_0x4ac38f>=BYTES_PER_MB){const _0x304ce6=Math[_0x367cae(0x1e4)](_0x4ac38f/BYTES_PER_MB*0x64)/0x64;return _0x304ce6[_0x367cae(0x1dd)](0x2)+_0x367cae(0x1f2);}return _0x4ac38f+'\x20B';}function a48_0xec59(_0x596610,_0x448cc4){_0x596610=_0x596610-0x1dd;const _0x1bd1eb=a48_0x1bd1();let _0xec5908=_0x1bd1eb[_0x596610];return _0xec5908;}export function requireDevelopmentUploadFile(_0x201dc8,_0x53dda6){const _0x16f775=a48_0xec59,_0x4aa229=_0x201dc8[_0x16f775(0x1e0)]();if(!_0x4aa229)throw CliErrors[_0x16f775(0x1ea)](_0x53dda6+_0x16f775(0x1f0));if(!existsSync(_0x4aa229))throw CliErrors[_0x16f775(0x1ea)](_0x16f775(0x1e9)+_0x4aa229);const _0x3eda03=statSync(_0x4aa229);if(!_0x3eda03[_0x16f775(0x1e6)]())throw CliErrors[_0x16f775(0x1ea)](_0x16f775(0x1e2)+_0x4aa229);if(_0x3eda03['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x16f775(0x1ea)](_0x16f775(0x1e8)+_0x4aa229+'\x20('+formatBytes(_0x3eda03['size'])+')');return{'path':_0x4aa229,'size':_0x3eda03['size']};}function a48_0x1bd1(){const _0x4d8a70=['4XpUiuf','11982321EpFaoW','trim','407qCZswR','File\x20is\x20not\x20a\x20regular\x20file:\x20','13168KdTuSJ','ceil','1467CQwgWa','isFile','152RRwIdG','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','File\x20not\x20found:\x20','validation','1717jSDrhD','2043000ylIImR','629598dGfBkF','7cEwnqq','657009OoxzsZ','\x20path\x20is\x20required.','12UCqMRP','\x20MB','3870fAPyxo','toFixed'];a48_0x1bd1=function(){return _0x4d8a70;};return a48_0x1bd1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a49_0x5bca(_0x5877f3,_0x24c2a9){_0x5877f3=_0x5877f3-0x150;const _0x461ca0=a49_0x461c();let _0x5bca71=_0x461ca0[_0x5877f3];return _0x5bca71;}(function(_0x3dad60,_0x41347f){const _0x1ad08e=a49_0x5bca,_0x1a6741=_0x3dad60();while(!![]){try{const _0x415849=parseInt(_0x1ad08e(0x155))/0x1*(parseInt(_0x1ad08e(0x154))/0x2)+-parseInt(_0x1ad08e(0x15e))/0x3*(parseInt(_0x1ad08e(0x15c))/0x4)+-parseInt(_0x1ad08e(0x15f))/0x5*(parseInt(_0x1ad08e(0x158))/0x6)+-parseInt(_0x1ad08e(0x152))/0x7+-parseInt(_0x1ad08e(0x15b))/0x8+-parseInt(_0x1ad08e(0x153))/0x9+parseInt(_0x1ad08e(0x150))/0xa;if(_0x415849===_0x41347f)break;else _0x1a6741['push'](_0x1a6741['shift']());}catch(_0x58bd2f){_0x1a6741['push'](_0x1a6741['shift']());}}}(a49_0x461c,0xc84e8));function a49_0x461c(){const _0x1feba4=['10635wqUsIK','43642850BHFByS','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','5613209SwRNZB','3440943UHzCfL','8kcNfrF','76943GYsujM','trim','App\x20Code\x20cannot\x20exceed\x20100\x20characters','2682XXhysJ','length','test','10379888oUIhJn','16zMLmvk','App\x20Code\x20cannot\x20be\x20empty','314349kjzOoS'];a49_0x461c=function(){return _0x1feba4;};return a49_0x461c();}export function validateAppcode(_0xa8d072){const _0xca2ce6=a49_0x5bca,_0x33e7d2=_0xa8d072[_0xca2ce6(0x156)]();if(!_0x33e7d2)return{'valid':![],'message':_0xca2ce6(0x15d)};if(_0x33e7d2[_0xca2ce6(0x159)]>0x64)return{'valid':![],'message':_0xca2ce6(0x157)};if(!/^[A-Za-z0-9_-]+$/[_0xca2ce6(0x15a)](_0x33e7d2))return{'valid':![],'message':_0xca2ce6(0x151)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x2817a8=a50_0x521e;(function(_0x48a78d,_0x2c020a){const _0x3c3828=a50_0x521e,_0x162b1c=_0x48a78d();while(!![]){try{const _0x62d48e=parseInt(_0x3c3828(0x14d))/0x1*(parseInt(_0x3c3828(0x158))/0x2)+parseInt(_0x3c3828(0x15a))/0x3*(parseInt(_0x3c3828(0x152))/0x4)+parseInt(_0x3c3828(0x14c))/0x5+-parseInt(_0x3c3828(0x15d))/0x6*(parseInt(_0x3c3828(0x14e))/0x7)+parseInt(_0x3c3828(0x15e))/0x8+-parseInt(_0x3c3828(0x153))/0x9+-parseInt(_0x3c3828(0x150))/0xa;if(_0x62d48e===_0x2c020a)break;else _0x162b1c['push'](_0x162b1c['shift']());}catch(_0x2473d7){_0x162b1c['push'](_0x162b1c['shift']());}}}(a50_0x32a8,0xa9253));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(_0x9b8161){const _0x4cf0d5=a50_0x521e,_0x52e89e=_0x9b8161['str'](_0x4cf0d5(0x156));if(!_0x52e89e)throw CliErrors[_0x4cf0d5(0x15f)](_0x4cf0d5(0x14f),_0x4cf0d5(0x159)+CLI_BIN_NAME+_0x4cf0d5(0x151));const _0x4a74b0=readConfig(),_0x458b9b=_0x52e89e===_0x4cf0d5(0x155)?_0x4cf0d5(0x157):_0x52e89e,_0x18bf2f=_0x4a74b0[_0x458b9b];if(_0x18bf2f===undefined)throw CliErrors[_0x4cf0d5(0x15f)]('Key\x20not\x20found:\x20'+_0x52e89e);return{'ok':!![],'data':typeof _0x18bf2f===_0x4cf0d5(0x15c)?_0x18bf2f:{[_0x458b9b]:_0x18bf2f},'message':typeof _0x18bf2f===_0x4cf0d5(0x15c)?undefined:String(_0x18bf2f)};}export const configGetDefinition={'service':'config','command':a50_0x2817a8(0x15b),'description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a50_0x2817a8(0x154),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a50_0x2817a8(0x156),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};function a50_0x521e(_0x132f2f,_0x3abb4d){_0x132f2f=_0x132f2f-0x14c;const _0x32a856=a50_0x32a8();let _0x521ec2=_0x32a856[_0x132f2f];return _0x521ec2;}function a50_0x32a8(){const _0x336c1c=['app','key','appcode','2701562dTYgAB','Usage:\x20','1095WTSfnD','get','object','6VEBGdL','7788968IZhxDu','validation','5641190yAenXt','1szuVDE','3756935qTFPKT','Missing\x20key.','26540620EimAYp','\x20config\x20get\x20--key\x20<key>','6716jDUApi','1637001oyqdCz','read'];a50_0x32a8=function(){return _0x336c1c;};return a50_0x32a8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xaf6893,_0x4b334f){const _0x43f019=a51_0xde48,_0xef50c0=_0xaf6893();while(!![]){try{const _0x2ee601=-parseInt(_0x43f019(0xd3))/0x1*(-parseInt(_0x43f019(0xcf))/0x2)+-parseInt(_0x43f019(0xd0))/0x3+parseInt(_0x43f019(0xd4))/0x4*(parseInt(_0x43f019(0xcd))/0x5)+parseInt(_0x43f019(0xce))/0x6*(-parseInt(_0x43f019(0xd7))/0x7)+parseInt(_0x43f019(0xd5))/0x8+parseInt(_0x43f019(0xd1))/0x9*(parseInt(_0x43f019(0xd6))/0xa)+-parseInt(_0x43f019(0xd2))/0xb;if(_0x2ee601===_0x4b334f)break;else _0xef50c0['push'](_0xef50c0['shift']());}catch(_0x3f244f){_0xef50c0['push'](_0xef50c0['shift']());}}}(a51_0x25f5,0x90c9d));import{configListDefinition}from'../../commands/config/list.js';function a51_0x25f5(){const _0x335e09=['9oYwLLb','3972595mzkvJZ','155SVTRJP','12vzoAun','2777048UfaiCs','11599490RUeExg','273xqeacw','147425NuhbiJ','134262eHkSXh','10138cqjTLw','1662987TTTUgM'];a51_0x25f5=function(){return _0x335e09;};return a51_0x25f5();}import{configGetDefinition}from'../../commands/config/get.js';function a51_0xde48(_0x24f8c6,_0x3aa947){_0x24f8c6=_0x24f8c6-0xcd;const _0x25f5a4=a51_0x25f5();let _0xde4874=_0x25f5a4[_0x24f8c6];return _0xde4874;}import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a52_0x5b24f3=a52_0x4816;(function(_0x3dd009,_0x5d4642){const _0x2aa647=a52_0x4816,_0x532e67=_0x3dd009();while(!![]){try{const _0x3162cf=parseInt(_0x2aa647(0x185))/0x1+parseInt(_0x2aa647(0x17f))/0x2*(parseInt(_0x2aa647(0x17d))/0x3)+-parseInt(_0x2aa647(0x180))/0x4+-parseInt(_0x2aa647(0x18b))/0x5+-parseInt(_0x2aa647(0x186))/0x6*(-parseInt(_0x2aa647(0x187))/0x7)+-parseInt(_0x2aa647(0x181))/0x8*(-parseInt(_0x2aa647(0x18c))/0x9)+parseInt(_0x2aa647(0x184))/0xa*(parseInt(_0x2aa647(0x18d))/0xb);if(_0x3162cf===_0x5d4642)break;else _0x532e67['push'](_0x532e67['shift']());}catch(_0x5e155d){_0x532e67['push'](_0x532e67['shift']());}}}(a52_0x58a6,0xeb2bc));function a52_0x58a6(){const _0x5d46f3=['931440uBCFwo','global','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','85540HRGSkl','218374pVElnA','8087598orMsHL','7UHArqJ','bool','List\x20all\x20config\x20values','config','6450560KfcBfw','135NzskDY','308HjBhsy','65001PKcBxa','list','4AnqTnA','5368924gRJuRP'];a52_0x58a6=function(){return _0x5d46f3;};return a52_0x58a6();}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';function a52_0x4816(_0x2618c8,_0xab7eca){_0x2618c8=_0x2618c8-0x17d;const _0x58a69e=a52_0x58a6();let _0x48168b=_0x58a69e[_0x2618c8];return _0x48168b;}async function execute(_0x527cf3){const _0x926af4=a52_0x4816,_0x218db9=_0x527cf3[_0x926af4(0x188)](_0x926af4(0x182))?readScopedConfig(_0x926af4(0x182)):readConfig();return{'ok':!![],'data':_0x218db9};}export const configListDefinition={'service':a52_0x5b24f3(0x18a),'command':a52_0x5b24f3(0x17e),'description':a52_0x5b24f3(0x189),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x5b24f3(0x182),'type':'boolean','description':a52_0x5b24f3(0x183),'default':![]}],'execute':execute};
|