@lovrabet/rabetbase-cli 2.3.6 → 2.3.7-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -0
- 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 -0
- package/lib/commands/db/analyze-batch-plan.js +1 -0
- 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 -0
- 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/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_0x838448=a36_0xaa00;(function(_0x2c5398,_0x576673){const _0x3dcafc=a36_0xaa00,_0x440df4=_0x2c5398();while(!![]){try{const _0x5a8456=-parseInt(_0x3dcafc(0xc3))/0x1+parseInt(_0x3dcafc(0xd9))/0x2*(parseInt(_0x3dcafc(0xc9))/0x3)+parseInt(_0x3dcafc(0xa0))/0x4+parseInt(_0x3dcafc(0xc1))/0x5*(parseInt(_0x3dcafc(0xae))/0x6)+parseInt(_0x3dcafc(0xca))/0x7*(-parseInt(_0x3dcafc(0xb0))/0x8)+-parseInt(_0x3dcafc(0xdc))/0x9+parseInt(_0x3dcafc(0xbb))/0xa*(parseInt(_0x3dcafc(0xd2))/0xb);if(_0x5a8456===_0x576673)break;else _0x440df4['push'](_0x440df4['shift']());}catch(_0x5343e9){_0x440df4['push'](_0x440df4['shift']());}}}(a36_0x3e45,0x94a67));function a36_0xaa00(_0x29307c,_0xbf3e6d){_0x29307c=_0x29307c-0x99;const _0x3e45fe=a36_0x3e45();let _0xaa005c=_0x3e45fe[_0x29307c];return _0xaa005c;}function a36_0x3e45(){const _0x155c55=['Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','push','9589248PatCLo','\x20skipped,\x20','stdin','write','type','\x20pulled,\x20','cancelled','functionNode','includes','apps','4445564baOcCq','Would\x20inspect\x20','Pull\x20only\x20this\x20script\x20type','version','functions','force','Pull\x20complete:\x20','HOOK','length','unresolvable\x20target\x20path','pull','trim','Remote\x20script\x20missing\x20content.','datasetCode','59406qRbCeR','all','41016mmbrlm','utf8','parse','lockFilePath','hookLocation','appCode','GET','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','alias','stderr','scriptsRoot','50EnjFUn','operationType','lastSync','/api/management/library/scripts/list?appCode=','\x20remote\x20BFF\x20script(s)\x20for\x20pull','stringify','15IIxcxs','scriptContent','125391VLOBGw','close','\x20failed','question','filePath','apiDir','18RNlBbV','1071mFZhmX','ENDPOINT','functionName','str','toLowerCase','local\x20unsynced\x20changes','bool','lockKey','1900679cyTIUu','nonInteractive','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','skipped','conflict','scriptType','yes','193042TgXJDE'];a36_0x3e45=function(){return _0x155c55;};return a36_0x3e45();}import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':'bff','command':a36_0x838448(0xaa),'description':a36_0x838448(0xb7),'risk':a36_0x838448(0x99),'flags':[{'name':a36_0x838448(0x9a),'type':'string','description':a36_0x838448(0xa2),'enum':['COMMON',a36_0x838448(0xcb),a36_0x838448(0xa7)]},{'name':a36_0x838448(0xa5),'type':'boolean','description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0x14624d){const _0x32c5de=a36_0x838448,_0x55ea4b=loadBffProjectConfig(_0x14624d[_0x32c5de(0xb5)]),_0x597325=await readBffLockFile(_0x55ea4b[_0x32c5de(0xb3)]),{appLock:_0x316196}=ensureLockScope(_0x597325??createEmptyBffLock(),_0x14624d[_0x32c5de(0xb5)],_0x55ea4b[_0x32c5de(0xba)],_0x32c5de(0xaa)),_0x8584b2=normalizeBffType(_0x14624d[_0x32c5de(0xcd)](_0x32c5de(0x9a)))??undefined,_0x4a23c9=buildDatasetCodeToAliasMap(_0x14624d[_0x32c5de(0xc8)],_0x14624d[_0x32c5de(0xb5)]),[_0x5586da,_0x3d6218]=await Promise[_0x32c5de(0xaf)]([listBffScripts(_0x14624d[_0x32c5de(0xb5)],_0x8584b2),getBffScriptStatistics(_0x14624d[_0x32c5de(0xb5)])]),_0x5983f6=createHookLocationMap(_0x3d6218),_0x302389=[];for(const _0x1a95a3 of _0x5586da){const _0x33b660=resolveRemoteScriptTarget(_0x55ea4b,_0x1a95a3,_0x5983f6,_0x316196['functions'],_0x4a23c9);if(!_0x33b660){_0x302389[_0x32c5de(0xdb)]({'scriptType':_0x1a95a3['scriptType'],'functionName':_0x1a95a3[_0x32c5de(0xcc)]??'','status':_0x32c5de(0xd5),'reason':_0x32c5de(0xa9)});continue;}const _0x5cc9d8=_0x316196[_0x32c5de(0xa4)][_0x33b660[_0x32c5de(0xd1)]],_0x2dd3ee=_0x1a95a3[_0x32c5de(0xc2)]!=null?computeContentHash(_0x1a95a3[_0x32c5de(0xc2)]):undefined,_0x29e8cf=await hasUnsyncedLocalChanges(_0x33b660[_0x32c5de(0xc7)],_0x5cc9d8,_0x2dd3ee);_0x302389[_0x32c5de(0xdb)]({'lockKey':_0x33b660['lockKey'],'filePath':_0x33b660[_0x32c5de(0xc7)],'remoteId':_0x1a95a3['id']??null,'status':_0x29e8cf?_0x32c5de(0xd6):'would_pull'});}return{'method':_0x32c5de(0xb6),'url':_0x32c5de(0xbe)+_0x14624d[_0x32c5de(0xb5)]+(_0x8584b2?'&type='+_0x8584b2:''),'body':{'appCode':_0x14624d['appCode'],'filterType':_0x8584b2??null,'files':_0x302389},'description':_0x32c5de(0xa1)+_0x302389['length']+_0x32c5de(0xbf)};},async 'execute'(_0x333530){const _0x47182a=a36_0x838448,_0xe6c41a=loadBffProjectConfig(_0x333530[_0x47182a(0xb5)]),_0x4a4679=await readBffLockFile(_0xe6c41a[_0x47182a(0xb3)]),{lockData:_0x884650,appLock:_0x46f066}=ensureLockScope(_0x4a4679??createEmptyBffLock(),_0x333530['appCode'],_0xe6c41a['scriptsRoot'],_0x47182a(0xaa)),_0x55996b=normalizeBffType(_0x333530[_0x47182a(0xcd)](_0x47182a(0x9a)))??undefined;if(_0x333530[_0x47182a(0xcd)](_0x47182a(0x9a))&&!_0x55996b)throw CliErrors['validation'](_0x47182a(0xd4));const [_0x996df7,_0x2f363c]=await Promise[_0x47182a(0xaf)]([listBffScripts(_0x333530[_0x47182a(0xb5)],_0x55996b),getBffScriptStatistics(_0x333530[_0x47182a(0xb5)])]);if(_0x996df7[_0x47182a(0xa8)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20BFF\x20scripts\x20found.'};const _0x9b4bfb=_0x333530[_0x47182a(0xd0)](_0x47182a(0xa5));if(_0x9b4bfb&&!_0x333530[_0x47182a(0xd3)]){const _0x71859d=await confirmForce();if(!_0x71859d)throw CliErrors[_0x47182a(0x9c)]('Force\x20pull\x20cancelled.');}if(_0x9b4bfb&&_0x333530['nonInteractive']){}const _0x5948a7=buildDatasetCodeToAliasMap(_0x333530[_0x47182a(0xc8)],_0x333530['appCode']),_0xb4d345=createHookLocationMap(_0x2f363c),_0x2f2307=JSON[_0x47182a(0xb2)](JSON[_0x47182a(0xc0)](_0x884650)),_0x4a8d77=_0x333530[_0x47182a(0xb5)],_0x567ff4=_0x2f2307[_0x47182a(0x9f)][_0x4a8d77];if(!_0x567ff4)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x4a8d77+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x238a57=[],_0x5cf86d=[],_0x14d9ec=[];for(const _0x382c87 of _0x996df7){const _0x18ebbe=resolveRemoteScriptTarget(_0xe6c41a,_0x382c87,_0xb4d345,_0x46f066[_0x47182a(0xa4)],_0x5948a7);if(!_0x18ebbe){_0x5cf86d['push']({'lockKey':_0x382c87[_0x47182a(0xd7)]+'/'+_0x382c87['functionName'],'reason':_0x47182a(0xa9)});continue;}const _0x574855=_0x46f066[_0x47182a(0xa4)][_0x18ebbe[_0x47182a(0xd1)]];try{if(!_0x382c87['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x382c87[_0x47182a(0xc2)]==null)throw new Error(_0x47182a(0xac));const _0x1a10cf=_0x382c87[_0x47182a(0xc2)],_0x524337=computeContentHash(_0x1a10cf);if(!_0x9b4bfb){const _0x2c92f8=await hasUnsyncedLocalChanges(_0x18ebbe[_0x47182a(0xc7)],_0x574855,_0x524337);if(_0x2c92f8){_0x5cf86d[_0x47182a(0xdb)]({'lockKey':_0x18ebbe['lockKey'],'reason':_0x47182a(0xcf)});continue;}}await ensureParentDirectory(_0x18ebbe[_0x47182a(0xc7)]),await writeFile(_0x18ebbe[_0x47182a(0xc7)],_0x1a10cf,_0x47182a(0xb1));const _0x49f8fb={'hash':_0x524337,'remoteId':_0x382c87['id'],'version':_0x382c87[_0x47182a(0xa3)]};_0x18ebbe['type']===_0x47182a(0xa7)&&_0x18ebbe[_0x47182a(0xb4)]&&(_0x49f8fb[_0x47182a(0xb8)]=_0x18ebbe[_0x47182a(0xb4)]['alias'],_0x49f8fb['datasetCode']=_0x18ebbe[_0x47182a(0xb4)]['datasetCode'],_0x49f8fb['operationType']=_0x18ebbe[_0x47182a(0xb4)][_0x47182a(0xbc)],_0x49f8fb[_0x47182a(0x9d)]=_0x18ebbe['hookLocation'][_0x47182a(0x9d)]),_0x567ff4[_0x47182a(0xa4)][_0x18ebbe[_0x47182a(0xd1)]]=_0x49f8fb,_0x238a57[_0x47182a(0xdb)]({'lockKey':_0x18ebbe[_0x47182a(0xd1)],'remoteId':_0x382c87['id']});}catch(_0xb31d36){_0x14d9ec['push']({'lockKey':_0x18ebbe[_0x47182a(0xd1)],'error':_0xb31d36 instanceof Error?_0xb31d36['message']:String(_0xb31d36)});}}return _0x567ff4[_0x47182a(0xbd)]=new Date()['toISOString'](),await writeBffLockFile(_0xe6c41a['lockFilePath'],_0x2f2307),{'ok':_0x14d9ec[_0x47182a(0xa8)]===0x0,'data':{'pulled':_0x238a57,'skipped':_0x5cf86d,'failed':_0x14d9ec},'message':_0x47182a(0xa6)+_0x238a57[_0x47182a(0xa8)]+_0x47182a(0x9b)+_0x5cf86d['length']+_0x47182a(0xdd)+_0x14d9ec[_0x47182a(0xa8)]+_0x47182a(0xc5)};}};async function hasUnsyncedLocalChanges(_0x3577cc,_0x43d5f6,_0x5e58c6){if(!await fileExists(_0x3577cc))return![];const _0x176597=await computeFileHash(_0x3577cc);if(!_0x43d5f6)return _0x5e58c6?_0x176597!==_0x5e58c6:!![];return _0x176597!==_0x43d5f6['hash'];}function buildDatasetCodeToAliasMap(_0x2a11bd,_0x35a23a){const _0x3be80e=a36_0x838448,_0x5004f4=loadAliasMap(_0x2a11bd,undefined,resolveApiFilePath(_0x2a11bd,_0x35a23a));return new Map(_0x5004f4['map'](_0x343189=>[_0x343189[_0x3be80e(0xad)],_0x343189[_0x3be80e(0xb8)]]));}async function confirmForce(){const _0x5421a5=a36_0x838448,_0x853478=createInterface({'input':process[_0x5421a5(0xde)],'output':process[_0x5421a5(0xb9)]}),_0x4c74ca=await new Promise(_0x21d508=>{const _0x1c5f83=_0x5421a5;_0x853478[_0x1c5f83(0xc6)](_0x1c5f83(0xda),_0x21d508);});return _0x853478[_0x5421a5(0xc4)](),['y',_0x5421a5(0xd8)][_0x5421a5(0x9e)](_0x4c74ca[_0x5421a5(0xab)]()[_0x5421a5(0xce)]());}
|
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a37_0x341a(){const _0x134b07=['length','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','remoteId','map','aliasToDatasetCode','92113iQwxtT','functions','message','get','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','Local\x20function\x20not\x20found:\x20','Incomplete\x20HOOK\x20path:\x20','/api/management/library/scripts/save','datasetCode','runtime\x20cache\x20cleared','every','HOOK','apps','\x20failed,\x20','ENDPOINT','POST','string','821224ndPGfr','operationType','runtime\x20cache\x20clear\x20failed','description','No\x20local\x20BFF\x20functions\x20found.','runtime\x20cache\x20not\x20needed','join','would_push','425223mCEUJU','Would\x20inspect\x20','\x22.\x20','Push\x20complete:\x20','alias','cleared','36864IcZWhi','functionNode','name','Push\x20only\x20this\x20script\x20type','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','utf8','boolean','force','values','\x22\x20not\x20found\x20after\x20ensureLockScope.','12WShZQO','stringify','toISOString','Lock\x20scope\x20for\x20app\x20\x22','status','filter','set','lastSync','filePath','bool','hash','lockFilePath','Push\x20local\x20BFF\x20scripts\x20to\x20remote','attempted','lockKey','parse','unchanged','586085TRHMHb','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','850856xqLQOh','\x20skipped,\x20','script','bff','scriptsRoot','some','Run\x20`','appCode','Force\x20push\x20ignoring\x20hash\x20protection','Cannot\x20resolve\x20dataset\x20for\x20\x22','has','str','type','216740uNFeWm','version','push','validation'];a37_0x341a=function(){return _0x134b07;};return a37_0x341a();}const a37_0xf661af=a37_0x4da2;(function(_0x5d9996,_0xe80dbb){const _0x129618=a37_0x4da2,_0x320943=_0x5d9996();while(!![]){try{const _0x1b3ae1=-parseInt(_0x129618(0x163))/0x1+-parseInt(_0x129618(0x18b))/0x2+parseInt(_0x129618(0x185))/0x3+parseInt(_0x129618(0x17d))/0x4+-parseInt(_0x129618(0x1a6))/0x5+-parseInt(_0x129618(0x195))/0x6*(-parseInt(_0x129618(0x16c))/0x7)+parseInt(_0x129618(0x1a8))/0x8;if(_0x1b3ae1===_0xe80dbb)break;else _0x320943['push'](_0x320943['shift']());}catch(_0x56ad04){_0x320943['push'](_0x320943['shift']());}}}(a37_0x341a,0x1f165));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';function a37_0x4da2(_0x1b4ffa,_0x5b8d3a){_0x1b4ffa=_0x1b4ffa-0x15e;const _0x341a30=a37_0x341a();let _0x4da2db=_0x341a30[_0x1b4ffa];return _0x4da2db;}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_0xf661af(0x1ab),'command':'push','description':a37_0xf661af(0x1a1),'risk':'high-risk-write','flags':[{'name':a37_0xf661af(0x162),'type':a37_0xf661af(0x17c),'description':a37_0xf661af(0x18e),'enum':['COMMON',a37_0xf661af(0x17a),a37_0xf661af(0x177)]},{'name':a37_0xf661af(0x18d),'type':'string','description':a37_0xf661af(0x168)},{'name':a37_0xf661af(0x192),'type':a37_0xf661af(0x191),'description':a37_0xf661af(0x15e)}],async 'dryRun'(_0x442db3){const _0x7a262e=a37_0xf661af,_0x74a2ed=loadBffProjectConfig(_0x442db3[_0x7a262e(0x1af)]),_0x54628c=await readBffLockFile(_0x74a2ed['lockFilePath']),{appLock:_0x2b532a}=ensureLockScope(_0x54628c??createEmptyBffLock(),_0x442db3['appCode'],_0x74a2ed[_0x7a262e(0x1ac)],'push'),_0x39e586=await getTargetFunctions(_0x74a2ed,_0x442db3),_0x59fe6e=_0x442db3[_0x7a262e(0x19e)]('force'),_0x4d3bbf=[];for(const _0x19b55a of _0x39e586){const _0x2c0157=await computeFileHash(_0x19b55a[_0x7a262e(0x19d)]),_0x4ff4a9=_0x2b532a[_0x7a262e(0x16d)][_0x19b55a[_0x7a262e(0x1a3)]],_0x1658ba=!!_0x4ff4a9&&_0x4ff4a9[_0x7a262e(0x19f)]===_0x2c0157;_0x4d3bbf['push']({'lockKey':_0x19b55a[_0x7a262e(0x1a3)],'filePath':_0x19b55a[_0x7a262e(0x19d)],'remoteId':_0x4ff4a9?.['remoteId']??null,'mode':_0x4ff4a9?.[_0x7a262e(0x169)]?'update':'create','status':!_0x59fe6e&&_0x1658ba?_0x7a262e(0x1a5):_0x7a262e(0x184)});}return{'method':_0x7a262e(0x17b),'url':_0x7a262e(0x173),'body':{'appCode':_0x442db3[_0x7a262e(0x1af)],'force':_0x59fe6e,'files':_0x4d3bbf,'cacheClearAtRuntime':_0x4d3bbf[_0x7a262e(0x1ad)](_0x1513fa=>_0x1513fa[_0x7a262e(0x199)]==='would_push'),'cacheClearAtRuntimeTimes':_0x4d3bbf[_0x7a262e(0x1ad)](_0x118ab6=>_0x118ab6[_0x7a262e(0x199)]===_0x7a262e(0x184))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x7a262e(0x186)+_0x4d3bbf[_0x7a262e(0x167)]+_0x7a262e(0x18f)};},async 'execute'(_0x5eeaea){const _0x35f30e=a37_0xf661af,_0xdaf967=loadBffProjectConfig(_0x5eeaea[_0x35f30e(0x1af)]),_0x409774=await readBffLockFile(_0xdaf967[_0x35f30e(0x1a0)]),{lockData:_0x51669f,appLock:_0x59fa1d}=ensureLockScope(_0x409774??createEmptyBffLock(),_0x5eeaea['appCode'],_0xdaf967['scriptsRoot'],'push'),_0x190a5c=await getTargetFunctions(_0xdaf967,_0x5eeaea);if(_0x190a5c[_0x35f30e(0x167)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x35f30e(0x181)};const _0x3c8b54=_0x5eeaea[_0x35f30e(0x19e)]('force'),_0x17ff9a=JSON[_0x35f30e(0x1a4)](JSON[_0x35f30e(0x196)](_0x51669f)),_0x5222b1=_0x17ff9a[_0x35f30e(0x178)][_0x5eeaea['appCode']];if(!_0x5222b1)throw new Error(_0x35f30e(0x198)+_0x5eeaea[_0x35f30e(0x1af)]+_0x35f30e(0x194));const _0x659bc8=await buildHookMaps(_0x5eeaea['appCode'],_0x5eeaea['apiDir'],_0x190a5c,_0x5222b1),_0x3c2017=[],_0x340b2d=[],_0x27d5a9=[];for(const _0xa371fa of _0x190a5c){const _0x4cd012=await computeFileHash(_0xa371fa[_0x35f30e(0x19d)]),_0xcc2406=_0x5222b1[_0x35f30e(0x16d)][_0xa371fa[_0x35f30e(0x1a3)]];if(!_0x3c8b54&&_0xcc2406&&_0xcc2406[_0x35f30e(0x19f)]===_0x4cd012){_0x340b2d[_0x35f30e(0x165)]({'lockKey':_0xa371fa[_0x35f30e(0x1a3)],'reason':_0x35f30e(0x1a5)});continue;}try{await uploadSingleFunction(_0x5eeaea[_0x35f30e(0x1af)],_0xa371fa,_0x5222b1,_0x659bc8);const _0x5c70a9=_0x5222b1[_0x35f30e(0x16d)][_0xa371fa[_0x35f30e(0x1a3)]];_0x3c2017[_0x35f30e(0x165)]({'lockKey':_0xa371fa[_0x35f30e(0x1a3)],'remoteId':_0x5c70a9?.[_0x35f30e(0x169)]??0x0});}catch(_0x17f37a){_0x27d5a9[_0x35f30e(0x165)]({'lockKey':_0xa371fa[_0x35f30e(0x1a3)],'error':_0x17f37a instanceof Error?_0x17f37a[_0x35f30e(0x16e)]:String(_0x17f37a)});}}_0x5222b1[_0x35f30e(0x19c)]=new Date()[_0x35f30e(0x197)](),await writeBffLockFile(_0xdaf967[_0x35f30e(0x1a0)],_0x17ff9a),await waitForUploadedLockEntries(_0xdaf967[_0x35f30e(0x1a0)],_0x5eeaea['appCode'],_0x3c2017[_0x35f30e(0x16a)](_0x3d73db=>_0x3d73db[_0x35f30e(0x1a3)]));let _0x5c58cd={'attempted':![],'cleared':![]};if(_0x3c2017['length']>0x0)try{let _0x2c7a3e='';for(let _0x127d27=0x0;_0x127d27<CACHE_CLEAR_ATTEMPTS;_0x127d27+=0x1){_0x2c7a3e=await clearBffScriptCache(),_0x127d27<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x5c58cd={'attempted':!![],'cleared':!![],'message':_0x2c7a3e||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x4da888){_0x5c58cd={'attempted':!![],'cleared':![],'error':_0x4da888 instanceof Error?_0x4da888[_0x35f30e(0x16e)]:String(_0x4da888)};}const _0x18bda5=_0x27d5a9[_0x35f30e(0x167)]===0x0&&(_0x5c58cd['attempted']?_0x5c58cd[_0x35f30e(0x18a)]:!![]),_0x3def3e=_0x5c58cd[_0x35f30e(0x1a2)]?_0x5c58cd[_0x35f30e(0x18a)]?_0x35f30e(0x175):_0x35f30e(0x17f):_0x35f30e(0x182);return{'ok':_0x18bda5,'data':{'uploaded':_0x3c2017,'skipped':_0x340b2d,'failed':_0x27d5a9,'cacheClear':_0x5c58cd},'message':_0x35f30e(0x188)+_0x3c2017[_0x35f30e(0x167)]+'\x20uploaded,\x20'+_0x340b2d[_0x35f30e(0x167)]+_0x35f30e(0x1a9)+_0x27d5a9[_0x35f30e(0x167)]+_0x35f30e(0x179)+_0x3def3e};}};async function getTargetFunctions(_0x4707f2,_0x44ba84){const _0x27a5eb=a37_0xf661af,_0x2d7391=_0x44ba84['str'](_0x27a5eb(0x162)),_0x168aa1=_0x44ba84[_0x27a5eb(0x161)](_0x27a5eb(0x18d)),_0x3b0656=normalizeBffType(_0x2d7391)??undefined;if(_0x168aa1&&!_0x3b0656)throw CliErrors[_0x27a5eb(0x166)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x321f6a=await scanLocalBffFunctions(_0x4707f2,_0x3b0656);if(_0x168aa1){const _0x2e1abf=_0x321f6a[_0x27a5eb(0x19a)](_0x2f0f40=>_0x2f0f40[_0x27a5eb(0x18d)]===_0x168aa1);if(_0x2e1abf[_0x27a5eb(0x167)]===0x0)throw CliErrors[_0x27a5eb(0x166)](_0x27a5eb(0x171)+_0x3b0656+'/'+_0x168aa1);return _0x2e1abf;}return _0x321f6a;}async function buildHookMaps(_0x5f5434,_0x3369ff,_0xbc04c4,_0x4d6182){const _0x4009b0=a37_0xf661af,_0x2e35da=_0xbc04c4['some'](_0x1c78b1=>_0x1c78b1[_0x4009b0(0x162)]===_0x4009b0(0x177));if(!_0x2e35da)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x2e800b=loadAliasMap(_0x3369ff,undefined,resolveApiFilePath(_0x3369ff,_0x5f5434)),_0x33ba7c=new Map(_0x2e800b[_0x4009b0(0x16a)](_0x76eeab=>[_0x76eeab['alias'],_0x76eeab[_0x4009b0(0x174)]]));for(const _0x5ad8c1 of Object[_0x4009b0(0x193)](_0x4d6182[_0x4009b0(0x16d)])){_0x5ad8c1[_0x4009b0(0x189)]&&_0x5ad8c1[_0x4009b0(0x174)]&&!_0x33ba7c[_0x4009b0(0x160)](_0x5ad8c1[_0x4009b0(0x189)])&&_0x33ba7c[_0x4009b0(0x19b)](_0x5ad8c1[_0x4009b0(0x189)],_0x5ad8c1[_0x4009b0(0x174)]);}const _0x4d047c=await listDatasets(_0x5f5434),_0x37e97b=new Map(_0x4d047c[_0x4009b0(0x16a)](_0x473edc=>[_0x473edc['code'],_0x473edc]));return{'aliasToDatasetCode':_0x33ba7c,'datasetCodeToDataset':_0x37e97b};}async function uploadSingleFunction(_0x383cf2,_0x191ea4,_0x46ede6,_0x381055){const _0x5e0a81=a37_0xf661af,_0x362efd=await readFile(_0x191ea4['filePath'],_0x5e0a81(0x190)),_0x43de2d=await computeFileHash(_0x191ea4[_0x5e0a81(0x19d)]),_0x528944=_0x46ede6['functions'][_0x191ea4[_0x5e0a81(0x1a3)]];if(_0x528944?.[_0x5e0a81(0x169)]&&_0x528944[_0x5e0a81(0x164)]==null)throw CliErrors['validation'](_0x191ea4['lockKey']+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x293cc0=extractScriptDescription(_0x362efd);if(!_0x293cc0&&_0x528944?.['remoteId']){const _0x1280d8=await getBffScriptInfo(_0x528944[_0x5e0a81(0x169)]);_0x293cc0=_0x1280d8[_0x5e0a81(0x180)]||undefined;}const _0x47fa60={'appCode':_0x383cf2,'functionName':_0x191ea4[_0x5e0a81(0x18d)],'scriptType':_0x191ea4[_0x5e0a81(0x162)],'scriptContent':_0x362efd};if(_0x528944?.[_0x5e0a81(0x169)])_0x47fa60['id']=_0x528944[_0x5e0a81(0x169)];if(_0x528944?.[_0x5e0a81(0x164)]!=null)_0x47fa60[_0x5e0a81(0x164)]=_0x528944[_0x5e0a81(0x164)];if(_0x293cc0)_0x47fa60['description']=_0x293cc0;if(_0x191ea4[_0x5e0a81(0x162)]==='HOOK'){const _0xafbfb0=_0x191ea4[_0x5e0a81(0x189)];if(!_0xafbfb0||!_0x191ea4[_0x5e0a81(0x17e)]||!_0x191ea4[_0x5e0a81(0x18c)])throw CliErrors[_0x5e0a81(0x166)](_0x5e0a81(0x172)+_0x191ea4[_0x5e0a81(0x1a3)]);const _0x307dce=_0x381055[_0x5e0a81(0x16b)]['get'](_0xafbfb0)??_0x528944?.[_0x5e0a81(0x174)]??_0xafbfb0,_0xf6902d=_0x381055['datasetCodeToDataset'][_0x5e0a81(0x16f)](_0x307dce);if(!_0xf6902d)throw CliErrors[_0x5e0a81(0x166)](_0x5e0a81(0x15f)+_0xafbfb0+_0x5e0a81(0x187)+(_0x5e0a81(0x1ae)+CLI_BIN_NAME+_0x5e0a81(0x170)));_0x47fa60['datasetId']=_0xf6902d['id'],_0x47fa60[_0x5e0a81(0x17e)]=_0x191ea4['operationType'],_0x47fa60[_0x5e0a81(0x18c)]=_0x191ea4['functionNode'];}const _0xa4bdf1=await saveBffScript(_0x47fa60),_0x2fb176=_0xa4bdf1['id'],_0x1e0ae4=_0xa4bdf1[_0x5e0a81(0x1aa)]??await getBffScriptInfo(_0x2fb176),_0x545b5b={'hash':_0x43de2d,'remoteId':_0x2fb176,'version':_0x1e0ae4[_0x5e0a81(0x164)]};if(_0x191ea4[_0x5e0a81(0x162)]===_0x5e0a81(0x177)){const _0x4c8f1a=_0x191ea4[_0x5e0a81(0x189)],_0x5212a8=_0x381055[_0x5e0a81(0x16b)][_0x5e0a81(0x16f)](_0x4c8f1a)??_0x528944?.[_0x5e0a81(0x174)]??_0x4c8f1a;_0x381055[_0x5e0a81(0x16b)]['has'](_0x4c8f1a)?_0x545b5b[_0x5e0a81(0x189)]=_0x4c8f1a:_0x545b5b[_0x5e0a81(0x189)]=_0x528944?.[_0x5e0a81(0x189)],_0x545b5b[_0x5e0a81(0x174)]=_0x5212a8,_0x545b5b[_0x5e0a81(0x17e)]=_0x191ea4[_0x5e0a81(0x17e)],_0x545b5b[_0x5e0a81(0x18c)]=_0x191ea4['functionNode'];}_0x46ede6[_0x5e0a81(0x16d)][_0x191ea4[_0x5e0a81(0x1a3)]]=_0x545b5b;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x3b5287,_0x4282a9,_0x418ab2){const _0x51306a=a37_0xf661af;if(_0x418ab2[_0x51306a(0x167)]===0x0)return;for(let _0x6d410a=0x0;_0x6d410a<LOCK_SETTLE_RETRY_COUNT;_0x6d410a+=0x1){const _0x3f60ce=await readBffLockFile(_0x3b5287),_0x5b5edc=_0x3f60ce?.[_0x51306a(0x178)]?.[_0x4282a9]?.[_0x51306a(0x16d)]??{},_0x73daf5=_0x418ab2[_0x51306a(0x176)](_0x2ecac3=>!!_0x5b5edc[_0x2ecac3]?.[_0x51306a(0x169)]);if(_0x73daf5)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x51306a(0x1a7)+_0x418ab2[_0x51306a(0x183)](',\x20')+'.');}
|
|
1
|
+
const a37_0x4badc0=a37_0x3b85;(function(_0x50ed66,_0xc586be){const _0x58ecf3=a37_0x3b85,_0x55a989=_0x50ed66();while(!![]){try{const _0x1937cb=parseInt(_0x58ecf3(0x1e5))/0x1+-parseInt(_0x58ecf3(0x1b6))/0x2+parseInt(_0x58ecf3(0x1df))/0x3*(-parseInt(_0x58ecf3(0x1d7))/0x4)+parseInt(_0x58ecf3(0x1e0))/0x5*(parseInt(_0x58ecf3(0x1fb))/0x6)+parseInt(_0x58ecf3(0x1d8))/0x7*(parseInt(_0x58ecf3(0x1cc))/0x8)+-parseInt(_0x58ecf3(0x1d9))/0x9+parseInt(_0x58ecf3(0x1b7))/0xa;if(_0x1937cb===_0xc586be)break;else _0x55a989['push'](_0x55a989['shift']());}catch(_0xf96bf5){_0x55a989['push'](_0x55a989['shift']());}}}(a37_0x2141,0xb9924));import{readFile}from'node:fs/promises';function a37_0x2141(){const _0x9156b7=['585012dpjgxy','7721XlARvr','12292407SOBxGq','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','cleared','datasetCodeToDataset','/api/management/library/scripts/save','has','3jhFLWI','104955UtXIJR','ENDPOINT','parse','operationType','length','1316071XqDWpY','datasetCode','boolean','map','runtime\x20cache\x20cleared','values','Push\x20local\x20BFF\x20scripts\x20to\x20remote',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','datasetId','would_push','stringify','attempted','toISOString','validation','remoteId','string','force','\x20skipped,\x20','Run\x20`','runtime\x20cache\x20clear\x20failed','\x20uploaded,\x20','alias','114oeFWGc','lockFilePath','filePath','scriptsRoot','message','POST','name','\x20failed,\x20','Push\x20complete:\x20','status','lastSync','type','create','script','No\x20local\x20BFF\x20functions\x20found.','functionNode','937226sIPfhx','695880SllTtE','get','lockKey','apps','join','appCode','version','Cannot\x20resolve\x20dataset\x20for\x20\x22','\x22\x20not\x20found\x20after\x20ensureLockScope.','hash','Push\x20only\x20this\x20script\x20type','push','bool','runtime\x20cache\x20not\x20needed','description','Runtime\x20script\x20cache\x20cleared.','unchanged','\x22.\x20','some','filter','apiDir','6936lALVRE','Would\x20inspect\x20','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','Local\x20function\x20not\x20found:\x20','functions','bff','Force\x20push\x20ignoring\x20hash\x20protection','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','Lock\x20scope\x20for\x20app\x20\x22','HOOK','aliasToDatasetCode'];a37_0x2141=function(){return _0x9156b7;};return a37_0x2141();}import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';function a37_0x3b85(_0x166bab,_0x490e12){_0x166bab=_0x166bab-0x1b2;const _0x214177=a37_0x2141();let _0x3b8582=_0x214177[_0x166bab];return _0x3b8582;}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_0x4badc0(0x1d1),'command':'push','description':a37_0x4badc0(0x1eb),'risk':'high-risk-write','flags':[{'name':a37_0x4badc0(0x206),'type':a37_0x4badc0(0x1f4),'description':a37_0x4badc0(0x1c1),'enum':['COMMON',a37_0x4badc0(0x1e1),a37_0x4badc0(0x1d5)]},{'name':a37_0x4badc0(0x201),'type':a37_0x4badc0(0x1f4),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a37_0x4badc0(0x1f5),'type':a37_0x4badc0(0x1e7),'description':a37_0x4badc0(0x1d2)}],async 'dryRun'(_0x177538){const _0x454c11=a37_0x4badc0,_0x4c52e6=loadBffProjectConfig(_0x177538[_0x454c11(0x1bc)]),_0x14ebe8=await readBffLockFile(_0x4c52e6[_0x454c11(0x1fc)]),{appLock:_0x5d3676}=ensureLockScope(_0x14ebe8??createEmptyBffLock(),_0x177538['appCode'],_0x4c52e6['scriptsRoot'],_0x454c11(0x1c2)),_0xe49373=await getTargetFunctions(_0x4c52e6,_0x177538),_0x5a2047=_0x177538[_0x454c11(0x1c3)](_0x454c11(0x1f5)),_0x47c5ef=[];for(const _0x499410 of _0xe49373){const _0x4e4c53=await computeFileHash(_0x499410[_0x454c11(0x1fd)]),_0x451fff=_0x5d3676[_0x454c11(0x1d0)][_0x499410[_0x454c11(0x1b9)]],_0x273972=!!_0x451fff&&_0x451fff[_0x454c11(0x1c0)]===_0x4e4c53;_0x47c5ef[_0x454c11(0x1c2)]({'lockKey':_0x499410[_0x454c11(0x1b9)],'filePath':_0x499410[_0x454c11(0x1fd)],'remoteId':_0x451fff?.['remoteId']??null,'mode':_0x451fff?.[_0x454c11(0x1f3)]?'update':_0x454c11(0x1b2),'status':!_0x5a2047&&_0x273972?_0x454c11(0x1c7):_0x454c11(0x1ee)});}return{'method':_0x454c11(0x200),'url':_0x454c11(0x1dd),'body':{'appCode':_0x177538[_0x454c11(0x1bc)],'force':_0x5a2047,'files':_0x47c5ef,'cacheClearAtRuntime':_0x47c5ef[_0x454c11(0x1c9)](_0xa2325e=>_0xa2325e[_0x454c11(0x204)]===_0x454c11(0x1ee)),'cacheClearAtRuntimeTimes':_0x47c5ef[_0x454c11(0x1c9)](_0xb5a292=>_0xb5a292[_0x454c11(0x204)]===_0x454c11(0x1ee))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x454c11(0x1cd)+_0x47c5ef['length']+'\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0x4079ba){const _0x460b03=a37_0x4badc0,_0xf41094=loadBffProjectConfig(_0x4079ba[_0x460b03(0x1bc)]),_0x6126ea=await readBffLockFile(_0xf41094['lockFilePath']),{lockData:_0x4ceb0b,appLock:_0x16b93d}=ensureLockScope(_0x6126ea??createEmptyBffLock(),_0x4079ba[_0x460b03(0x1bc)],_0xf41094[_0x460b03(0x1fe)],_0x460b03(0x1c2)),_0x2012d2=await getTargetFunctions(_0xf41094,_0x4079ba);if(_0x2012d2[_0x460b03(0x1e4)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x460b03(0x1b4)};const _0x3cff12=_0x4079ba['bool'](_0x460b03(0x1f5)),_0x1cb2d3=JSON[_0x460b03(0x1e2)](JSON[_0x460b03(0x1ef)](_0x4ceb0b)),_0x102214=_0x1cb2d3[_0x460b03(0x1ba)][_0x4079ba[_0x460b03(0x1bc)]];if(!_0x102214)throw new Error(_0x460b03(0x1d4)+_0x4079ba[_0x460b03(0x1bc)]+_0x460b03(0x1bf));const _0x198f7d=await buildHookMaps(_0x4079ba[_0x460b03(0x1bc)],_0x4079ba[_0x460b03(0x1cb)],_0x2012d2,_0x102214),_0x33728d=[],_0x3f90eb=[],_0x5823e6=[];for(const _0x124155 of _0x2012d2){const _0x5f2e20=await computeFileHash(_0x124155[_0x460b03(0x1fd)]),_0x5c3d68=_0x102214[_0x460b03(0x1d0)][_0x124155[_0x460b03(0x1b9)]];if(!_0x3cff12&&_0x5c3d68&&_0x5c3d68['hash']===_0x5f2e20){_0x3f90eb[_0x460b03(0x1c2)]({'lockKey':_0x124155[_0x460b03(0x1b9)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x4079ba[_0x460b03(0x1bc)],_0x124155,_0x102214,_0x198f7d);const _0x36d578=_0x102214[_0x460b03(0x1d0)][_0x124155[_0x460b03(0x1b9)]];_0x33728d[_0x460b03(0x1c2)]({'lockKey':_0x124155[_0x460b03(0x1b9)],'remoteId':_0x36d578?.[_0x460b03(0x1f3)]??0x0});}catch(_0x944d24){_0x5823e6[_0x460b03(0x1c2)]({'lockKey':_0x124155[_0x460b03(0x1b9)],'error':_0x944d24 instanceof Error?_0x944d24['message']:String(_0x944d24)});}}_0x102214[_0x460b03(0x205)]=new Date()[_0x460b03(0x1f1)](),await writeBffLockFile(_0xf41094['lockFilePath'],_0x1cb2d3),await waitForUploadedLockEntries(_0xf41094[_0x460b03(0x1fc)],_0x4079ba[_0x460b03(0x1bc)],_0x33728d[_0x460b03(0x1e8)](_0x1abcf1=>_0x1abcf1[_0x460b03(0x1b9)]));let _0x217b7f={'attempted':![],'cleared':![]};if(_0x33728d['length']>0x0)try{let _0x58bb07='';for(let _0x5d34ed=0x0;_0x5d34ed<CACHE_CLEAR_ATTEMPTS;_0x5d34ed+=0x1){_0x58bb07=await clearBffScriptCache(),_0x5d34ed<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x217b7f={'attempted':!![],'cleared':!![],'message':_0x58bb07||_0x460b03(0x1c6)};}catch(_0x3786a3){_0x217b7f={'attempted':!![],'cleared':![],'error':_0x3786a3 instanceof Error?_0x3786a3[_0x460b03(0x1ff)]:String(_0x3786a3)};}const _0x45e3c6=_0x5823e6[_0x460b03(0x1e4)]===0x0&&(_0x217b7f[_0x460b03(0x1f0)]?_0x217b7f[_0x460b03(0x1db)]:!![]),_0x1228ef=_0x217b7f[_0x460b03(0x1f0)]?_0x217b7f[_0x460b03(0x1db)]?_0x460b03(0x1e9):_0x460b03(0x1f8):_0x460b03(0x1c4);return{'ok':_0x45e3c6,'data':{'uploaded':_0x33728d,'skipped':_0x3f90eb,'failed':_0x5823e6,'cacheClear':_0x217b7f},'message':_0x460b03(0x203)+_0x33728d[_0x460b03(0x1e4)]+_0x460b03(0x1f9)+_0x3f90eb[_0x460b03(0x1e4)]+_0x460b03(0x1f6)+_0x5823e6['length']+_0x460b03(0x202)+_0x1228ef};}};async function getTargetFunctions(_0xfe7b24,_0x1c3694){const _0x5206e5=a37_0x4badc0,_0x44e6e0=_0x1c3694['str'](_0x5206e5(0x206)),_0x2df505=_0x1c3694['str']('name'),_0x707a56=normalizeBffType(_0x44e6e0)??undefined;if(_0x2df505&&!_0x707a56)throw CliErrors['validation'](_0x5206e5(0x1ce));const _0x269b72=await scanLocalBffFunctions(_0xfe7b24,_0x707a56);if(_0x2df505){const _0x4c2a31=_0x269b72[_0x5206e5(0x1ca)](_0x4d22=>_0x4d22[_0x5206e5(0x201)]===_0x2df505);if(_0x4c2a31[_0x5206e5(0x1e4)]===0x0)throw CliErrors[_0x5206e5(0x1f2)](_0x5206e5(0x1cf)+_0x707a56+'/'+_0x2df505);return _0x4c2a31;}return _0x269b72;}async function buildHookMaps(_0x5be102,_0x143115,_0x4105ae,_0x435da8){const _0x4f69e2=a37_0x4badc0,_0x2da62b=_0x4105ae[_0x4f69e2(0x1c9)](_0x3743f5=>_0x3743f5['type']===_0x4f69e2(0x1d5));if(!_0x2da62b)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x4e3dd4=loadAliasMap(_0x143115,undefined,resolveApiFilePath(_0x143115,_0x5be102)),_0x5cf75f=new Map(_0x4e3dd4[_0x4f69e2(0x1e8)](_0x5b58c4=>[_0x5b58c4[_0x4f69e2(0x1fa)],_0x5b58c4[_0x4f69e2(0x1e6)]]));for(const _0x510acf of Object[_0x4f69e2(0x1ea)](_0x435da8['functions'])){_0x510acf[_0x4f69e2(0x1fa)]&&_0x510acf[_0x4f69e2(0x1e6)]&&!_0x5cf75f['has'](_0x510acf[_0x4f69e2(0x1fa)])&&_0x5cf75f['set'](_0x510acf[_0x4f69e2(0x1fa)],_0x510acf[_0x4f69e2(0x1e6)]);}const _0xbf986f=await listDatasets(_0x5be102),_0x54500f=new Map(_0xbf986f[_0x4f69e2(0x1e8)](_0xd917e2=>[_0xd917e2['code'],_0xd917e2]));return{'aliasToDatasetCode':_0x5cf75f,'datasetCodeToDataset':_0x54500f};}async function uploadSingleFunction(_0x431699,_0x2d6cca,_0x214ebc,_0x954bc8){const _0x360308=a37_0x4badc0,_0x326e99=await readFile(_0x2d6cca['filePath'],'utf8'),_0x501f51=await computeFileHash(_0x2d6cca[_0x360308(0x1fd)]),_0x2732f5=_0x214ebc['functions'][_0x2d6cca[_0x360308(0x1b9)]];if(_0x2732f5?.[_0x360308(0x1f3)]&&_0x2732f5[_0x360308(0x1bd)]==null)throw CliErrors['validation'](_0x2d6cca[_0x360308(0x1b9)]+_0x360308(0x1ec));let _0x18ba6e=extractScriptDescription(_0x326e99);if(!_0x18ba6e&&_0x2732f5?.[_0x360308(0x1f3)]){const _0x5e8a90=await getBffScriptInfo(_0x2732f5['remoteId']);_0x18ba6e=_0x5e8a90[_0x360308(0x1c5)]||undefined;}const _0x2a5c31={'appCode':_0x431699,'functionName':_0x2d6cca[_0x360308(0x201)],'scriptType':_0x2d6cca[_0x360308(0x206)],'scriptContent':_0x326e99};if(_0x2732f5?.[_0x360308(0x1f3)])_0x2a5c31['id']=_0x2732f5[_0x360308(0x1f3)];if(_0x2732f5?.[_0x360308(0x1bd)]!=null)_0x2a5c31['version']=_0x2732f5['version'];if(_0x18ba6e)_0x2a5c31[_0x360308(0x1c5)]=_0x18ba6e;if(_0x2d6cca['type']===_0x360308(0x1d5)){const _0x48157c=_0x2d6cca[_0x360308(0x1fa)];if(!_0x48157c||!_0x2d6cca['operationType']||!_0x2d6cca[_0x360308(0x1b5)])throw CliErrors[_0x360308(0x1f2)]('Incomplete\x20HOOK\x20path:\x20'+_0x2d6cca[_0x360308(0x1b9)]);const _0xc16b0c=_0x954bc8[_0x360308(0x1d6)][_0x360308(0x1b8)](_0x48157c)??_0x2732f5?.[_0x360308(0x1e6)]??_0x48157c,_0x5856e9=_0x954bc8[_0x360308(0x1dc)]['get'](_0xc16b0c);if(!_0x5856e9)throw CliErrors[_0x360308(0x1f2)](_0x360308(0x1be)+_0x48157c+_0x360308(0x1c8)+(_0x360308(0x1f7)+CLI_BIN_NAME+_0x360308(0x1d3)));_0x2a5c31[_0x360308(0x1ed)]=_0x5856e9['id'],_0x2a5c31[_0x360308(0x1e3)]=_0x2d6cca[_0x360308(0x1e3)],_0x2a5c31[_0x360308(0x1b5)]=_0x2d6cca['functionNode'];}const _0x1fd0e1=await saveBffScript(_0x2a5c31),_0x5edbb9=_0x1fd0e1['id'],_0x14dcdf=_0x1fd0e1[_0x360308(0x1b3)]??await getBffScriptInfo(_0x5edbb9),_0x3991e2={'hash':_0x501f51,'remoteId':_0x5edbb9,'version':_0x14dcdf[_0x360308(0x1bd)]};if(_0x2d6cca[_0x360308(0x206)]===_0x360308(0x1d5)){const _0x1d48d1=_0x2d6cca[_0x360308(0x1fa)],_0x2954e2=_0x954bc8[_0x360308(0x1d6)][_0x360308(0x1b8)](_0x1d48d1)??_0x2732f5?.[_0x360308(0x1e6)]??_0x1d48d1;_0x954bc8[_0x360308(0x1d6)][_0x360308(0x1de)](_0x1d48d1)?_0x3991e2[_0x360308(0x1fa)]=_0x1d48d1:_0x3991e2[_0x360308(0x1fa)]=_0x2732f5?.[_0x360308(0x1fa)],_0x3991e2[_0x360308(0x1e6)]=_0x2954e2,_0x3991e2[_0x360308(0x1e3)]=_0x2d6cca[_0x360308(0x1e3)],_0x3991e2[_0x360308(0x1b5)]=_0x2d6cca[_0x360308(0x1b5)];}_0x214ebc[_0x360308(0x1d0)][_0x2d6cca[_0x360308(0x1b9)]]=_0x3991e2;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x3eca80,_0x32317d,_0x4edb72){const _0x538622=a37_0x4badc0;if(_0x4edb72[_0x538622(0x1e4)]===0x0)return;for(let _0x1d5a9d=0x0;_0x1d5a9d<LOCK_SETTLE_RETRY_COUNT;_0x1d5a9d+=0x1){const _0x2b3e91=await readBffLockFile(_0x3eca80),_0x1697fa=_0x2b3e91?.[_0x538622(0x1ba)]?.[_0x32317d]?.[_0x538622(0x1d0)]??{},_0x673082=_0x4edb72['every'](_0x49a1eb=>!!_0x1697fa[_0x49a1eb]?.['remoteId']);if(_0x673082)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x538622(0x1da)+_0x4edb72[_0x538622(0x1bb)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a38_0x3169(){const _0x47dbe0=['5mpQmVa','231796sDXDOc','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','837lGIGwe','functions','\x20added,\x20','\x20modified,\x20','length','858194oXCzgt','314802nozBNV','hash','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','push','read','bff','map','bool','3639928JiYvnt','filePath','30QKeNpX','126340PUXASt','alias','remote','420556fWMvfF','lockKey','1673574IFVNJb','boolean','appCode','status','scriptsRoot','lockFilePath','\x20unchanged','\x20remote-only','All\x20BFF\x20scripts\x20are\x20in\x20sync.'];a38_0x3169=function(){return _0x47dbe0;};return a38_0x3169();}const a38_0x355a04=a38_0x1901;(function(_0x58010d,_0x637d26){const _0x49cc12=a38_0x1901,_0x8d22bc=_0x58010d();while(!![]){try{const _0x1dc852=parseInt(_0x49cc12(0x1b4))/0x1+-parseInt(_0x49cc12(0x1c7))/0x2+-parseInt(_0x49cc12(0x1d2))/0x3*(parseInt(_0x49cc12(0x1c0))/0x4)+parseInt(_0x49cc12(0x1bf))/0x5*(-parseInt(_0x49cc12(0x1c8))/0x6)+parseInt(_0x49cc12(0x1b6))/0x7+-parseInt(_0x49cc12(0x1d0))/0x8+-parseInt(_0x49cc12(0x1c2))/0x9*(-parseInt(_0x49cc12(0x1d3))/0xa);if(_0x1dc852===_0x637d26)break;else _0x8d22bc['push'](_0x8d22bc['shift']());}catch(_0xaac79){_0x8d22bc['push'](_0x8d22bc['shift']());}}}(a38_0x3169,0x4dc5b));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a38_0x1901(_0x357cd1,_0x49b529){_0x357cd1=_0x357cd1-0x1b2;const _0x31691c=a38_0x3169();let _0x190131=_0x31691c[_0x357cd1];return _0x190131;}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':a38_0x355a04(0x1cd),'command':'status','description':a38_0x355a04(0x1ca),'risk':a38_0x355a04(0x1cc),'flags':[{'name':'remote','type':a38_0x355a04(0x1b7),'description':a38_0x355a04(0x1c1)}],async 'execute'(_0x23f44e){const _0x232fc2=a38_0x355a04,_0x43dca3=loadBffProjectConfig(_0x23f44e[_0x232fc2(0x1b8)]),_0x538015=await readBffLockFile(_0x43dca3[_0x232fc2(0x1bb)]),{appLock:_0x4248ce}=ensureLockScope(_0x538015??createEmptyBffLock(),_0x23f44e[_0x232fc2(0x1b8)],_0x43dca3[_0x232fc2(0x1ba)],_0x232fc2(0x1b9)),_0x44f14e=await scanLocalBffFunctions(_0x43dca3),_0x29f79e=[],_0x129601=[],_0x49cf5f=[];for(const _0x3a53b6 of _0x44f14e){const _0x368a20=await computeFileHash(_0x3a53b6[_0x232fc2(0x1d1)]),_0x6f7e61=_0x4248ce[_0x232fc2(0x1c3)][_0x3a53b6['lockKey']];if(!_0x6f7e61)_0x29f79e[_0x232fc2(0x1cb)](_0x3a53b6[_0x232fc2(0x1b5)]);else _0x6f7e61[_0x232fc2(0x1c9)]!==_0x368a20?_0x129601[_0x232fc2(0x1cb)](_0x3a53b6['lockKey']):_0x49cf5f[_0x232fc2(0x1cb)](_0x3a53b6[_0x232fc2(0x1b5)]);}const _0xe986de=[];if(_0x23f44e[_0x232fc2(0x1cf)](_0x232fc2(0x1b3))){const _0x19fa17=loadAliasMap(_0x23f44e['apiDir'],undefined,resolveApiFilePath(_0x23f44e['apiDir'],_0x23f44e[_0x232fc2(0x1b8)])),_0x3b7588=new Map(_0x19fa17['map'](_0x5757b2=>[_0x5757b2['datasetCode'],_0x5757b2[_0x232fc2(0x1b2)]])),[_0x44343a,_0x29373a]=await Promise['all']([listBffScripts(_0x23f44e['appCode']),getBffScriptStatistics(_0x23f44e[_0x232fc2(0x1b8)])]),_0x3796fa=createHookLocationMap(_0x29373a),_0x2418e7=new Set(_0x44f14e[_0x232fc2(0x1ce)](_0x430b4e=>_0x430b4e[_0x232fc2(0x1b5)]));for(const _0x2a7ca8 of _0x44343a){const _0x46f192=resolveRemoteScriptTarget(_0x43dca3,_0x2a7ca8,_0x3796fa,_0x4248ce[_0x232fc2(0x1c3)],_0x3b7588);_0x46f192&&!_0x2418e7['has'](_0x46f192[_0x232fc2(0x1b5)])&&_0xe986de['push'](_0x46f192[_0x232fc2(0x1b5)]);}}const _0x46f1dd=_0x29f79e[_0x232fc2(0x1c6)]===0x0&&_0x129601[_0x232fc2(0x1c6)]===0x0&&_0xe986de[_0x232fc2(0x1c6)]===0x0;return{'ok':!![],'data':{'added':_0x29f79e,'modified':_0x129601,'unchanged':_0x49cf5f,'remoteOnly':_0xe986de},'message':_0x46f1dd?_0x232fc2(0x1be):_0x29f79e[_0x232fc2(0x1c6)]+_0x232fc2(0x1c4)+_0x129601[_0x232fc2(0x1c6)]+_0x232fc2(0x1c5)+_0x49cf5f['length']+_0x232fc2(0x1bc)+(_0xe986de['length']>0x0?',\x20'+_0xe986de[_0x232fc2(0x1c6)]+_0x232fc2(0x1bd):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a39_0xb556b2=a39_0x5ac3;function a39_0x5ac3(_0x11615b,_0x1d3290){_0x11615b=_0x11615b-0xc9;const _0x51c848=a39_0x51c8();let _0x5ac396=_0x51c848[_0x11615b];return _0x5ac396;}function a39_0x51c8(){const _0x428e73=['4351304CHKDhc','7EKovEW','inherit','setLogPath','111221hOQmtO','nonInteractive','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','log','6030lvFGNb','cwd','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','apiError','../../skills/npx-skills-add.js','2301754lNwpbA','cli-skill','pipe','write','5ZkamWk',')...','7509372hYPkbD','13516hVjPGj','error','1398DdIYAt','240avbGuu','3781629rHMTZg','CLI\x20Built-in\x20Skill\x20installed','unknown','info'];a39_0x51c8=function(){return _0x428e73;};return a39_0x51c8();}(function(_0x107ac9,_0x324695){const _0x38b380=a39_0x5ac3,_0x26dff6=_0x107ac9();while(!![]){try{const _0x2ddb98=parseInt(_0x38b380(0xd0))/0x1+-parseInt(_0x38b380(0xd5))/0x2+-parseInt(_0x38b380(0xde))/0x3*(-parseInt(_0x38b380(0xdc))/0x4)+-parseInt(_0x38b380(0xd9))/0x5*(-parseInt(_0x38b380(0xdb))/0x6)+parseInt(_0x38b380(0xc9))/0x7*(-parseInt(_0x38b380(0xe4))/0x8)+-parseInt(_0x38b380(0xe0))/0x9+parseInt(_0x38b380(0xdf))/0xa*(parseInt(_0x38b380(0xcc))/0xb);if(_0x2ddb98===_0x324695)break;else _0x26dff6['push'](_0x26dff6['shift']());}catch(_0x2d1d99){_0x26dff6['push'](_0x26dff6['shift']());}}}(a39_0x51c8,0xea59b));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0xb556b2(0xd6),'command':'install','description':'Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','risk':a39_0xb556b2(0xd8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x417bee){const _0x5386cd=a39_0xb556b2;logger[_0x5386cd(0xcb)](process[_0x5386cd(0xd1)]()),logger[_0x5386cd(0xe3)]('cli-skill-install','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.');const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x489caf,RABETBASE_SKILL_SOURCE:_0x90c8ec,runNpxSkillsAddGlobal:_0x2dc91c}=await import(_0x5386cd(0xd4)),_0x348dff=_0x417bee[_0x5386cd(0xcd)]?_0x5386cd(0xd7):_0x5386cd(0xca);console[_0x5386cd(0xcf)](_0x5386cd(0xce)+_0x489caf+_0x5386cd(0xda));const _0x68abe3=_0x2dc91c(process[_0x5386cd(0xd1)](),_0x90c8ec,{'stdio':_0x348dff});if(_0x68abe3['skipped'])console[_0x5386cd(0xcf)](_0x5386cd(0xd2));else{if(_0x68abe3['ok'])console[_0x5386cd(0xcf)](_0x5386cd(0xe1));else throw CliErrors[_0x5386cd(0xd3)]('npx\x20skills\x20add\x20failed:\x20'+(_0x68abe3[_0x5386cd(0xdd)]||_0x5386cd(0xe2)),'Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20'+_0x489caf);}return{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a40_0xb44963=a40_0x3666;(function(_0x4a1850,_0x2cfaef){const _0x57c250=a40_0x3666,_0x143ba6=_0x4a1850();while(!![]){try{const _0x23d7ae=-parseInt(_0x57c250(0x1ea))/0x1+-parseInt(_0x57c250(0x1cc))/0x2*(parseInt(_0x57c250(0x1e6))/0x3)+parseInt(_0x57c250(0x206))/0x4*(-parseInt(_0x57c250(0x204))/0x5)+-parseInt(_0x57c250(0x1e9))/0x6*(parseInt(_0x57c250(0x1bd))/0x7)+parseInt(_0x57c250(0x1c1))/0x8*(-parseInt(_0x57c250(0x1c8))/0x9)+-parseInt(_0x57c250(0x200))/0xa+parseInt(_0x57c250(0x1bb))/0xb*(parseInt(_0x57c250(0x1d4))/0xc);if(_0x23d7ae===_0x2cfaef)break;else _0x143ba6['push'](_0x143ba6['shift']());}catch(_0x215ed2){_0x143ba6['push'](_0x143ba6['shift']());}}}(a40_0x587e,0xb8490));import a40_0xf85d64 from'chalk';import a40_0x330d2c from'ora';import a40_0x5b5e9e 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';function a40_0x3666(_0x4a492b,_0x1cf623){_0x4a492b=_0x4a492b-0x1b9;const _0x587edb=a40_0x587e();let _0x3666c6=_0x587edb[_0x4a492b];return _0x3666c6;}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 _0x306b32=a40_0x3666;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x306b32(0x1ce)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x5d79d2=a40_0x3666,_0x4beae8=process[_0x5d79d2(0x209)][_0x5d79d2(0x1e8)]();if(_0x4beae8[_0x5d79d2(0x1d0)]('bun'))return _0x5d79d2(0x1d5);return _0x5d79d2(0x1bc);}const updateFlags=[{'name':'beta','type':a40_0xb44963(0x1e5),'description':a40_0xb44963(0x1f3),'default':![]},{'name':a40_0xb44963(0x1fa),'type':a40_0xb44963(0x1dd),'description':a40_0xb44963(0x1c7)},{'name':'no-skills','type':a40_0xb44963(0x1e5),'description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':a40_0xb44963(0x1fe),'type':a40_0xb44963(0x1e5),'description':a40_0xb44963(0x1bf),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x263206){const _0x5d6593=a40_0xb44963;return _0x263206['str'](_0x5d6593(0x1fa))[_0x5d6593(0x1f4)]();}function shouldSkipCliSkill(_0x31f469){const _0x32ebb2=a40_0xb44963;return _0x31f469[_0x32ebb2(0x1c3)](_0x32ebb2(0x205))||_0x31f469['flag'](_0x32ebb2(0x1fe))===![];}function a40_0x587e(){const _0x5489bf=['includes','validation','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','\x20cli-skill\x20install','1193064PmAWjh','bun','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','\x20\x20Try\x20manually:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','gray','fail','skipped','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','string','json','Update\x20failed','\x20→\x20','update','\x20install\x20-g\x20','Updated\x20to\x20v','green','boolean','1001307rXkPEq','fromEntries','toLowerCase','1067532hULyEg','1357310bYcMGe','log','error','message','yellow','source','Update\x20available:\x20','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','\x20\x20Run\x20manually:\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','trim','pipe','beta','start','Version\x20comparison\x20failed','valid','version','entries','info','...','skills','unknown','1812390JEIciu','Updating\x20via\x20','filter','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','10ZvmMAm','no-skills','2012820xZbNOF','run','cwd','execPath','Already\x20up\x20to\x20date\x20(v','Current\x20version:\x20','/dist-tags','682huYUtP','npm','35WrKmbQ','Beta\x20version:\x20','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','3893824HEUjrE','https://registry.npmjs.org/-/package/','bool','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Checking\x20CLI\x20Built-in\x20Skill...','Already\x20on\x20requested\x20version\x20(v','Install\x20a\x20specific\x20CLI\x20version','18AMZmNK','latest','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','nonInteractive','6GIXXcr','succeed','slice','Requested\x20version:\x20'];a40_0x587e=function(){return _0x5489bf;};return a40_0x587e();}async function validateUpdateFlags(_0x5add0a){const _0x30bf97=a40_0xb44963,_0x5434f7=_0x5add0a['bool'](_0x30bf97(0x1f6)),_0x4a1fb5=getRequestedVersion(_0x5add0a);if(_0x5434f7&&_0x4a1fb5)throw CliErrors[_0x30bf97(0x1d1)](_0x30bf97(0x1d2),_0x30bf97(0x1f1));if(_0x4a1fb5&&!a40_0x5b5e9e['valid'](_0x4a1fb5))throw CliErrors['validation']('Invalid\x20version:\x20'+_0x4a1fb5,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x273dad=a40_0xb44963;try{const _0x5520a1=await fetch(_0x273dad(0x1c2)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x273dad(0x1ba),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x5520a1['ok'])return null;const _0x191f4d=await _0x5520a1[_0x273dad(0x1de)]();if(!_0x191f4d||typeof _0x191f4d!=='object')return null;return Object[_0x273dad(0x1e7)](Object[_0x273dad(0x1fb)](_0x191f4d)[_0x273dad(0x202)](([,_0x1989d3])=>typeof _0x1989d3===_0x273dad(0x1dd)&&_0x1989d3[_0x273dad(0x1f4)]()['length']>0x0)['map'](([_0x520c99,_0x2661fc])=>[_0x520c99,String(_0x2661fc)[_0x273dad(0x1f4)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x450672){const _0x28eae6=await fetchNpmDistTags();return _0x28eae6?.[_0x450672]??null;}async function fetchLatestVersion(){const _0x3c6c3e=a40_0xb44963;return fetchNpmDistTagVersion(_0x3c6c3e(0x1c9));}async function resolveTargetVersion(_0x33205c){const _0x148bed=a40_0xb44963,_0x2fed6f=getRequestedVersion(_0x33205c);if(_0x2fed6f)return{'version':_0x2fed6f,'source':'version'};if(_0x33205c[_0x148bed(0x1c3)]('beta')){const _0x4844bb=await fetchNpmDistTagVersion(_0x148bed(0x1f6));if(!_0x4844bb)return null;return{'version':_0x4844bb,'source':_0x148bed(0x1f6)};}const _0x1a723c=await fetchLatestVersion();if(!_0x1a723c)return null;return{'version':_0x1a723c,'source':_0x148bed(0x1c9)};}function shouldInstallTarget(_0x2325d8,_0x108c81){const _0xd26cd6=a40_0xb44963;if(_0x108c81[_0xd26cd6(0x1ef)]===_0xd26cd6(0x1fa)||_0x108c81['source']===_0xd26cd6(0x1f6))return!a40_0x5b5e9e['eq'](_0x2325d8,_0x108c81[_0xd26cd6(0x1fa)]);return a40_0x5b5e9e['lt'](_0x2325d8,_0x108c81['version']);}function getInstallPlanLabel(_0x58ceca,_0x282e52){const _0x33a540=a40_0xb44963;switch(_0x282e52['source']){case _0x33a540(0x1f6):return _0x33a540(0x1be)+a40_0xf85d64['yellow'](_0x58ceca)+_0x33a540(0x1e0)+a40_0xf85d64[_0x33a540(0x1e4)](_0x282e52[_0x33a540(0x1fa)]);case'version':return _0x33a540(0x1cf)+a40_0xf85d64[_0x33a540(0x1ee)](_0x58ceca)+_0x33a540(0x1e0)+a40_0xf85d64['green'](_0x282e52['version']);case'latest':default:return _0x33a540(0x1f0)+a40_0xf85d64['yellow'](_0x58ceca)+_0x33a540(0x1e0)+a40_0xf85d64['green'](_0x282e52[_0x33a540(0x1fa)]);}}async function installCliSkill(_0x5764d3){const _0x1cb4a2=a40_0xb44963;console[_0x1cb4a2(0x1eb)](a40_0xf85d64[_0x1cb4a2(0x1d9)](_0x1cb4a2(0x1c5)));const _0x5c588b=runNpxSkillsAddGlobal(process[_0x1cb4a2(0x208)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x5764d3?_0x1cb4a2(0x1f5):'inherit'});if(_0x5c588b[_0x1cb4a2(0x1db)]){console[_0x1cb4a2(0x1eb)](a40_0xf85d64[_0x1cb4a2(0x1d9)](_0x1cb4a2(0x1c0)));return;}if(_0x5c588b['ok']){console['log'](a40_0xf85d64[_0x1cb4a2(0x1d9)](_0x1cb4a2(0x1d8)));return;}console['warn'](a40_0xf85d64[_0x1cb4a2(0x1ee)](_0x1cb4a2(0x1d6)+(_0x5c588b[_0x1cb4a2(0x1ec)]||_0x1cb4a2(0x1ff)))),console[_0x1cb4a2(0x1eb)](a40_0xf85d64[_0x1cb4a2(0x1d9)](_0x1cb4a2(0x1f2)+CLI_BIN_NAME+_0x1cb4a2(0x1d3)));}async function execute(_0x745630){const _0x5b920e=a40_0xb44963;await validateUpdateFlags(_0x745630);const _0x13bf8a=getCurrentVersion();console[_0x5b920e(0x1eb)](_0x5b920e(0x1b9)+_0x13bf8a);const _0x1aab5c=a40_0x330d2c('Checking\x20for\x20updates...')[_0x5b920e(0x1f7)](),_0x1fa93d=await resolveTargetVersion(_0x745630);if(!_0x1fa93d){const _0x4f20b5=_0x745630[_0x5b920e(0x1c3)](_0x5b920e(0x1f6))?_0x5b920e(0x1dc):_0x5b920e(0x1ca);return _0x1aab5c[_0x5b920e(0x1da)](_0x4f20b5),console['log'](a40_0xf85d64[_0x5b920e(0x1d9)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x4f20b5};}const _0x487257=a40_0x5b5e9e[_0x5b920e(0x1f9)](VERSION),_0x43d533=a40_0x5b5e9e[_0x5b920e(0x1f9)](_0x1fa93d[_0x5b920e(0x1fa)]);if(!_0x487257||!_0x43d533)return _0x1aab5c[_0x5b920e(0x1da)](_0x5b920e(0x1f8)),{'ok':![],'message':_0x5b920e(0x1f8)};if(!shouldInstallTarget(_0x487257,_0x1fa93d)){const _0x20848f=_0x1fa93d[_0x5b920e(0x1ef)]===_0x5b920e(0x1fa)?_0x5b920e(0x1c6)+_0x1fa93d[_0x5b920e(0x1fa)]+')':_0x5b920e(0x20a)+_0x1fa93d[_0x5b920e(0x1fa)]+')';return _0x1aab5c[_0x5b920e(0x1cd)](_0x20848f),shouldSkipCliSkill(_0x745630)?console['log'](a40_0xf85d64[_0x5b920e(0x1d9)](_0x5b920e(0x203))):await installCliSkill(_0x745630[_0x5b920e(0x1cb)]),{'ok':!![]};}_0x1aab5c[_0x5b920e(0x1fc)](getInstallPlanLabel(_0x13bf8a,_0x1fa93d));const _0x4a6e22=detectPackageManager(),_0x35bd8d=_0x4a6e22===_0x5b920e(0x1bc)?resolveNpmBin('npm'):_0x4a6e22,_0x3d12cb=a40_0x330d2c(_0x5b920e(0x201)+_0x4a6e22+_0x5b920e(0x1fd))[_0x5b920e(0x1f7)]();try{return await execa(_0x35bd8d,['install','-g',NPM_PACKAGE_NAME+'@'+_0x1fa93d['version']],{'stdio':_0x5b920e(0x1f5)}),_0x3d12cb['succeed'](_0x5b920e(0x1e3)+_0x1fa93d[_0x5b920e(0x1fa)]),console[_0x5b920e(0x1eb)](a40_0xf85d64['gray']('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipCliSkill(_0x745630)?console[_0x5b920e(0x1eb)](a40_0xf85d64['gray'](_0x5b920e(0x203))):await installCliSkill(_0x745630[_0x5b920e(0x1cb)]),{'ok':!![]};}catch(_0x292f11){return _0x3d12cb[_0x5b920e(0x1da)](_0x5b920e(0x1df)),console[_0x5b920e(0x1ec)](a40_0xf85d64['red']('\x20\x20'+_0x292f11[_0x5b920e(0x1ed)])),console['log'](a40_0xf85d64[_0x5b920e(0x1d9)](_0x5b920e(0x1d7)+_0x4a6e22+_0x5b920e(0x1e2)+NPM_PACKAGE_NAME+'@'+_0x1fa93d[_0x5b920e(0x1fa)])),{'ok':![],'message':_0x292f11[_0x5b920e(0x1ed)]};}}export const updateDefinition={'service':a40_0xb44963(0x1e1),'command':a40_0xb44963(0x207),'description':a40_0xb44963(0x1c4),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
function a40_0x3b92(_0x1a259d,_0x54ce3f){_0x1a259d=_0x1a259d-0xd3;const _0x57aab1=a40_0x57aa();let _0x3b92c2=_0x57aab1[_0x1a259d];return _0x3b92c2;}const a40_0x31778a=a40_0x3b92;(function(_0x58e38a,_0x274db6){const _0x19d135=a40_0x3b92,_0x451590=_0x58e38a();while(!![]){try{const _0x49be51=parseInt(_0x19d135(0xfe))/0x1*(parseInt(_0x19d135(0xde))/0x2)+-parseInt(_0x19d135(0xf1))/0x3+parseInt(_0x19d135(0xf0))/0x4*(parseInt(_0x19d135(0xed))/0x5)+-parseInt(_0x19d135(0x109))/0x6+-parseInt(_0x19d135(0xeb))/0x7*(parseInt(_0x19d135(0xe4))/0x8)+-parseInt(_0x19d135(0xe7))/0x9*(parseInt(_0x19d135(0xf8))/0xa)+parseInt(_0x19d135(0xdc))/0xb*(parseInt(_0x19d135(0x113))/0xc);if(_0x49be51===_0x274db6)break;else _0x451590['push'](_0x451590['shift']());}catch(_0x547b3f){_0x451590['push'](_0x451590['shift']());}}}(a40_0x57aa,0x19d3f));import a40_0x3cf9c5 from'chalk';import a40_0x5a6ef1 from'ora';import a40_0x45f742 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 a40_0x57aa(){const _0x46750f=['Already\x20up\x20to\x20date\x20(v','skipped','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','133jeEJKi','...','15TIwDue','inherit','cwd','207292uhcSMa','103686cznQGV','start','https://registry.npmjs.org/-/package/','yellow','Requested\x20version:\x20','fail','Install\x20a\x20specific\x20CLI\x20version','1270yroWVp','\x20→\x20','skills','version','\x20cli-skill\x20install','source','673oXxmof','object','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','update','map','json','\x20install\x20-g\x20','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','boolean','fromEntries','910320Nmbqhn','gray','latest','Version\x20comparison\x20failed','pipe','string','green','entries','bool','unknown','29508MZnfuj','npm','length','beta','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','log','bun','nonInteractive','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','Invalid\x20version:\x20','warn','validation','Current\x20version:\x20','Already\x20on\x20requested\x20version\x20(v','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','red','error','trim','write','info','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','str','valid','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','814OOsxyH','run','250ftfbcf','Update\x20failed','Updated\x20to\x20v','message','succeed','Checking\x20for\x20updates...','8480tOuXxu','timeout','Beta\x20version:\x20','7749ZbrygS'];a40_0x57aa=function(){return _0x46750f;};return a40_0x57aa();}function getCurrentVersion(){const _0x3a1d9a=a40_0x3b92;return GIT_COMMIT!==_0x3a1d9a(0x112)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x926a26=a40_0x3b92,_0xda30bc=process['execPath']['toLowerCase']();if(_0xda30bc['includes'](_0x926a26(0x119)))return _0x926a26(0x119);return _0x926a26(0x114);}const updateFlags=[{'name':'beta','type':a40_0x31778a(0x107),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':'version','type':a40_0x31778a(0x10e),'description':a40_0x31778a(0xf7)},{'name':'no-skills','type':a40_0x31778a(0x107),'description':a40_0x31778a(0x117),'default':![]},{'name':'skills','type':'boolean','description':a40_0x31778a(0x11b),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x35a1af){const _0x3a861c=a40_0x31778a;return _0x35a1af[_0x3a861c(0xd9)](_0x3a861c(0xfb))[_0x3a861c(0xd4)]();}function shouldSkipCliSkill(_0x2be092){const _0x1bfb6d=a40_0x31778a;return _0x2be092[_0x1bfb6d(0x111)]('no-skills')||_0x2be092['flag'](_0x1bfb6d(0xfa))===![];}async function validateUpdateFlags(_0x19b720){const _0x340262=a40_0x31778a,_0x5cf1a6=_0x19b720['bool'](_0x340262(0x116)),_0x477b94=getRequestedVersion(_0x19b720);if(_0x5cf1a6&&_0x477b94)throw CliErrors[_0x340262(0x11e)](_0x340262(0x106),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x477b94&&!a40_0x45f742[_0x340262(0xda)](_0x477b94))throw CliErrors[_0x340262(0x11e)](_0x340262(0x11c)+_0x477b94,_0x340262(0xd7));}async function fetchNpmDistTags(){const _0x3c92fc=a40_0x31778a;try{const _0x566ed8=await fetch(_0x3c92fc(0xf3)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x3c92fc(0xe5)](0x2710)});if(!_0x566ed8['ok'])return null;const _0x34bbcc=await _0x566ed8[_0x3c92fc(0x104)]();if(!_0x34bbcc||typeof _0x34bbcc!==_0x3c92fc(0xff))return null;return Object[_0x3c92fc(0x108)](Object[_0x3c92fc(0x110)](_0x34bbcc)['filter'](([,_0x1dab95])=>typeof _0x1dab95===_0x3c92fc(0x10e)&&_0x1dab95[_0x3c92fc(0xd4)]()[_0x3c92fc(0x115)]>0x0)[_0x3c92fc(0x103)](([_0x507ee1,_0x2e1512])=>[_0x507ee1,String(_0x2e1512)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x50d218){const _0x2be6ed=await fetchNpmDistTags();return _0x2be6ed?.[_0x50d218]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x3262d0){const _0xb544bc=a40_0x31778a,_0x34ec7c=getRequestedVersion(_0x3262d0);if(_0x34ec7c)return{'version':_0x34ec7c,'source':'version'};if(_0x3262d0[_0xb544bc(0x111)](_0xb544bc(0x116))){const _0x2046ac=await fetchNpmDistTagVersion(_0xb544bc(0x116));if(!_0x2046ac)return null;return{'version':_0x2046ac,'source':_0xb544bc(0x116)};}const _0x1e0bca=await fetchLatestVersion();if(!_0x1e0bca)return null;return{'version':_0x1e0bca,'source':_0xb544bc(0x10b)};}function shouldInstallTarget(_0x624768,_0x3d5180){const _0x2ba53a=a40_0x31778a;if(_0x3d5180['source']===_0x2ba53a(0xfb)||_0x3d5180[_0x2ba53a(0xfd)]==='beta')return!a40_0x45f742['eq'](_0x624768,_0x3d5180[_0x2ba53a(0xfb)]);return a40_0x45f742['lt'](_0x624768,_0x3d5180['version']);}function getInstallPlanLabel(_0x1b1aec,_0x4fb35e){const _0x20fea3=a40_0x31778a;switch(_0x4fb35e[_0x20fea3(0xfd)]){case _0x20fea3(0x116):return _0x20fea3(0xe6)+a40_0x3cf9c5[_0x20fea3(0xf4)](_0x1b1aec)+_0x20fea3(0xf9)+a40_0x3cf9c5[_0x20fea3(0x10f)](_0x4fb35e['version']);case'version':return _0x20fea3(0xf5)+a40_0x3cf9c5[_0x20fea3(0xf4)](_0x1b1aec)+_0x20fea3(0xf9)+a40_0x3cf9c5[_0x20fea3(0x10f)](_0x4fb35e[_0x20fea3(0xfb)]);case _0x20fea3(0x10b):default:return'Update\x20available:\x20'+a40_0x3cf9c5[_0x20fea3(0xf4)](_0x1b1aec)+_0x20fea3(0xf9)+a40_0x3cf9c5['green'](_0x4fb35e['version']);}}async function installCliSkill(_0x19e8ed){const _0x2e864b=a40_0x31778a;console['log'](a40_0x3cf9c5[_0x2e864b(0x10a)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x515afa=runNpxSkillsAddGlobal(process[_0x2e864b(0xef)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x19e8ed?_0x2e864b(0x10d):_0x2e864b(0xee)});if(_0x515afa[_0x2e864b(0xe9)]){console[_0x2e864b(0x118)](a40_0x3cf9c5[_0x2e864b(0x10a)](_0x2e864b(0xea)));return;}if(_0x515afa['ok']){console[_0x2e864b(0x118)](a40_0x3cf9c5[_0x2e864b(0x10a)](_0x2e864b(0xd8)));return;}console[_0x2e864b(0x11d)](a40_0x3cf9c5[_0x2e864b(0xf4)]('\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20'+(_0x515afa[_0x2e864b(0xd3)]||_0x2e864b(0x112)))),console[_0x2e864b(0x118)](a40_0x3cf9c5['gray']('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+_0x2e864b(0xfc)));}async function execute(_0x402668){const _0x30c9c4=a40_0x31778a;await validateUpdateFlags(_0x402668);const _0xcb5265=getCurrentVersion();console[_0x30c9c4(0x118)](_0x30c9c4(0x11f)+_0xcb5265);const _0x4415d9=a40_0x5a6ef1(_0x30c9c4(0xe3))[_0x30c9c4(0xf2)](),_0x4f09c9=await resolveTargetVersion(_0x402668);if(!_0x4f09c9){const _0x3a96f5=_0x402668[_0x30c9c4(0x111)](_0x30c9c4(0x116))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x4415d9['fail'](_0x3a96f5),console[_0x30c9c4(0x118)](a40_0x3cf9c5[_0x30c9c4(0x10a)](_0x30c9c4(0xdb)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x3a96f5};}const _0x575621=a40_0x45f742['valid'](VERSION),_0x21e865=a40_0x45f742['valid'](_0x4f09c9[_0x30c9c4(0xfb)]);if(!_0x575621||!_0x21e865)return _0x4415d9[_0x30c9c4(0xf6)](_0x30c9c4(0x10c)),{'ok':![],'message':_0x30c9c4(0x10c)};if(!shouldInstallTarget(_0x575621,_0x4f09c9)){const _0x3c4079=_0x4f09c9['source']==='version'?_0x30c9c4(0x120)+_0x4f09c9['version']+')':_0x30c9c4(0xe8)+_0x4f09c9[_0x30c9c4(0xfb)]+')';return _0x4415d9[_0x30c9c4(0xe2)](_0x3c4079),shouldSkipCliSkill(_0x402668)?console[_0x30c9c4(0x118)](a40_0x3cf9c5['gray'](_0x30c9c4(0x121))):await installCliSkill(_0x402668['nonInteractive']),{'ok':!![]};}_0x4415d9[_0x30c9c4(0xd6)](getInstallPlanLabel(_0xcb5265,_0x4f09c9));const _0x51bda1=detectPackageManager(),_0x3e7e84=_0x51bda1===_0x30c9c4(0x114)?resolveNpmBin('npm'):_0x51bda1,_0x274058=a40_0x5a6ef1('Updating\x20via\x20'+_0x51bda1+_0x30c9c4(0xec))[_0x30c9c4(0xf2)]();try{return await execa(_0x3e7e84,['install','-g',NPM_PACKAGE_NAME+'@'+_0x4f09c9['version']],{'stdio':_0x30c9c4(0x10d)}),_0x274058[_0x30c9c4(0xe2)](_0x30c9c4(0xe0)+_0x4f09c9[_0x30c9c4(0xfb)]),console[_0x30c9c4(0x118)](a40_0x3cf9c5[_0x30c9c4(0x10a)](_0x30c9c4(0x101))),shouldSkipCliSkill(_0x402668)?console['log'](a40_0x3cf9c5[_0x30c9c4(0x10a)](_0x30c9c4(0x121))):await installCliSkill(_0x402668[_0x30c9c4(0x11a)]),{'ok':!![]};}catch(_0x5af02d){return _0x274058[_0x30c9c4(0xf6)](_0x30c9c4(0xdf)),console[_0x30c9c4(0xd3)](a40_0x3cf9c5[_0x30c9c4(0x122)]('\x20\x20'+_0x5af02d[_0x30c9c4(0xe1)])),console[_0x30c9c4(0x118)](a40_0x3cf9c5[_0x30c9c4(0x10a)]('\x20\x20Try\x20manually:\x20'+_0x51bda1+_0x30c9c4(0x105)+NPM_PACKAGE_NAME+'@'+_0x4f09c9['version'])),{'ok':![],'message':_0x5af02d['message']};}}export const updateDefinition={'service':a40_0x31778a(0x102),'command':a40_0x31778a(0xdd),'description':a40_0x31778a(0x100),'risk':a40_0x31778a(0xd5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x21a7a9,_0x34de22){const _0xfd0494=a41_0x1ff8,_0x451a6b=_0x21a7a9();while(!![]){try{const _0x300f38=parseInt(_0xfd0494(0xb4))/0x1*(parseInt(_0xfd0494(0xb7))/0x2)+parseInt(_0xfd0494(0xb1))/0x3*(-parseInt(_0xfd0494(0xb3))/0x4)+parseInt(_0xfd0494(0xb9))/0x5*(-parseInt(_0xfd0494(0xb2))/0x6)+parseInt(_0xfd0494(0xba))/0x7+parseInt(_0xfd0494(0xb0))/0x8*(-parseInt(_0xfd0494(0xb5))/0x9)+parseInt(_0xfd0494(0xb6))/0xa+-parseInt(_0xfd0494(0xb8))/0xb;if(_0x300f38===_0x34de22)break;else _0x451a6b['push'](_0x451a6b['shift']());}catch(_0x296326){_0x451a6b['push'](_0x451a6b['shift']());}}}(a41_0x4a40,0xb64af));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a41_0x1ff8(_0x5e27a6,_0x1b8705){_0x5e27a6=_0x5e27a6-0xb0;const _0x4a40ea=a41_0x4a40();let _0x1ff81b=_0x4a40ea[_0x5e27a6];return _0x1ff81b;}export const codegenDefinitions=[codegenSdk,codegenSql];function a41_0x4a40(){const _0x5bc574=['2638955LIIRft','2557086tYzlLu','8rNFoxQ','1513572MjhXxT','6MzSxag','4GjcWTh','97827tzBpoi','4724289UlAZcU','14717970IiokDd','14ssXVRJ','2397747mOMXTQ'];a41_0x4a40=function(){return _0x5bc574;};return a41_0x4a40();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a42_0x4689(_0x4f7ca5,_0x590f89){_0x4f7ca5=_0x4f7ca5-0xcf;const _0xf1f385=a42_0xf1f3();let _0x468942=_0xf1f385[_0x4f7ca5];return _0x468942;}const a42_0x4ed206=a42_0x4689;(function(_0x149cae,_0x510b2a){const _0x2b95ec=a42_0x4689,_0x5239f2=_0x149cae();while(!![]){try{const _0x4acfb4=-parseInt(_0x2b95ec(0xd0))/0x1+parseInt(_0x2b95ec(0xdc))/0x2+-parseInt(_0x2b95ec(0xdb))/0x3+-parseInt(_0x2b95ec(0xd1))/0x4+-parseInt(_0x2b95ec(0xd7))/0x5+-parseInt(_0x2b95ec(0xdd))/0x6+parseInt(_0x2b95ec(0xe0))/0x7*(parseInt(_0x2b95ec(0xcf))/0x8);if(_0x4acfb4===_0x510b2a)break;else _0x5239f2['push'](_0x5239f2['shift']());}catch(_0x44ed53){_0x5239f2['push'](_0x5239f2['shift']());}}}(a42_0xf1f3,0xab858));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a42_0xf1f3(){const _0x3ac31c=['skip-imports','Omit\x20import\x20statements\x20from\x20generated\x20code','string','4106535HoXVqA','alias','codegen','code','95157EplQfW','2552690sRaqIZ','6354744qSmWik','boolean','sdk','1484959QItLZX','operation','120SnLSWt','645268aJbfLp','4793720HGQkRw','appCode','bool'];a42_0xf1f3=function(){return _0x3ac31c;};return a42_0xf1f3();}export const codegenSdk={'service':a42_0x4ed206(0xd9),'command':a42_0x4ed206(0xdf),'description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':'read','flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x4ed206(0xd8),'type':a42_0x4ed206(0xd6),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a42_0x4ed206(0xe1),'type':a42_0x4ed206(0xd6),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a42_0x4ed206(0xd4),'type':a42_0x4ed206(0xde),'description':a42_0x4ed206(0xd5)}],async 'execute'(_0x5790ee){const _0x4ac4f8=a42_0x4ed206,{dataset:_0x4c3b3c,operation:_0xe95ff2}=await getOperationDetail(_0x5790ee[_0x4ac4f8(0xd2)],_0x5790ee['str'](_0x4ac4f8(0xda)),_0x5790ee['str'](_0x4ac4f8(0xe1))),_0x300884=generateSdkCode(_0x4c3b3c,_0xe95ff2,{'includeImports':!_0x5790ee[_0x4ac4f8(0xd3)](_0x4ac4f8(0xd4))});return{'ok':!![],'data':{'dataset':{'name':_0x4c3b3c['name'],'code':_0x4c3b3c[_0x4ac4f8(0xda)],'tableName':_0x4c3b3c['tableName']},'operation':_0x5790ee['str']('operation'),'code':_0x300884}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a43_0x1d37(_0xbc35e6,_0x4d5502){_0xbc35e6=_0xbc35e6-0x14c;const _0x3f80ee=a43_0x3f80();let _0x1d3728=_0x3f80ee[_0xbc35e6];return _0x1d3728;}const a43_0x4c1cee=a43_0x1d37;(function(_0xb712b2,_0x32156d){const _0x1a074a=a43_0x1d37,_0x573e13=_0xb712b2();while(!![]){try{const _0x30af30=-parseInt(_0x1a074a(0x14d))/0x1+parseInt(_0x1a074a(0x15f))/0x2+-parseInt(_0x1a074a(0x15b))/0x3+parseInt(_0x1a074a(0x14f))/0x4+-parseInt(_0x1a074a(0x163))/0x5*(parseInt(_0x1a074a(0x157))/0x6)+parseInt(_0x1a074a(0x154))/0x7+-parseInt(_0x1a074a(0x15a))/0x8*(-parseInt(_0x1a074a(0x15c))/0x9);if(_0x30af30===_0x32156d)break;else _0x573e13['push'](_0x573e13['shift']());}catch(_0x341fa7){_0x573e13['push'](_0x573e13['shift']());}}}(a43_0x3f80,0x2f611));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0x4c1cee(0x155),'command':a43_0x4c1cee(0x14e),'description':a43_0x4c1cee(0x153),'risk':a43_0x4c1cee(0x160),'flags':[SQLCODE_FLAG,{'name':a43_0x4c1cee(0x14c),'type':a43_0x4c1cee(0x151),'description':a43_0x4c1cee(0x156),'default':a43_0x4c1cee(0x161),'enum':['sdk',a43_0x4c1cee(0x162)]},{'name':a43_0x4c1cee(0x164),'type':a43_0x4c1cee(0x15e),'description':a43_0x4c1cee(0x158)}],async 'execute'(_0x369b57){const _0x41f022=a43_0x4c1cee,_0x50eeeb=await getSqlQueryInfo(_0x369b57['appCode'],_0x369b57['str'](_0x41f022(0x150))),_0x5216a8=_0x369b57[_0x41f022(0x152)](_0x41f022(0x14c))||_0x41f022(0x161),_0x4208de=generateSqlCodeTemplate(_0x50eeeb,{'target':_0x5216a8,'includeImports':!_0x369b57[_0x41f022(0x159)](_0x41f022(0x164))});return{'ok':!![],'data':{'sqlCode':_0x50eeeb[_0x41f022(0x15d)],'sqlName':_0x50eeeb['sqlName'],'target':_0x5216a8,'code':_0x4208de}};}};function a43_0x3f80(){const _0x2feeee=['read','sdk','bff','399315FIrGTx','no-imports','target','383445kGYPBM','sql','1349052mxMUUh','sqlcode','string','str','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','2558647qNrOWe','codegen','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','12CvUjup','Omit\x20import\x20statements\x20from\x20generated\x20code','bool','24xvlTMP','795231QIVQqY','684441AJVtpT','sqlCode','boolean','142764vMXrnW'];a43_0x3f80=function(){return _0x2feeee;};return a43_0x3f80();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a44_0x137c(_0x186af0,_0x2c65f7){_0x186af0=_0x186af0-0x101;const _0xde12f4=a44_0xde12();let _0x137c9d=_0xde12f4[_0x186af0];return _0x137c9d;}(function(_0x48c3d0,_0x520361){const _0x483eb3=a44_0x137c,_0x51bd03=_0x48c3d0();while(!![]){try{const _0x31936b=-parseInt(_0x483eb3(0x12d))/0x1*(parseInt(_0x483eb3(0x11d))/0x2)+-parseInt(_0x483eb3(0x119))/0x3*(parseInt(_0x483eb3(0x10f))/0x4)+parseInt(_0x483eb3(0x11e))/0x5*(parseInt(_0x483eb3(0x12b))/0x6)+parseInt(_0x483eb3(0x106))/0x7*(parseInt(_0x483eb3(0x120))/0x8)+parseInt(_0x483eb3(0x11f))/0x9*(parseInt(_0x483eb3(0x11a))/0xa)+-parseInt(_0x483eb3(0x122))/0xb+-parseInt(_0x483eb3(0x12e))/0xc*(-parseInt(_0x483eb3(0x117))/0xd);if(_0x31936b===_0x520361)break;else _0x51bd03['push'](_0x51bd03['shift']());}catch(_0x8dcf46){_0x51bd03['push'](_0x51bd03['shift']());}}}(a44_0xde12,0xe6b1d));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';function a44_0xde12(){const _0x2be50d=['globalConfig','length','14AWKTdh','Removed\x20app\x20\x22','str','string','App\x20\x22','\x22\x20not\x20found.','bool','validation','\x22\x20(appcode:\x20','710744MIFfNr','project','Use\x20global\x20config\x20scope','defaultApp','Added','projectConfig','\x20<name>','\x20config.','22244781PPLvIK','boolean','24YOLaFY','10wYngGL','object','args','137674LSMIVh','39365FpyHug','14824449owEKhV','1290768NtrPAt','apps','14618164wflIat','\x20<name>\x20--appcode\x20<code>','trim','\x20app\x20\x22','inherit','\x20<name>\x20[--global]','App\x20code','global','Usage:\x20','588YkKgLc','\x20Set\x20as\x20default\x20app.','11uFxImU','12KMfFxV','Missing\x20app\x20name.','keys','appcode'];a44_0xde12=function(){return _0x2be50d;};return a44_0xde12();}import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x524cd1=a44_0x137c;return[{'name':_0x524cd1(0x103),'type':_0x524cd1(0x109),'description':_0x524cd1(0x128),'required':!![]},{'name':_0x524cd1(0x129),'type':_0x524cd1(0x118),'description':_0x524cd1(0x111),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x48ddb0=a44_0x137c;return[{'name':'global','type':'boolean','description':_0x48ddb0(0x111),'default':![]}];}export async function validateAppName(_0x75f04,_0x1012dd){const _0x3f0b88=a44_0x137c,_0x40c90d=_0x75f04[_0x3f0b88(0x11c)][0x0]?.[_0x3f0b88(0x124)]();if(!_0x40c90d)throw CliErrors[_0x3f0b88(0x10d)]('Missing\x20app\x20name.',_0x3f0b88(0x12a)+CLI_BIN_NAME+'\x20'+_0x1012dd+_0x3f0b88(0x115));}export async function runAppAdd(_0x92c62e,_0x40b978){const _0x339a72=a44_0x137c,_0x460640=_0x92c62e[_0x339a72(0x11c)][0x0]?.[_0x339a72(0x124)]();if(!_0x460640)throw CliErrors[_0x339a72(0x10d)](_0x339a72(0x101),_0x339a72(0x12a)+CLI_BIN_NAME+'\x20'+_0x40b978+'\x20<name>\x20--appcode\x20<code>');const _0x32636c=_0x92c62e[_0x339a72(0x108)](_0x339a72(0x103));if(!_0x32636c)throw CliErrors['flagMissing'](_0x339a72(0x103),_0x339a72(0x12a)+CLI_BIN_NAME+'\x20'+_0x40b978+_0x339a72(0x123));const _0x3246f4={'global':_0x92c62e[_0x339a72(0x10c)](_0x339a72(0x129))},_0x34f83d=readConfig(_0x3246f4);if(!_0x34f83d[_0x339a72(0x121)])_0x34f83d[_0x339a72(0x121)]={};const _0x525fbd={'appcode':_0x32636c,...collectAppProfileOverrides(_0x38ae91=>_0x92c62e[_0x339a72(0x108)](_0x38ae91))},_0x94292f=_0x34f83d['apps'],_0x5ca5b3=!!_0x94292f[_0x460640];_0x94292f[_0x460640]=_0x525fbd;if(!_0x34f83d['defaultApp'])_0x34f83d[_0x339a72(0x112)]=_0x460640;writeConfig(_0x34f83d,_0x3246f4);const _0x2722d5=!_0x5ca5b3&&_0x34f83d[_0x339a72(0x112)]===_0x460640?_0x339a72(0x12c):'',_0x1111e6=(_0x5ca5b3?'Updated':_0x339a72(0x113))+_0x339a72(0x125)+_0x460640+_0x339a72(0x10e)+_0x32636c+')'+scopeLabel(_0x3246f4)+'.'+_0x2722d5;return{'ok':!![],'message':_0x1111e6};}export async function runAppRemove(_0xf17564,_0x285d98){const _0x196249=a44_0x137c,_0x5c314f=_0xf17564['args'][0x0]?.[_0x196249(0x124)]();if(!_0x5c314f)throw CliErrors['validation'](_0x196249(0x101),_0x196249(0x12a)+CLI_BIN_NAME+'\x20'+_0x285d98+_0x196249(0x127));const _0x4545b7=_0xf17564['bool'](_0x196249(0x129)),{config:_0x1284ce,layers:_0x50e74f}=readRawConfigWithLayers(),_0x2d0cc5=_0x1284ce[_0x196249(0x121)]??{};if(!_0x2d0cc5[_0x5c314f])throw CliErrors[_0x196249(0x10d)](_0x196249(0x10a)+_0x5c314f+_0x196249(0x10b));const _0x327700=_0x50e74f[_0x196249(0x104)]['apps']&&typeof _0x50e74f[_0x196249(0x104)]['apps']===_0x196249(0x11b)?_0x50e74f['globalConfig'][_0x196249(0x121)]:{},_0x536fe6=_0x50e74f['projectConfig'][_0x196249(0x121)]&&typeof _0x50e74f[_0x196249(0x114)][_0x196249(0x121)]===_0x196249(0x11b)?_0x50e74f[_0x196249(0x114)][_0x196249(0x121)]:{},_0x3bba7d=appDefinedIn(_0x5c314f,_0x327700,_0x536fe6,_0x50e74f[_0x196249(0x114)][_0x196249(0x126)]===![]),_0x5a2451=resolveAppScopeForWrite(_0x5c314f,_0x4545b7,_0x50e74f),_0x29a154={'global':_0x5a2451===_0x196249(0x129)},_0xf2fe6=readConfig(_0x29a154),_0x4aa5cd=_0xf2fe6[_0x196249(0x121)];if(!_0x4aa5cd||!_0x4aa5cd[_0x5c314f])throw CliErrors[_0x196249(0x10d)](_0x196249(0x10a)+_0x5c314f+_0x196249(0x10b));delete _0x4aa5cd[_0x5c314f];let _0x56fd0e='';if(_0xf2fe6[_0x196249(0x112)]===_0x5c314f){const _0x25610b=Object[_0x196249(0x102)](_0x4aa5cd);_0xf2fe6[_0x196249(0x112)]=_0x25610b[_0x196249(0x105)]>0x0?_0x25610b[0x0]:undefined,_0xf2fe6[_0x196249(0x112)]?_0x56fd0e='\x20Default\x20app\x20changed\x20to\x20\x22'+_0xf2fe6['defaultApp']+'\x22.':delete _0xf2fe6[_0x196249(0x112)];}Object['keys'](_0x4aa5cd)['length']===0x0&&(delete _0xf2fe6['apps'],delete _0xf2fe6[_0x196249(0x112)]);writeConfig(_0xf2fe6,_0x29a154);const _0x463e92=_0x3bba7d==='both'?'\x20Note:\x20app\x20\x22'+_0x5c314f+'\x22\x20still\x20defined\x20in\x20'+(_0x5a2451===_0x196249(0x110)?_0x196249(0x129):_0x196249(0x110))+_0x196249(0x116):'';return{'ok':!![],'message':_0x196249(0x107)+_0x5c314f+'\x22'+scopeLabel(_0x29a154)+'.'+_0x56fd0e+_0x463e92};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xefd090,_0x2326f0){const _0x2150c9=a45_0x31d8,_0xce09c9=_0xefd090();while(!![]){try{const _0x21f318=parseInt(_0x2150c9(0xbf))/0x1*(parseInt(_0x2150c9(0xbb))/0x2)+parseInt(_0x2150c9(0xb1))/0x3*(parseInt(_0x2150c9(0xae))/0x4)+-parseInt(_0x2150c9(0xaa))/0x5*(parseInt(_0x2150c9(0xb3))/0x6)+parseInt(_0x2150c9(0xab))/0x7+-parseInt(_0x2150c9(0xad))/0x8*(-parseInt(_0x2150c9(0xb9))/0x9)+-parseInt(_0x2150c9(0xb2))/0xa+-parseInt(_0x2150c9(0xaf))/0xb*(-parseInt(_0x2150c9(0xbe))/0xc);if(_0x21f318===_0x2326f0)break;else _0xce09c9['push'](_0xce09c9['shift']());}catch(_0x3ed78d){_0xce09c9['push'](_0xce09c9['shift']());}}}(a45_0x2a4f,0x795d0));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x1f5e4d from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';function a45_0x31d8(_0x1f5824,_0x38f7da){_0x1f5824=_0x1f5824-0x9c;const _0x2a4f84=a45_0x2a4f();let _0x31d81e=_0x2a4f84[_0x1f5824];return _0x31d81e;}import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x3bd319=a45_0x31d8,_0x4591fb=await input({'message':_0x3bd319(0xa6),'validate':_0x3d6841=>{const _0x141e5b=_0x3bd319,_0x4077fc=validateAppcode(_0x3d6841[_0x141e5b(0x9d)]());return _0x4077fc[_0x141e5b(0xa4)]||_0x4077fc[_0x141e5b(0xbd)]||_0x141e5b(0x9f);}});return _0x4591fb[_0x3bd319(0x9d)]();}export async function promptAppSelection(_0x5797c5){const _0x5d4b9d=a45_0x31d8,_0x5d05c7=[{'name':a45_0x1f5e4d[_0x5d4b9d(0xa7)](_0x5d4b9d(0xa2)),'value':-0x1},..._0x5797c5[_0x5d4b9d(0xba)]((_0x42bac3,_0xf486de)=>({'name':_0x42bac3[_0x5d4b9d(0xb5)]+'\x20\x20'+a45_0x1f5e4d[_0x5d4b9d(0xa5)]('('+_0x42bac3[_0x5d4b9d(0x9c)]+')'),'value':_0xf486de}))],_0x1d1bbc=await checkbox({'message':'获取到\x20'+a45_0x1f5e4d['cyan'](_0x5797c5[_0x5d4b9d(0xbc)])+_0x5d4b9d(0xa9),'choices':_0x5d05c7,'loop':![]});if(_0x1d1bbc[_0x5d4b9d(0xa1)](-0x1))return _0x5d4b9d(0xac);if(_0x1d1bbc['length']===0x0)return _0x5d4b9d(0xac);return _0x1d1bbc[_0x5d4b9d(0xba)](_0x4b0544=>_0x5797c5[_0x4b0544]);}function a45_0x2a4f(){const _0xe4cee2=['746322PuOiJA','find','appName','(跳过,稍后配置)','\x0a未找到可用应用。','✎\x20手动输入','2061yuNXeS','map','223306mCrrTY','length','message','12pFyxjF','1fErrjW','skip','appCode','trim','正在获取可用应用列表...','Invalid\x20App\x20Code','\x0a无法获取远程应用列表,请手动输入。','includes','✎\x20自定义输入\x20appcode','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','valid','gray','请输入\x20App\x20Code:','yellow','App\x20Code:','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','35BLWdfn','6684881RnslTC','custom','26192YpyMqW','29384YEEfYS','517429pIhCBL','\x20\x20(','24zSJLwi','5543760KRNBEu'];a45_0x2a4f=function(){return _0xe4cee2;};return a45_0x2a4f();}export async function promptSingleAppSelection(_0x3d4ea0){const _0x29c4e3=a45_0x31d8,_0x1703c8=[{'name':a45_0x1f5e4d[_0x29c4e3(0xa5)](_0x29c4e3(0xa3)),'value':_0x29c4e3(0xc0)},{'name':a45_0x1f5e4d[_0x29c4e3(0xa7)](_0x29c4e3(0xa2)),'value':_0x29c4e3(0xac)},..._0x3d4ea0['map'](_0x26e1b9=>({'name':_0x26e1b9['appName']+'\x20\x20'+a45_0x1f5e4d[_0x29c4e3(0xa5)]('('+_0x26e1b9[_0x29c4e3(0x9c)]+')'),'value':_0x26e1b9[_0x29c4e3(0x9c)]}))],_0x172b2b=await select({'message':'请选择要绑定的应用:','choices':_0x1703c8});if(_0x172b2b===_0x29c4e3(0xc0))return _0x29c4e3(0xc0);if(_0x172b2b===_0x29c4e3(0xac))return _0x29c4e3(0xac);return _0x3d4ea0[_0x29c4e3(0xb4)](_0x468057=>_0x468057['appCode']===_0x172b2b);}export async function selectSingleAppcode(_0xbe9d8d){const _0x3c9dc8=a45_0x31d8;if(!_0xbe9d8d)return writeCliSideChannelLine(a45_0x1f5e4d[_0x3c9dc8(0xa5)]('(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)')),_fallbackOrSkip();writeCliSideChannelLine(_0x3c9dc8(0x9e));let _0x74f0d0;try{_0x74f0d0=await withActiveCookie(_0xbe9d8d,()=>listRemoteApps());}catch(_0x51d40b){writeCliSideChannelLine(a45_0x1f5e4d[_0x3c9dc8(0xa7)]('无法获取远程应用列表,请手动输入。'));if(_0x51d40b instanceof Error)writeCliSideChannelLine(a45_0x1f5e4d[_0x3c9dc8(0xa5)]('\x20\x20('+_0x51d40b['message']+')'));return _fallbackOrSkip();}if(_0x74f0d0[_0x3c9dc8(0xbc)]===0x0)return writeCliSideChannelLine(a45_0x1f5e4d['yellow']('未找到可用应用。')),_fallbackOrSkip();const _0x194542=await promptSingleAppSelection(_0x74f0d0);if(_0x194542===_0x3c9dc8(0xc0))return'';if(_0x194542===_0x3c9dc8(0xac))return promptCustomAppcode();return _0x194542[_0x3c9dc8(0x9c)];}export async function selectMultipleApps(_0x5df924){const _0x2bbb66=a45_0x31d8;writeCliSideChannelLine(_0x2bbb66(0x9e));let _0x1f1639;try{_0x1f1639=await withActiveCookie(_0x5df924,()=>listRemoteApps());}catch(_0x4cc148){writeCliSideChannelLine(_0x2bbb66(0xa0));if(_0x4cc148 instanceof Error)writeCliSideChannelLine(_0x2bbb66(0xb0)+_0x4cc148[_0x2bbb66(0xbd)]+')');return'custom';}if(_0x1f1639[_0x2bbb66(0xbc)]===0x0)return writeCliSideChannelLine(_0x2bbb66(0xb7)),_0x2bbb66(0xac);return promptAppSelection(_0x1f1639);}async function _fallbackOrSkip(){const _0x4c1129=a45_0x31d8,_0x276ec2=await select({'message':_0x4c1129(0xa8),'choices':[{'name':a45_0x1f5e4d['gray'](_0x4c1129(0xb6)),'value':'skip'},{'name':a45_0x1f5e4d[_0x4c1129(0xa7)](_0x4c1129(0xb8)),'value':'manual'}]});if(_0x276ec2===_0x4c1129(0xc0))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a46_0x26dc(_0x435016,_0x5088de){_0x435016=_0x435016-0x123;var _0x5eaac9=a46_0x5eaa();var _0x26dcef=_0x5eaac9[_0x435016];return _0x26dcef;}(function(_0x3a232a,_0x7f1f53){var _0x1e7b15=a46_0x26dc,_0x1d6308=_0x3a232a();while(!![]){try{var _0xff501b=-parseInt(_0x1e7b15(0x124))/0x1+-parseInt(_0x1e7b15(0x12a))/0x2+-parseInt(_0x1e7b15(0x12c))/0x3+-parseInt(_0x1e7b15(0x12e))/0x4*(-parseInt(_0x1e7b15(0x128))/0x5)+parseInt(_0x1e7b15(0x129))/0x6*(parseInt(_0x1e7b15(0x126))/0x7)+parseInt(_0x1e7b15(0x127))/0x8+-parseInt(_0x1e7b15(0x123))/0x9*(parseInt(_0x1e7b15(0x12f))/0xa);if(_0xff501b===_0x7f1f53)break;else _0x1d6308['push'](_0x1d6308['shift']());}catch(_0x1f3d78){_0x1d6308['push'](_0x1d6308['shift']());}}}(a46_0x5eaa,0x8ff5f));function a46_0x5eaa(){var _0x169e96=['818016WKTqOJ','defineProperties','1586424baFqwk','method','4jCicuR','6627540xRDDSS','9PijeCR','75917nIWGKG','description','7oZChCt','8478256VjKjNE','3028030rUvLum','3604572WDbfat'];a46_0x5eaa=function(){return _0x169e96;};return a46_0x5eaa();}export function asDryRunResult(_0x1a8827,_0x41b9b4){var _0x361ba7=a46_0x26dc;return Object[_0x361ba7(0x12b)](_0x1a8827,{'method':{'value':_0x41b9b4[_0x361ba7(0x12d)],'enumerable':![]},'url':{'value':_0x41b9b4['url'],'enumerable':![]},..._0x41b9b4[_0x361ba7(0x125)]?{'description':{'value':_0x41b9b4['description'],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x4b37cf=a47_0x6bdf;function a47_0x6bdf(_0x4e6c82,_0x4925ed){_0x4e6c82=_0x4e6c82-0x127;const _0x50aaea=a47_0x50aa();let _0x6bdfa6=_0x50aaea[_0x4e6c82];return _0x6bdfa6;}(function(_0x3fd491,_0x212706){const _0x3d93f9=a47_0x6bdf,_0x7bfd4c=_0x3fd491();while(!![]){try{const _0x34b5f6=parseInt(_0x3d93f9(0x130))/0x1*(parseInt(_0x3d93f9(0x127))/0x2)+parseInt(_0x3d93f9(0x128))/0x3+parseInt(_0x3d93f9(0x139))/0x4*(-parseInt(_0x3d93f9(0x12c))/0x5)+-parseInt(_0x3d93f9(0x12b))/0x6+parseInt(_0x3d93f9(0x12f))/0x7*(parseInt(_0x3d93f9(0x136))/0x8)+-parseInt(_0x3d93f9(0x140))/0x9*(parseInt(_0x3d93f9(0x138))/0xa)+-parseInt(_0x3d93f9(0x129))/0xb*(-parseInt(_0x3d93f9(0x13b))/0xc);if(_0x34b5f6===_0x212706)break;else _0x7bfd4c['push'](_0x7bfd4c['shift']());}catch(_0x4de46b){_0x7bfd4c['push'](_0x7bfd4c['shift']());}}}(a47_0x50aa,0xe8693));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a47_0x4b37cf(0x12d)};export const CODE_FLAG={'name':'code','type':a47_0x4b37cf(0x13c),'required':!![],'description':a47_0x4b37cf(0x132),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x4b37cf(0x12a),'description':a47_0x4b37cf(0x132)};export const SQLCODE_FLAG={'name':a47_0x4b37cf(0x12e),'type':a47_0x4b37cf(0x13c),'required':!![],'description':a47_0x4b37cf(0x135),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x4b37cf(0x137),'type':a47_0x4b37cf(0x13c),'required':![],'description':a47_0x4b37cf(0x13f)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x4b37cf(0x13d)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x4b37cf(0x13a),'required':!![],'description':a47_0x4b37cf(0x134)};function a47_0x50aa(){const _0x31914b=['67890ldVvzg','484pEDCQn','number','7116NDeyuH','string','App\x20code\x20(e.g.\x20app-xxxxx)','MYSQL','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','9DOxqAS','1453588JHCYGq','2330844pJZrgH','17193JeSdMx','datasetcode','8327010rLcHyj','43065hlwNqr','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','sqlcode','77119FiqSGK','2qtVicm','Database\x20product\x20type','Dataset\x20code\x20(32-char\x20hex\x20UUID)','dbtype','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','168yyrwWA','appcode'];a47_0x50aa=function(){return _0x31914b;};return a47_0x50aa();}export const DB_TYPE_FLAG={'name':a47_0x4b37cf(0x133),'type':a47_0x4b37cf(0x13c),'required':!![],'description':a47_0x4b37cf(0x131),'enum':[a47_0x4b37cf(0x13e),'POSTGRESQL']};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x39f40c,_0x4da75d){const _0x4476e8=a48_0x3162,_0x46dd84=_0x39f40c();while(!![]){try{const _0x2d5717=-parseInt(_0x4476e8(0xa6))/0x1*(-parseInt(_0x4476e8(0xb1))/0x2)+-parseInt(_0x4476e8(0xab))/0x3*(parseInt(_0x4476e8(0xb8))/0x4)+parseInt(_0x4476e8(0xa9))/0x5+parseInt(_0x4476e8(0xa5))/0x6+parseInt(_0x4476e8(0xb7))/0x7+-parseInt(_0x4476e8(0xad))/0x8+parseInt(_0x4476e8(0xaa))/0x9*(-parseInt(_0x4476e8(0xb3))/0xa);if(_0x2d5717===_0x4da75d)break;else _0x46dd84['push'](_0x46dd84['shift']());}catch(_0x246d0b){_0x46dd84['push'](_0x46dd84['shift']());}}}(a48_0x11b4,0xd2797));import{existsSync,statSync}from'node:fs';function a48_0x11b4(){const _0x127b19=['size','2491056FoYyBE','trim','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','toFixed','14116GgRgvf','File\x20not\x20found:\x20','5899240bLmNsb','validation','ceil','isFile','7316974FiUsOB','1928olftes','8906358zfjCkT','60zZCNzj','\x20MB','\x20path\x20is\x20required.','8423630HaRDHJ','45KMLyKG','3204WmQzUo'];a48_0x11b4=function(){return _0x127b19;};return a48_0x11b4();}import{CliErrors}from'../../errors.js';function a48_0x3162(_0x132594,_0x5f0a43){_0x132594=_0x132594-0xa5;const _0x11b422=a48_0x11b4();let _0x31628c=_0x11b422[_0x132594];return _0x31628c;}const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x3d709a){const _0x4d3111=a48_0x3162;if(_0x3d709a>=BYTES_PER_MB){const _0x2cb322=Math[_0x4d3111(0xb5)](_0x3d709a/BYTES_PER_MB*0x64)/0x64;return _0x2cb322[_0x4d3111(0xb0)](0x2)+_0x4d3111(0xa7);}return _0x3d709a+'\x20B';}export function requireDevelopmentUploadFile(_0x1d16eb,_0x4f66f5){const _0x1b9ad7=a48_0x3162,_0x1cf0e4=_0x1d16eb[_0x1b9ad7(0xae)]();if(!_0x1cf0e4)throw CliErrors[_0x1b9ad7(0xb4)](_0x4f66f5+_0x1b9ad7(0xa8));if(!existsSync(_0x1cf0e4))throw CliErrors['validation'](_0x1b9ad7(0xb2)+_0x1cf0e4);const _0x241fb3=statSync(_0x1cf0e4);if(!_0x241fb3[_0x1b9ad7(0xb6)]())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x1cf0e4);if(_0x241fb3['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x1b9ad7(0xb4)](_0x1b9ad7(0xaf)+_0x1cf0e4+'\x20('+formatBytes(_0x241fb3[_0x1b9ad7(0xac)])+')');return{'path':_0x1cf0e4,'size':_0x241fb3['size']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a49_0x5717(_0x86a29a,_0x350d57){_0x86a29a=_0x86a29a-0x1f4;const _0x18080b=a49_0x1808();let _0x57175e=_0x18080b[_0x86a29a];return _0x57175e;}function a49_0x1808(){const _0x689518=['6270645HomvLY','217194FnGgAw','3507710Tbfsjw','3780824TNQTTH','11884XldzsK','test','trim','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','1nnsaiG','27BaOlvr','91vAFcAv','length','App\x20Code\x20cannot\x20exceed\x20100\x20characters','891fuCsmi','8273595UBAsOf','3293788UDEuGm'];a49_0x1808=function(){return _0x689518;};return a49_0x1808();}(function(_0x39264a,_0xe49be5){const _0x44a112=a49_0x5717,_0x5322c2=_0x39264a();while(!![]){try{const _0x45cd61=parseInt(_0x44a112(0x203))/0x1*(parseInt(_0x44a112(0x1fa))/0x2)+-parseInt(_0x44a112(0x1f8))/0x3*(-parseInt(_0x44a112(0x1ff))/0x4)+-parseInt(_0x44a112(0x1fb))/0x5+parseInt(_0x44a112(0x1fc))/0x6*(-parseInt(_0x44a112(0x1f5))/0x7)+parseInt(_0x44a112(0x1fe))/0x8+-parseInt(_0x44a112(0x1f4))/0x9*(parseInt(_0x44a112(0x1fd))/0xa)+parseInt(_0x44a112(0x1f9))/0xb;if(_0x45cd61===_0xe49be5)break;else _0x5322c2['push'](_0x5322c2['shift']());}catch(_0x499abc){_0x5322c2['push'](_0x5322c2['shift']());}}}(a49_0x1808,0xee868));export function validateAppcode(_0x3d1a93){const _0x4c715d=a49_0x5717,_0x261d27=_0x3d1a93[_0x4c715d(0x201)]();if(!_0x261d27)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x261d27[_0x4c715d(0x1f6)]>0x64)return{'valid':![],'message':_0x4c715d(0x1f7)};if(!/^[A-Za-z0-9_-]+$/[_0x4c715d(0x200)](_0x261d27))return{'valid':![],'message':_0x4c715d(0x202)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x4d319c=a50_0x40f5;(function(_0x515e57,_0xe14245){const _0x2aaf74=a50_0x40f5,_0x474d30=_0x515e57();while(!![]){try{const _0xdcf9db=parseInt(_0x2aaf74(0x108))/0x1+parseInt(_0x2aaf74(0xfa))/0x2*(parseInt(_0x2aaf74(0x104))/0x3)+parseInt(_0x2aaf74(0x10b))/0x4+-parseInt(_0x2aaf74(0xfe))/0x5*(-parseInt(_0x2aaf74(0xfc))/0x6)+-parseInt(_0x2aaf74(0x101))/0x7+parseInt(_0x2aaf74(0xff))/0x8*(-parseInt(_0x2aaf74(0x10c))/0x9)+-parseInt(_0x2aaf74(0x10a))/0xa;if(_0xdcf9db===_0xe14245)break;else _0x474d30['push'](_0x474d30['shift']());}catch(_0x382ae5){_0x474d30['push'](_0x474d30['shift']());}}}(a50_0x45a8,0xdeb64));function a50_0x45a8(){const _0x31e05e=['Usage:\x20','Missing\x20key.','1335507CdRhuW','validation','15104070KHoPRP','1418876axLglN','7217298mCIZki','app','string','Get\x20a\x20config\x20value\x20by\x20key','config','970oAXaiN','Key\x20not\x20found:\x20','4482MCYjdX','object','8075JUXPjk','8HLqcOu','\x20config\x20get\x20--key\x20<key>','2518628keYeDo','read','key','4254CkapnH','str'];a50_0x45a8=function(){return _0x31e05e;};return a50_0x45a8();}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a50_0x40f5(_0x24a660,_0x14b59a){_0x24a660=_0x24a660-0xfa;const _0x45a886=a50_0x45a8();let _0x40f594=_0x45a886[_0x24a660];return _0x40f594;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x465739){const _0x1db45b=a50_0x40f5,_0xaca7b3=_0x465739[_0x1db45b(0x105)](_0x1db45b(0x103));if(!_0xaca7b3)throw CliErrors[_0x1db45b(0x109)](_0x1db45b(0x107),_0x1db45b(0x106)+CLI_BIN_NAME+_0x1db45b(0x100));const _0x4171e8=readConfig(),_0x380e65=_0xaca7b3===_0x1db45b(0x10d)?'appcode':_0xaca7b3,_0x38a82d=_0x4171e8[_0x380e65];if(_0x38a82d===undefined)throw CliErrors['validation'](_0x1db45b(0xfb)+_0xaca7b3);return{'ok':!![],'data':typeof _0x38a82d===_0x1db45b(0xfd)?_0x38a82d:{[_0x380e65]:_0x38a82d},'message':typeof _0x38a82d===_0x1db45b(0xfd)?undefined:String(_0x38a82d)};}export const configGetDefinition={'service':a50_0x4d319c(0x110),'command':'get','description':a50_0x4d319c(0x10f),'risk':a50_0x4d319c(0x102),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a50_0x4d319c(0x10e),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a51_0x42e7(){const _0x1852c6=['2993816XtEArd','5842720wiylnr','944040nBrhTK','8525489kEMBnU','3044451MilNov','1254649SMyCSy','6210324KPGQVg'];a51_0x42e7=function(){return _0x1852c6;};return a51_0x42e7();}(function(_0x4de4a7,_0x9011da){const _0x2d0ea4=a51_0x1f91,_0x465ac6=_0x4de4a7();while(!![]){try{const _0x38bf9e=parseInt(_0x2d0ea4(0x7b))/0x1+parseInt(_0x2d0ea4(0x78))/0x2+parseInt(_0x2d0ea4(0x7a))/0x3+-parseInt(_0x2d0ea4(0x76))/0x4+-parseInt(_0x2d0ea4(0x77))/0x5+parseInt(_0x2d0ea4(0x75))/0x6+-parseInt(_0x2d0ea4(0x79))/0x7;if(_0x38bf9e===_0x9011da)break;else _0x465ac6['push'](_0x465ac6['shift']());}catch(_0x39e38a){_0x465ac6['push'](_0x465ac6['shift']());}}}(a51_0x42e7,0x9ca4f));import{configListDefinition}from'../../commands/config/list.js';function a51_0x1f91(_0x3ff59b,_0x548100){_0x3ff59b=_0x3ff59b-0x75;const _0x42e76a=a51_0x42e7();let _0x1f910c=_0x42e76a[_0x3ff59b];return _0x1f910c;}import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a52_0x201284=a52_0x37d4;(function(_0x33164f,_0x116bbb){const _0x42ff4c=a52_0x37d4,_0x125d52=_0x33164f();while(!![]){try{const _0x4789c6=-parseInt(_0x42ff4c(0xfa))/0x1+parseInt(_0x42ff4c(0xf9))/0x2*(parseInt(_0x42ff4c(0x105))/0x3)+-parseInt(_0x42ff4c(0xff))/0x4*(parseInt(_0x42ff4c(0xfe))/0x5)+parseInt(_0x42ff4c(0xfb))/0x6*(-parseInt(_0x42ff4c(0xf7))/0x7)+-parseInt(_0x42ff4c(0x103))/0x8+-parseInt(_0x42ff4c(0xf8))/0x9+parseInt(_0x42ff4c(0x104))/0xa;if(_0x4789c6===_0x116bbb)break;else _0x125d52['push'](_0x125d52['shift']());}catch(_0x3818f2){_0x125d52['push'](_0x125d52['shift']());}}}(a52_0x92fb,0xeb29f));function a52_0x37d4(_0x3544c7,_0xcc8b34){_0x3544c7=_0x3544c7-0xf7;const _0x92fb31=a52_0x92fb();let _0x37d46e=_0x92fb31[_0x3544c7];return _0x37d46e;}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x2d5230){const _0x4a2eca=a52_0x37d4,_0x8a950b=_0x2d5230['bool'](_0x4a2eca(0x106))?readScopedConfig(_0x4a2eca(0x106)):readConfig();return{'ok':!![],'data':_0x8a950b};}export const configListDefinition={'service':a52_0x201284(0xfc),'command':a52_0x201284(0x101),'description':a52_0x201284(0x102),'risk':a52_0x201284(0xfd),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x201284(0x106),'type':'boolean','description':a52_0x201284(0x100),'default':![]}],'execute':execute};function a52_0x92fb(){const _0x28ff17=['3629025SEdthQ','61916Lcojzs','32485qVgFYc','6agAzLr','config','read','5995Ghggvi','752jeRhKd','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','list','List\x20all\x20config\x20values','15156128DOjytm','28849680ajWLLP','120YkYYwZ','global','4230933qTLIgC'];a52_0x92fb=function(){return _0x28ff17;};return a52_0x92fb();}
|