@lovrabet/rabetbase-cli 2.1.13 → 2.1.14-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.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-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-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/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 -0
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -1
- package/lib/commands/dataset/link-delete.js +1 -1
- package/lib/commands/dataset/link-shared.js +1 -1
- package/lib/commands/dataset/link-update.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/rename.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/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/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/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/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/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.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/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.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/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/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a32_0x2580f6=a32_0x16c4;(function(_0x41d9f2,_0x2383ac){const _0x556c59=a32_0x16c4,_0xab39cc=_0x41d9f2();while(!![]){try{const _0x51e3e3=parseInt(_0x556c59(0x127))/0x1+parseInt(_0x556c59(0x125))/0x2*(parseInt(_0x556c59(0x14e))/0x3)+parseInt(_0x556c59(0x146))/0x4+-parseInt(_0x556c59(0x148))/0x5+parseInt(_0x556c59(0x11a))/0x6+-parseInt(_0x556c59(0x11c))/0x7+-parseInt(_0x556c59(0x144))/0x8;if(_0x51e3e3===_0x2383ac)break;else _0xab39cc['push'](_0xab39cc['shift']());}catch(_0x4fa83a){_0xab39cc['push'](_0xab39cc['shift']());}}}(a32_0x249c,0x1b06f));import{readFile}from'node:fs/promises';function a32_0x249c(){const _0x3f10e7=['--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','map','\x20skipped,\x20','scriptsRoot','Runtime\x20script\x20cache\x20cleared.','datasetCode','appCode','has','Push\x20complete:\x20','filter','\x22\x20not\x20found\x20after\x20ensureLockScope.','message','length','alias','remoteId','datasetCodeToDataset','join','Push\x20only\x20this\x20script\x20type','functionNode','type','parse','attempted','every','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','string','script','str','get','aliasToDatasetCode','1017936zrWiMe','Lock\x20scope\x20for\x20app\x20\x22','75516dGcdAv','runtime\x20cache\x20cleared','apps','status',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','functions','push','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','cleared','2UQfVOq','/api/management/library/scripts/save','66935dtgKGX','\x22.\x20','COMMON','unchanged','toISOString','description','name','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','lockFilePath','version','\x20uploaded,\x20','operationType','hash','runtime\x20cache\x20not\x20needed','POST','datasetId','BFF\x20HOOK\x20','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','utf8','Cannot\x20resolve\x20dataset\x20for\x20\x22','Run\x20`','validation','Would\x20inspect\x20','high-risk-write','HOOK','\x20failed,\x20','boolean','would_push','bool','2304816byjhbp','force','495492Ofaxca','some','738360sxReZK','set','lockKey','filePath','ENDPOINT','create','590403PbXVij'];a32_0x249c=function(){return _0x3f10e7;};return a32_0x249c();}import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{assertDatasetSupportsLocalDevelopment}from'../../commands/dataset/capability.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':a32_0x2580f6(0x122),'description':'Push\x20local\x20BFF\x20scripts\x20to\x20remote','risk':a32_0x2580f6(0x13e),'flags':[{'name':a32_0x2580f6(0x162),'type':'string','description':a32_0x2580f6(0x160),'enum':[a32_0x2580f6(0x129),a32_0x2580f6(0x14c),a32_0x2580f6(0x13f)]},{'name':'name','type':a32_0x2580f6(0x167),'description':a32_0x2580f6(0x123)},{'name':a32_0x2580f6(0x145),'type':a32_0x2580f6(0x141),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x3ae7d5){const _0x4ee342=a32_0x2580f6,_0x1868fe=loadBffProjectConfig(_0x3ae7d5['appCode']),_0x31da66=await readBffLockFile(_0x1868fe[_0x4ee342(0x12f)]),{appLock:_0x35c97e}=ensureLockScope(_0x31da66??createEmptyBffLock(),_0x3ae7d5[_0x4ee342(0x155)],_0x1868fe['scriptsRoot'],_0x4ee342(0x122)),_0xd9533f=await getTargetFunctions(_0x1868fe,_0x3ae7d5),_0x465ffd=_0x3ae7d5[_0x4ee342(0x143)](_0x4ee342(0x145)),_0x83fca=[];for(const _0x4ef4c4 of _0xd9533f){const _0x39f956=await computeFileHash(_0x4ef4c4[_0x4ee342(0x14b)]),_0x87f57a=_0x35c97e['functions'][_0x4ef4c4[_0x4ee342(0x14a)]],_0x3c0814=!!_0x87f57a&&_0x87f57a['hash']===_0x39f956;_0x83fca['push']({'lockKey':_0x4ef4c4[_0x4ee342(0x14a)],'filePath':_0x4ef4c4[_0x4ee342(0x14b)],'remoteId':_0x87f57a?.[_0x4ee342(0x15d)]??null,'mode':_0x87f57a?.[_0x4ee342(0x15d)]?'update':_0x4ee342(0x14d),'status':!_0x465ffd&&_0x3c0814?_0x4ee342(0x12a):'would_push'});}return{'method':_0x4ee342(0x135),'url':_0x4ee342(0x126),'body':{'appCode':_0x3ae7d5[_0x4ee342(0x155)],'force':_0x465ffd,'files':_0x83fca,'cacheClearAtRuntime':_0x83fca['some'](_0x66b09d=>_0x66b09d[_0x4ee342(0x11f)]===_0x4ee342(0x142)),'cacheClearAtRuntimeTimes':_0x83fca[_0x4ee342(0x147)](_0x2e1f40=>_0x2e1f40[_0x4ee342(0x11f)]===_0x4ee342(0x142))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x4ee342(0x13d)+_0x83fca[_0x4ee342(0x15b)]+_0x4ee342(0x166)};},async 'execute'(_0x460d08){const _0x3ceab0=a32_0x2580f6,_0x74767=loadBffProjectConfig(_0x460d08[_0x3ceab0(0x155)]),_0x2aab62=await readBffLockFile(_0x74767[_0x3ceab0(0x12f)]),{lockData:_0x46c05c,appLock:_0x455bd8}=ensureLockScope(_0x2aab62??createEmptyBffLock(),_0x460d08['appCode'],_0x74767[_0x3ceab0(0x152)],'push'),_0x3af2bf=await getTargetFunctions(_0x74767,_0x460d08);if(_0x3af2bf[_0x3ceab0(0x15b)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x17b576=_0x460d08[_0x3ceab0(0x143)](_0x3ceab0(0x145)),_0x2ffb5a=JSON[_0x3ceab0(0x163)](JSON['stringify'](_0x46c05c)),_0x38af74=_0x2ffb5a[_0x3ceab0(0x11e)][_0x460d08[_0x3ceab0(0x155)]];if(!_0x38af74)throw new Error(_0x3ceab0(0x11b)+_0x460d08[_0x3ceab0(0x155)]+_0x3ceab0(0x159));const _0x2d16aa=await buildHookMaps(_0x460d08['appCode'],_0x460d08['apiDir'],_0x3af2bf,_0x38af74),_0xc74302=[],_0x30e5d8=[],_0x535fee=[];for(const _0x45646e of _0x3af2bf){const _0x366fe1=await computeFileHash(_0x45646e['filePath']),_0x30ee6c=_0x38af74[_0x3ceab0(0x121)][_0x45646e[_0x3ceab0(0x14a)]];if(!_0x17b576&&_0x30ee6c&&_0x30ee6c[_0x3ceab0(0x133)]===_0x366fe1){_0x30e5d8[_0x3ceab0(0x122)]({'lockKey':_0x45646e[_0x3ceab0(0x14a)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x460d08[_0x3ceab0(0x155)],_0x45646e,_0x38af74,_0x2d16aa);const _0x5e40a6=_0x38af74['functions'][_0x45646e['lockKey']];_0xc74302[_0x3ceab0(0x122)]({'lockKey':_0x45646e[_0x3ceab0(0x14a)],'remoteId':_0x5e40a6?.[_0x3ceab0(0x15d)]??0x0});}catch(_0x59871b){_0x535fee[_0x3ceab0(0x122)]({'lockKey':_0x45646e[_0x3ceab0(0x14a)],'error':_0x59871b instanceof Error?_0x59871b['message']:String(_0x59871b)});}}_0x38af74['lastSync']=new Date()[_0x3ceab0(0x12b)](),await writeBffLockFile(_0x74767[_0x3ceab0(0x12f)],_0x2ffb5a),await waitForUploadedLockEntries(_0x74767['lockFilePath'],_0x460d08['appCode'],_0xc74302[_0x3ceab0(0x150)](_0x3dc0f6=>_0x3dc0f6[_0x3ceab0(0x14a)]));let _0x13e375={'attempted':![],'cleared':![]};if(_0xc74302[_0x3ceab0(0x15b)]>0x0)try{let _0x10cb77='';for(let _0x1c0a85=0x0;_0x1c0a85<CACHE_CLEAR_ATTEMPTS;_0x1c0a85+=0x1){_0x10cb77=await clearBffScriptCache(),_0x1c0a85<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x13e375={'attempted':!![],'cleared':!![],'message':_0x10cb77||_0x3ceab0(0x153)};}catch(_0x28d796){_0x13e375={'attempted':!![],'cleared':![],'error':_0x28d796 instanceof Error?_0x28d796[_0x3ceab0(0x15a)]:String(_0x28d796)};}const _0x3b3945=_0x535fee['length']===0x0&&(_0x13e375[_0x3ceab0(0x164)]?_0x13e375['cleared']:!![]),_0x546177=_0x13e375[_0x3ceab0(0x164)]?_0x13e375[_0x3ceab0(0x124)]?_0x3ceab0(0x11d):'runtime\x20cache\x20clear\x20failed':_0x3ceab0(0x134);return{'ok':_0x3b3945,'data':{'uploaded':_0xc74302,'skipped':_0x30e5d8,'failed':_0x535fee,'cacheClear':_0x13e375},'message':_0x3ceab0(0x157)+_0xc74302[_0x3ceab0(0x15b)]+_0x3ceab0(0x131)+_0x30e5d8[_0x3ceab0(0x15b)]+_0x3ceab0(0x151)+_0x535fee[_0x3ceab0(0x15b)]+_0x3ceab0(0x140)+_0x546177};}};function a32_0x16c4(_0x4b9920,_0x93edc6){_0x4b9920=_0x4b9920-0x118;const _0x249c78=a32_0x249c();let _0x16c436=_0x249c78[_0x4b9920];return _0x16c436;}async function getTargetFunctions(_0x455ff5,_0x2a1971){const _0x7b0bce=a32_0x2580f6,_0x2aa109=_0x2a1971[_0x7b0bce(0x169)]('type'),_0x269ca1=_0x2a1971[_0x7b0bce(0x169)]('name'),_0x4c6956=normalizeBffType(_0x2aa109)??undefined;if(_0x269ca1&&!_0x4c6956)throw CliErrors[_0x7b0bce(0x13c)](_0x7b0bce(0x14f));const _0x2af421=await scanLocalBffFunctions(_0x455ff5,_0x4c6956);if(_0x269ca1){const _0x21e5ca=_0x2af421[_0x7b0bce(0x158)](_0x6ab4c6=>_0x6ab4c6[_0x7b0bce(0x12d)]===_0x269ca1);if(_0x21e5ca[_0x7b0bce(0x15b)]===0x0)throw CliErrors[_0x7b0bce(0x13c)]('Local\x20function\x20not\x20found:\x20'+_0x4c6956+'/'+_0x269ca1);return _0x21e5ca;}return _0x2af421;}async function buildHookMaps(_0x45b9b2,_0x4ce27a,_0x5eb397,_0x9297b6){const _0x5121d1=a32_0x2580f6,_0x5cd41b=_0x5eb397[_0x5121d1(0x147)](_0x4a0cca=>_0x4a0cca[_0x5121d1(0x162)]===_0x5121d1(0x13f));if(!_0x5cd41b)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0xbbc55d=loadAliasMap(_0x4ce27a,undefined,resolveApiFilePath(_0x4ce27a,_0x45b9b2)),_0x4c9d3c=new Map(_0xbbc55d[_0x5121d1(0x150)](_0x622b9b=>[_0x622b9b[_0x5121d1(0x15c)],_0x622b9b['datasetCode']]));for(const _0x371eea of Object['values'](_0x9297b6[_0x5121d1(0x121)])){_0x371eea['alias']&&_0x371eea[_0x5121d1(0x154)]&&!_0x4c9d3c['has'](_0x371eea['alias'])&&_0x4c9d3c[_0x5121d1(0x149)](_0x371eea[_0x5121d1(0x15c)],_0x371eea[_0x5121d1(0x154)]);}const _0x491baf=await listDatasets(_0x45b9b2),_0xc6931e=new Map(_0x491baf[_0x5121d1(0x150)](_0x487196=>[_0x487196['code'],_0x487196]));return{'aliasToDatasetCode':_0x4c9d3c,'datasetCodeToDataset':_0xc6931e};}async function uploadSingleFunction(_0x3dbddf,_0x3400af,_0x501390,_0x3ace8e){const _0x170648=a32_0x2580f6,_0x5b7df2=await readFile(_0x3400af['filePath'],_0x170648(0x139)),_0x1a1d85=await computeFileHash(_0x3400af[_0x170648(0x14b)]),_0x1b7b54=_0x501390[_0x170648(0x121)][_0x3400af[_0x170648(0x14a)]];if(_0x1b7b54?.['remoteId']&&_0x1b7b54['version']==null)throw CliErrors['validation'](_0x3400af[_0x170648(0x14a)]+_0x170648(0x120));let _0x410268=extractScriptDescription(_0x5b7df2);if(!_0x410268&&_0x1b7b54?.[_0x170648(0x15d)]){const _0x5e6152=await getBffScriptInfo(_0x1b7b54[_0x170648(0x15d)]);_0x410268=_0x5e6152[_0x170648(0x12c)]||undefined;}const _0x46730d={'appCode':_0x3dbddf,'functionName':_0x3400af[_0x170648(0x12d)],'scriptType':_0x3400af['type'],'scriptContent':_0x5b7df2};if(_0x1b7b54?.['remoteId'])_0x46730d['id']=_0x1b7b54[_0x170648(0x15d)];if(_0x1b7b54?.['version']!=null)_0x46730d[_0x170648(0x130)]=_0x1b7b54[_0x170648(0x130)];if(_0x410268)_0x46730d['description']=_0x410268;if(_0x3400af[_0x170648(0x162)]===_0x170648(0x13f)){const _0x41811b=_0x3400af[_0x170648(0x15c)];if(!_0x41811b||!_0x3400af[_0x170648(0x132)]||!_0x3400af[_0x170648(0x161)])throw CliErrors[_0x170648(0x13c)]('Incomplete\x20HOOK\x20path:\x20'+_0x3400af[_0x170648(0x14a)]);const _0x2cc0b0=_0x3ace8e['aliasToDatasetCode'][_0x170648(0x118)](_0x41811b)??_0x1b7b54?.[_0x170648(0x154)]??_0x41811b,_0x46e19d=_0x3ace8e[_0x170648(0x15e)][_0x170648(0x118)](_0x2cc0b0);if(!_0x46e19d)throw CliErrors[_0x170648(0x13c)](_0x170648(0x13a)+_0x41811b+_0x170648(0x128)+(_0x170648(0x13b)+CLI_BIN_NAME+_0x170648(0x12e)));assertDatasetSupportsLocalDevelopment(_0x46e19d,_0x170648(0x137)+_0x3400af[_0x170648(0x14a)]),_0x46730d[_0x170648(0x136)]=_0x46e19d['id'],_0x46730d['operationType']=_0x3400af[_0x170648(0x132)],_0x46730d[_0x170648(0x161)]=_0x3400af[_0x170648(0x161)];}const _0x4aebc9=await saveBffScript(_0x46730d),_0x5193ba=_0x4aebc9['id'],_0x246a73=_0x4aebc9[_0x170648(0x168)]??await getBffScriptInfo(_0x5193ba),_0x554efd={'hash':_0x1a1d85,'remoteId':_0x5193ba,'version':_0x246a73[_0x170648(0x130)]};if(_0x3400af[_0x170648(0x162)]===_0x170648(0x13f)){const _0x292cbd=_0x3400af[_0x170648(0x15c)],_0x2b2e27=_0x3ace8e[_0x170648(0x119)][_0x170648(0x118)](_0x292cbd)??_0x1b7b54?.[_0x170648(0x154)]??_0x292cbd;_0x3ace8e['aliasToDatasetCode'][_0x170648(0x156)](_0x292cbd)?_0x554efd['alias']=_0x292cbd:_0x554efd[_0x170648(0x15c)]=_0x1b7b54?.[_0x170648(0x15c)],_0x554efd[_0x170648(0x154)]=_0x2b2e27,_0x554efd[_0x170648(0x132)]=_0x3400af[_0x170648(0x132)],_0x554efd[_0x170648(0x161)]=_0x3400af['functionNode'];}_0x501390[_0x170648(0x121)][_0x3400af[_0x170648(0x14a)]]=_0x554efd;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x40388a,_0x1c9962,_0x5f3aea){const _0x2c4d0e=a32_0x2580f6;if(_0x5f3aea['length']===0x0)return;for(let _0x965709=0x0;_0x965709<LOCK_SETTLE_RETRY_COUNT;_0x965709+=0x1){const _0x3f62e4=await readBffLockFile(_0x40388a),_0x1a2482=_0x3f62e4?.[_0x2c4d0e(0x11e)]?.[_0x1c9962]?.[_0x2c4d0e(0x121)]??{},_0x4f0286=_0x5f3aea[_0x2c4d0e(0x165)](_0x55ca54=>!!_0x1a2482[_0x55ca54]?.['remoteId']);if(_0x4f0286)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x2c4d0e(0x138)+_0x5f3aea[_0x2c4d0e(0x15f)](',\x20')+'.');}
|
|
1
|
+
const a32_0x43c580=a32_0x553c;(function(_0x46951e,_0x4a3420){const _0x8ae675=a32_0x553c,_0x117f81=_0x46951e();while(!![]){try{const _0x3755c3=parseInt(_0x8ae675(0x9c))/0x1+-parseInt(_0x8ae675(0xa5))/0x2+-parseInt(_0x8ae675(0xb9))/0x3*(-parseInt(_0x8ae675(0xb3))/0x4)+-parseInt(_0x8ae675(0x84))/0x5*(parseInt(_0x8ae675(0xb2))/0x6)+parseInt(_0x8ae675(0x9a))/0x7+-parseInt(_0x8ae675(0xc5))/0x8+parseInt(_0x8ae675(0x7d))/0x9;if(_0x3755c3===_0x4a3420)break;else _0x117f81['push'](_0x117f81['shift']());}catch(_0x2a45a3){_0x117f81['push'](_0x117f81['shift']());}}}(a32_0x447b,0x3624e));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';function a32_0x553c(_0x3b78b5,_0x3a846b){_0x3b78b5=_0x3b78b5-0x79;const _0x447b9d=a32_0x447b();let _0x553ca1=_0x447b9d[_0x3b78b5];return _0x553ca1;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{assertDatasetSupportsLocalDevelopment}from'../../commands/dataset/capability.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':a32_0x43c580(0xc0),'description':a32_0x43c580(0x9d),'risk':a32_0x43c580(0x7e),'flags':[{'name':a32_0x43c580(0xb6),'type':a32_0x43c580(0x88),'description':a32_0x43c580(0x9b),'enum':[a32_0x43c580(0x7c),'ENDPOINT',a32_0x43c580(0x89)]},{'name':a32_0x43c580(0x8a),'type':a32_0x43c580(0x88),'description':a32_0x43c580(0x99)},{'name':'force','type':a32_0x43c580(0xbc),'description':a32_0x43c580(0x8e)}],async 'dryRun'(_0x5d854e){const _0x5674d6=a32_0x43c580,_0x3ec778=loadBffProjectConfig(_0x5d854e[_0x5674d6(0xbe)]),_0x4fef0f=await readBffLockFile(_0x3ec778[_0x5674d6(0xa2)]),{appLock:_0x20e5db}=ensureLockScope(_0x4fef0f??createEmptyBffLock(),_0x5d854e['appCode'],_0x3ec778[_0x5674d6(0xa8)],'push'),_0x2dfad5=await getTargetFunctions(_0x3ec778,_0x5d854e),_0x562cef=_0x5d854e[_0x5674d6(0xa3)](_0x5674d6(0xcb)),_0x26bcb0=[];for(const _0x4ac246 of _0x2dfad5){const _0x513560=await computeFileHash(_0x4ac246['filePath']),_0x1d4dbf=_0x20e5db[_0x5674d6(0xb0)][_0x4ac246[_0x5674d6(0x97)]],_0x1f9c98=!!_0x1d4dbf&&_0x1d4dbf[_0x5674d6(0xc7)]===_0x513560;_0x26bcb0[_0x5674d6(0xc0)]({'lockKey':_0x4ac246[_0x5674d6(0x97)],'filePath':_0x4ac246[_0x5674d6(0xca)],'remoteId':_0x1d4dbf?.[_0x5674d6(0xb5)]??null,'mode':_0x1d4dbf?.[_0x5674d6(0xb5)]?'update':_0x5674d6(0x8f),'status':!_0x562cef&&_0x1f9c98?_0x5674d6(0x8c):_0x5674d6(0xa1)});}return{'method':_0x5674d6(0x91),'url':_0x5674d6(0xa9),'body':{'appCode':_0x5d854e[_0x5674d6(0xbe)],'force':_0x562cef,'files':_0x26bcb0,'cacheClearAtRuntime':_0x26bcb0[_0x5674d6(0x93)](_0x1c290f=>_0x1c290f['status']===_0x5674d6(0xa1)),'cacheClearAtRuntimeTimes':_0x26bcb0['some'](_0x2343b1=>_0x2343b1[_0x5674d6(0xc8)]===_0x5674d6(0xa1))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x5674d6(0x98)+_0x26bcb0[_0x5674d6(0xb1)]+_0x5674d6(0xc4)};},async 'execute'(_0x3dabbd){const _0x409be8=a32_0x43c580,_0x4daa7a=loadBffProjectConfig(_0x3dabbd[_0x409be8(0xbe)]),_0x164f80=await readBffLockFile(_0x4daa7a[_0x409be8(0xa2)]),{lockData:_0x184e72,appLock:_0x131aca}=ensureLockScope(_0x164f80??createEmptyBffLock(),_0x3dabbd[_0x409be8(0xbe)],_0x4daa7a[_0x409be8(0xa8)],_0x409be8(0xc0)),_0x15fc5a=await getTargetFunctions(_0x4daa7a,_0x3dabbd);if(_0x15fc5a[_0x409be8(0xb1)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x409be8(0x7b)};const _0x3fa990=_0x3dabbd[_0x409be8(0xa3)](_0x409be8(0xcb)),_0x19f20e=JSON['parse'](JSON['stringify'](_0x184e72)),_0x472d86=_0x19f20e[_0x409be8(0x7a)][_0x3dabbd[_0x409be8(0xbe)]];if(!_0x472d86)throw new Error(_0x409be8(0xc2)+_0x3dabbd['appCode']+_0x409be8(0x80));const _0x2ca2bc=await buildHookMaps(_0x3dabbd[_0x409be8(0xbe)],_0x3dabbd[_0x409be8(0xa6)],_0x15fc5a,_0x472d86),_0x1f0f29=[],_0x41646b=[],_0x4910ed=[];for(const _0x1ecdd0 of _0x15fc5a){const _0x5abc99=await computeFileHash(_0x1ecdd0[_0x409be8(0xca)]),_0x4253b5=_0x472d86[_0x409be8(0xb0)][_0x1ecdd0[_0x409be8(0x97)]];if(!_0x3fa990&&_0x4253b5&&_0x4253b5[_0x409be8(0xc7)]===_0x5abc99){_0x41646b['push']({'lockKey':_0x1ecdd0[_0x409be8(0x97)],'reason':_0x409be8(0x8c)});continue;}try{await uploadSingleFunction(_0x3dabbd[_0x409be8(0xbe)],_0x1ecdd0,_0x472d86,_0x2ca2bc);const _0xffdb0f=_0x472d86[_0x409be8(0xb0)][_0x1ecdd0['lockKey']];_0x1f0f29[_0x409be8(0xc0)]({'lockKey':_0x1ecdd0[_0x409be8(0x97)],'remoteId':_0xffdb0f?.['remoteId']??0x0});}catch(_0x145a27){_0x4910ed['push']({'lockKey':_0x1ecdd0[_0x409be8(0x97)],'error':_0x145a27 instanceof Error?_0x145a27[_0x409be8(0x9e)]:String(_0x145a27)});}}_0x472d86['lastSync']=new Date()[_0x409be8(0xab)](),await writeBffLockFile(_0x4daa7a[_0x409be8(0xa2)],_0x19f20e),await waitForUploadedLockEntries(_0x4daa7a[_0x409be8(0xa2)],_0x3dabbd[_0x409be8(0xbe)],_0x1f0f29['map'](_0x3ac75b=>_0x3ac75b[_0x409be8(0x97)]));let _0x390c8e={'attempted':![],'cleared':![]};if(_0x1f0f29[_0x409be8(0xb1)]>0x0)try{let _0xc3f311='';for(let _0x2b04b8=0x0;_0x2b04b8<CACHE_CLEAR_ATTEMPTS;_0x2b04b8+=0x1){_0xc3f311=await clearBffScriptCache(),_0x2b04b8<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x390c8e={'attempted':!![],'cleared':!![],'message':_0xc3f311||_0x409be8(0xa0)};}catch(_0x408a3c){_0x390c8e={'attempted':!![],'cleared':![],'error':_0x408a3c instanceof Error?_0x408a3c[_0x409be8(0x9e)]:String(_0x408a3c)};}const _0x4745de=_0x4910ed[_0x409be8(0xb1)]===0x0&&(_0x390c8e[_0x409be8(0x8b)]?_0x390c8e[_0x409be8(0xae)]:!![]),_0xdbb332=_0x390c8e[_0x409be8(0x8b)]?_0x390c8e[_0x409be8(0xae)]?_0x409be8(0x95):_0x409be8(0x90):_0x409be8(0xac);return{'ok':_0x4745de,'data':{'uploaded':_0x1f0f29,'skipped':_0x41646b,'failed':_0x4910ed,'cacheClear':_0x390c8e},'message':_0x409be8(0xb8)+_0x1f0f29[_0x409be8(0xb1)]+_0x409be8(0x83)+_0x41646b[_0x409be8(0xb1)]+_0x409be8(0xb7)+_0x4910ed[_0x409be8(0xb1)]+'\x20failed,\x20'+_0xdbb332};}};async function getTargetFunctions(_0x50c526,_0x5b9a8f){const _0x530120=a32_0x43c580,_0x43579c=_0x5b9a8f[_0x530120(0xc3)](_0x530120(0xb6)),_0x299a5d=_0x5b9a8f['str']('name'),_0x2429f0=normalizeBffType(_0x43579c)??undefined;if(_0x299a5d&&!_0x2429f0)throw CliErrors['validation']('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x1a3bf0=await scanLocalBffFunctions(_0x50c526,_0x2429f0);if(_0x299a5d){const _0xc38599=_0x1a3bf0['filter'](_0x5a667c=>_0x5a667c[_0x530120(0x8a)]===_0x299a5d);if(_0xc38599[_0x530120(0xb1)]===0x0)throw CliErrors['validation'](_0x530120(0x94)+_0x2429f0+'/'+_0x299a5d);return _0xc38599;}return _0x1a3bf0;}async function buildHookMaps(_0x364a38,_0x2a86a6,_0x133062,_0x4ebf24){const _0x24309d=a32_0x43c580,_0x24871a=_0x133062[_0x24309d(0x93)](_0x209b30=>_0x209b30[_0x24309d(0xb6)]===_0x24309d(0x89));if(!_0x24871a)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x31c2d3=loadAliasMap(_0x2a86a6,undefined,resolveApiFilePath(_0x2a86a6,_0x364a38)),_0x770830=new Map(_0x31c2d3[_0x24309d(0x9f)](_0x3f3bbc=>[_0x3f3bbc[_0x24309d(0xaf)],_0x3f3bbc[_0x24309d(0x92)]]));for(const _0x4239c6 of Object[_0x24309d(0xa4)](_0x4ebf24[_0x24309d(0xb0)])){_0x4239c6[_0x24309d(0xaf)]&&_0x4239c6[_0x24309d(0x92)]&&!_0x770830['has'](_0x4239c6[_0x24309d(0xaf)])&&_0x770830[_0x24309d(0xba)](_0x4239c6[_0x24309d(0xaf)],_0x4239c6[_0x24309d(0x92)]);}const _0x37c004=await listDatasets(_0x364a38),_0x537a11=new Map(_0x37c004[_0x24309d(0x9f)](_0x93d1e4=>[_0x93d1e4[_0x24309d(0x86)],_0x93d1e4]));return{'aliasToDatasetCode':_0x770830,'datasetCodeToDataset':_0x537a11};}async function uploadSingleFunction(_0x22d20e,_0x167e08,_0x17a31,_0x327fa7){const _0x571592=a32_0x43c580,_0x244c5b=await readFile(_0x167e08[_0x571592(0xca)],_0x571592(0xbb)),_0x4b36a8=await computeFileHash(_0x167e08[_0x571592(0xca)]),_0x5ec83b=_0x17a31[_0x571592(0xb0)][_0x167e08[_0x571592(0x97)]];if(_0x5ec83b?.[_0x571592(0xb5)]&&_0x5ec83b['version']==null)throw CliErrors[_0x571592(0x8d)](_0x167e08[_0x571592(0x97)]+_0x571592(0x96));let _0x1e15cd=extractScriptDescription(_0x244c5b);if(!_0x1e15cd&&_0x5ec83b?.[_0x571592(0xb5)]){const _0x589c73=await getBffScriptInfo(_0x5ec83b['remoteId']);_0x1e15cd=_0x589c73[_0x571592(0xc9)]||undefined;}const _0x3a39f0={'appCode':_0x22d20e,'functionName':_0x167e08[_0x571592(0x8a)],'scriptType':_0x167e08['type'],'scriptContent':_0x244c5b};if(_0x5ec83b?.['remoteId'])_0x3a39f0['id']=_0x5ec83b[_0x571592(0xb5)];if(_0x5ec83b?.[_0x571592(0x82)]!=null)_0x3a39f0['version']=_0x5ec83b['version'];if(_0x1e15cd)_0x3a39f0['description']=_0x1e15cd;if(_0x167e08['type']==='HOOK'){const _0x1a38c4=_0x167e08[_0x571592(0xaf)];if(!_0x1a38c4||!_0x167e08[_0x571592(0xc1)]||!_0x167e08[_0x571592(0xaa)])throw CliErrors[_0x571592(0x8d)]('Incomplete\x20HOOK\x20path:\x20'+_0x167e08['lockKey']);const _0x52ac79=_0x327fa7['aliasToDatasetCode'][_0x571592(0x79)](_0x1a38c4)??_0x5ec83b?.['datasetCode']??_0x1a38c4,_0x3f43b6=_0x327fa7[_0x571592(0xb4)]['get'](_0x52ac79);if(!_0x3f43b6)throw CliErrors['validation'](_0x571592(0xa7)+_0x1a38c4+_0x571592(0xc6)+(_0x571592(0x87)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));assertDatasetSupportsLocalDevelopment(_0x3f43b6,_0x571592(0x7f)+_0x167e08[_0x571592(0x97)]),_0x3a39f0[_0x571592(0x81)]=_0x3f43b6['id'],_0x3a39f0[_0x571592(0xc1)]=_0x167e08[_0x571592(0xc1)],_0x3a39f0[_0x571592(0xaa)]=_0x167e08['functionNode'];}const _0x3e07c2=await saveBffScript(_0x3a39f0),_0x3af16a=_0x3e07c2['id'],_0x1480cc=_0x3e07c2[_0x571592(0x85)]??await getBffScriptInfo(_0x3af16a),_0x1854e3={'hash':_0x4b36a8,'remoteId':_0x3af16a,'version':_0x1480cc['version']};if(_0x167e08[_0x571592(0xb6)]===_0x571592(0x89)){const _0x5dbfc7=_0x167e08[_0x571592(0xaf)],_0x217b00=_0x327fa7[_0x571592(0xad)][_0x571592(0x79)](_0x5dbfc7)??_0x5ec83b?.['datasetCode']??_0x5dbfc7;_0x327fa7['aliasToDatasetCode']['has'](_0x5dbfc7)?_0x1854e3['alias']=_0x5dbfc7:_0x1854e3[_0x571592(0xaf)]=_0x5ec83b?.[_0x571592(0xaf)],_0x1854e3[_0x571592(0x92)]=_0x217b00,_0x1854e3[_0x571592(0xc1)]=_0x167e08['operationType'],_0x1854e3[_0x571592(0xaa)]=_0x167e08[_0x571592(0xaa)];}_0x17a31[_0x571592(0xb0)][_0x167e08[_0x571592(0x97)]]=_0x1854e3;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;function a32_0x447b(){const _0x5c4a6c=['create','runtime\x20cache\x20clear\x20failed','POST','datasetCode','some','Local\x20function\x20not\x20found:\x20','runtime\x20cache\x20cleared',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','lockKey','Would\x20inspect\x20','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','2105985rkOgYn','Push\x20only\x20this\x20script\x20type','154459ushJMt','Push\x20local\x20BFF\x20scripts\x20to\x20remote','message','map','Runtime\x20script\x20cache\x20cleared.','would_push','lockFilePath','bool','values','658382OvRcwx','apiDir','Cannot\x20resolve\x20dataset\x20for\x20\x22','scriptsRoot','/api/management/library/scripts/save','functionNode','toISOString','runtime\x20cache\x20not\x20needed','aliasToDatasetCode','cleared','alias','functions','length','162hZpVTR','41476utGiat','datasetCodeToDataset','remoteId','type','\x20skipped,\x20','Push\x20complete:\x20','42ngDGoY','set','utf8','boolean','every','appCode','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','push','operationType','Lock\x20scope\x20for\x20app\x20\x22','str','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','2984496txnjPJ','\x22.\x20','hash','status','description','filePath','force','get','apps','No\x20local\x20BFF\x20functions\x20found.','COMMON','4692627fSmMJp','high-risk-write','BFF\x20HOOK\x20','\x22\x20not\x20found\x20after\x20ensureLockScope.','datasetId','version','\x20uploaded,\x20','36640NJoKUS','script','code','Run\x20`','string','HOOK','name','attempted','unchanged','validation','Force\x20push\x20ignoring\x20hash\x20protection'];a32_0x447b=function(){return _0x5c4a6c;};return a32_0x447b();}async function waitForUploadedLockEntries(_0x18fd52,_0x4e7305,_0x1ffc41){const _0x195778=a32_0x43c580;if(_0x1ffc41[_0x195778(0xb1)]===0x0)return;for(let _0x48e22c=0x0;_0x48e22c<LOCK_SETTLE_RETRY_COUNT;_0x48e22c+=0x1){const _0x5eddc3=await readBffLockFile(_0x18fd52),_0x99801=_0x5eddc3?.[_0x195778(0x7a)]?.[_0x4e7305]?.[_0x195778(0xb0)]??{},_0x4e570d=_0x1ffc41[_0x195778(0xbd)](_0x9e4bde=>!!_0x99801[_0x9e4bde]?.['remoteId']);if(_0x4e570d)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x195778(0xbf)+_0x1ffc41['join'](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x3d803d=a33_0x12cf;(function(_0x342caf,_0x58da3c){const _0x446628=a33_0x12cf,_0x3be610=_0x342caf();while(!![]){try{const _0xa505cd=parseInt(_0x446628(0x188))/0x1+parseInt(_0x446628(0x19c))/0x2*(parseInt(_0x446628(0x194))/0x3)+-parseInt(_0x446628(0x195))/0x4*(-parseInt(_0x446628(0x19a))/0x5)+-parseInt(_0x446628(0x19b))/0x6*(parseInt(_0x446628(0x198))/0x7)+-parseInt(_0x446628(0x196))/0x8+-parseInt(_0x446628(0x18b))/0x9+parseInt(_0x446628(0x18d))/0xa;if(_0xa505cd===_0x58da3c)break;else _0x3be610['push'](_0x3be610['shift']());}catch(_0x229971){_0x3be610['push'](_0x3be610['shift']());}}}(a33_0x3748,0x1c086));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';function a33_0x12cf(_0x44de83,_0x338b32){_0x44de83=_0x44de83-0x181;const _0x37484d=a33_0x3748();let _0x12cf3c=_0x37484d[_0x44de83];return _0x12cf3c;}function a33_0x3748(){const _0x5a3f83=['bff','164259ARpePw','all','apiDir','427527jSRZkF','functions','2265980zaaQdv','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','\x20unchanged','lockKey','\x20remote-only','map','read','202119AEuzyI','71828PjLHLL','1810248SvZIEv','has','738766lqmYCA','All\x20BFF\x20scripts\x20are\x20in\x20sync.','10trgveO','6cKlYul','2bpBQYe','status','bool','appCode','lockFilePath','length','push'];a33_0x3748=function(){return _0x5a3f83;};return a33_0x3748();}export const bffStatus={'service':a33_0x3d803d(0x187),'command':a33_0x3d803d(0x181),'description':a33_0x3d803d(0x18e),'risk':a33_0x3d803d(0x193),'flags':[{'name':'remote','type':'boolean','description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x16d4f9){const _0x744ea=a33_0x3d803d,_0x4e9bdf=loadBffProjectConfig(_0x16d4f9['appCode']),_0x359376=await readBffLockFile(_0x4e9bdf[_0x744ea(0x184)]),{appLock:_0x3d77dd}=ensureLockScope(_0x359376??createEmptyBffLock(),_0x16d4f9[_0x744ea(0x183)],_0x4e9bdf['scriptsRoot'],_0x744ea(0x181)),_0x390735=await scanLocalBffFunctions(_0x4e9bdf),_0x49adeb=[],_0x56bea7=[],_0x417e96=[];for(const _0x2e2360 of _0x390735){const _0x4da5ca=await computeFileHash(_0x2e2360['filePath']),_0x40cc2c=_0x3d77dd[_0x744ea(0x18c)][_0x2e2360[_0x744ea(0x190)]];if(!_0x40cc2c)_0x49adeb['push'](_0x2e2360[_0x744ea(0x190)]);else _0x40cc2c['hash']!==_0x4da5ca?_0x56bea7[_0x744ea(0x186)](_0x2e2360[_0x744ea(0x190)]):_0x417e96[_0x744ea(0x186)](_0x2e2360[_0x744ea(0x190)]);}const _0x416aca=[];if(_0x16d4f9[_0x744ea(0x182)]('remote')){const _0x16abe7=loadAliasMap(_0x16d4f9[_0x744ea(0x18a)],undefined,resolveApiFilePath(_0x16d4f9[_0x744ea(0x18a)],_0x16d4f9[_0x744ea(0x183)])),_0x36a45e=new Map(_0x16abe7[_0x744ea(0x192)](_0x37e845=>[_0x37e845['datasetCode'],_0x37e845['alias']])),[_0x3ba10b,_0x272a44]=await Promise[_0x744ea(0x189)]([listBffScripts(_0x16d4f9['appCode']),getBffScriptStatistics(_0x16d4f9[_0x744ea(0x183)])]),_0x48cf05=createHookLocationMap(_0x272a44),_0x282558=new Set(_0x390735[_0x744ea(0x192)](_0x3a1e23=>_0x3a1e23[_0x744ea(0x190)]));for(const _0x21dfba of _0x3ba10b){const _0x13d804=resolveRemoteScriptTarget(_0x4e9bdf,_0x21dfba,_0x48cf05,_0x3d77dd[_0x744ea(0x18c)],_0x36a45e);_0x13d804&&!_0x282558[_0x744ea(0x197)](_0x13d804[_0x744ea(0x190)])&&_0x416aca['push'](_0x13d804[_0x744ea(0x190)]);}}const _0x132f48=_0x49adeb[_0x744ea(0x185)]===0x0&&_0x56bea7[_0x744ea(0x185)]===0x0&&_0x416aca['length']===0x0;return{'ok':!![],'data':{'added':_0x49adeb,'modified':_0x56bea7,'unchanged':_0x417e96,'remoteOnly':_0x416aca},'message':_0x132f48?_0x744ea(0x199):_0x49adeb['length']+'\x20added,\x20'+_0x56bea7[_0x744ea(0x185)]+'\x20modified,\x20'+_0x417e96[_0x744ea(0x185)]+_0x744ea(0x18f)+(_0x416aca[_0x744ea(0x185)]>0x0?',\x20'+_0x416aca[_0x744ea(0x185)]+_0x744ea(0x191):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a34_0x5b870d=a34_0x4080;(function(_0x4cdb37,_0x256a90){const _0x39a06f=a34_0x4080,_0x49639a=_0x4cdb37();while(!![]){try{const _0x4d2d33=parseInt(_0x39a06f(0xc4))/0x1*(-parseInt(_0x39a06f(0xe0))/0x2)+-parseInt(_0x39a06f(0xfd))/0x3*(parseInt(_0x39a06f(0xdb))/0x4)+parseInt(_0x39a06f(0xf2))/0x5+-parseInt(_0x39a06f(0xe1))/0x6+-parseInt(_0x39a06f(0xdf))/0x7+-parseInt(_0x39a06f(0xff))/0x8*(parseInt(_0x39a06f(0xcb))/0x9)+-parseInt(_0x39a06f(0xe6))/0xa*(-parseInt(_0x39a06f(0xab))/0xb);if(_0x4d2d33===_0x256a90)break;else _0x49639a['push'](_0x49639a['shift']());}catch(_0x45215f){_0x49639a['push'](_0x49639a['shift']());}}}(a34_0x714d,0x51264));import a34_0x5bb6e4 from'chalk';import a34_0x5dfe67 from'ora';import a34_0x72f820 from'semver';import{execa}from'execa';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{getCdnConfig}from'../utils/cdn-config.js';import{resolveNpmBin}from'../utils/platform.js';function a34_0x714d(){const _0x253289=['Install\x20a\x20specific\x20CLI\x20version','error','bool','\x20install\x20-g\x20','beta','length','\x20→\x20','3831ZZyQYu','no-skills','8UOvjvY','install','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','validation','write','7761743BuZhkx','green','gray','Updating\x20via\x20','\x20\x20Official\x20skill\x20update\x20failed:\x20','entries','update','pipe','Skipping\x20official\x20skill\x20package\x20(--no-skills).','nonInteractive','Refresh\x20official\x20skill\x20package\x20after\x20updating','message','Updated\x20to\x20v','Already\x20on\x20requested\x20version\x20(v','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','valid','npm','boolean','info','str','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','log','cli','inherit','source','786YfmLWj','skipped','succeed','timeout','/dist-tags','filter','execPath','3930462Hycmgn','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','Update\x20failed','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','version','Checking\x20official\x20skill\x20package...','Current\x20version:\x20','trim','toLowerCase','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','stableVersion','unknown','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','fail','https://registry.npmjs.org/-/package/','fromEntries','724kKMPfh','Requested\x20version:\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Version\x20comparison\x20failed','2701664ENCccR','1252NXWlmG','2621574fxUstK','json','includes','@latest','slice','30HPiHzK','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','red','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','skills','start','Already\x20up\x20to\x20date\x20(v','bun','yellow','\x20\x20Try\x20manually:\x20','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','latest','991605kvstqQ','Invalid\x20version:\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','object'];a34_0x714d=function(){return _0x253289;};return a34_0x714d();}function getCurrentVersion(){const _0x6d0ff9=a34_0x4080;return GIT_COMMIT!==_0x6d0ff9(0xd6)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x6d0ff9(0xe5)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0xf0928f=a34_0x4080,_0x5c792e=process[_0xf0928f(0xca)][_0xf0928f(0xd3)]();if(_0x5c792e[_0xf0928f(0xe3)](_0xf0928f(0xed)))return'bun';return _0xf0928f(0xbb);}const updateFlags=[{'name':a34_0x5b870d(0xfa),'type':a34_0x5b870d(0xbc),'description':a34_0x5b870d(0xf4),'default':![]},{'name':'version','type':'string','description':a34_0x5b870d(0xf6)},{'name':a34_0x5b870d(0xfe),'type':a34_0x5b870d(0xbc),'description':a34_0x5b870d(0xcc),'default':![]},{'name':a34_0x5b870d(0xea),'type':'boolean','description':a34_0x5b870d(0xb5),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x5ec897){const _0x4c74ed=a34_0x5b870d;return _0x5ec897[_0x4c74ed(0xbe)](_0x4c74ed(0xcf))['trim']();}function shouldSkipOfficialSkill(_0x3f3a1c){const _0x22fa4f=a34_0x5b870d;return _0x3f3a1c[_0x22fa4f(0xf8)](_0x22fa4f(0xfe))||_0x3f3a1c['flag'](_0x22fa4f(0xea))===![];}async function validateUpdateFlags(_0x2e5f53){const _0x3508c2=a34_0x5b870d,_0x20c156=_0x2e5f53['bool'](_0x3508c2(0xfa)),_0x26defc=getRequestedVersion(_0x2e5f53);if(_0x20c156&&_0x26defc)throw CliErrors[_0x3508c2(0x102)](_0x3508c2(0xe7),_0x3508c2(0xf0));if(_0x26defc&&!a34_0x72f820[_0x3508c2(0xba)](_0x26defc))throw CliErrors['validation'](_0x3508c2(0xf3)+_0x26defc,_0x3508c2(0xd4));}async function fetchNpmDistTags(){const _0x3d703c=a34_0x5b870d;try{const _0x11b2a8=await fetch(_0x3d703c(0xd9)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x3d703c(0xc8),{'signal':AbortSignal[_0x3d703c(0xc7)](0x2710)});if(!_0x11b2a8['ok'])return null;const _0x5340c5=await _0x11b2a8[_0x3d703c(0xe2)]();if(!_0x5340c5||typeof _0x5340c5!==_0x3d703c(0xf5))return null;return Object[_0x3d703c(0xda)](Object[_0x3d703c(0xb0)](_0x5340c5)[_0x3d703c(0xc9)](([,_0x5e2b48])=>typeof _0x5e2b48==='string'&&_0x5e2b48[_0x3d703c(0xd2)]()[_0x3d703c(0xfb)]>0x0)['map'](([_0x30f22b,_0x41d915])=>[_0x30f22b,String(_0x41d915)[_0x3d703c(0xd2)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x5ed63f){const _0x55b299=await fetchNpmDistTags();return _0x55b299?.[_0x5ed63f]??null;}function a34_0x4080(_0x5127f9,_0x343215){_0x5127f9=_0x5127f9-0xaa;const _0x714d5b=a34_0x714d();let _0x4080d1=_0x714d5b[_0x5127f9];return _0x4080d1;}async function fetchLatestVersion(){const _0x5671a9=a34_0x5b870d,_0x16f3ba=await fetchNpmDistTagVersion('latest');if(_0x16f3ba)return _0x16f3ba;const _0x38cdd9=await getCdnConfig();return _0x38cdd9?.[_0x5671a9(0xc1)]?.[_0x5671a9(0xd5)]??null;}async function resolveTargetVersion(_0x42afa8){const _0x3fc40c=a34_0x5b870d,_0x70df12=getRequestedVersion(_0x42afa8);if(_0x70df12)return{'version':_0x70df12,'source':_0x3fc40c(0xcf)};if(_0x42afa8[_0x3fc40c(0xf8)](_0x3fc40c(0xfa))){const _0x59d151=await fetchNpmDistTagVersion(_0x3fc40c(0xfa));if(!_0x59d151)return null;return{'version':_0x59d151,'source':'beta'};}const _0x35b93e=await fetchLatestVersion();if(!_0x35b93e)return null;return{'version':_0x35b93e,'source':_0x3fc40c(0xf1)};}function shouldInstallTarget(_0x485dee,_0x577dbd){const _0x5d194c=a34_0x5b870d;if(_0x577dbd['source']===_0x5d194c(0xcf)||_0x577dbd[_0x5d194c(0xc3)]===_0x5d194c(0xfa))return!a34_0x72f820['eq'](_0x485dee,_0x577dbd[_0x5d194c(0xcf)]);return a34_0x72f820['lt'](_0x485dee,_0x577dbd[_0x5d194c(0xcf)]);}function getInstallPlanLabel(_0x28c54e,_0x37c760){const _0x34c860=a34_0x5b870d;switch(_0x37c760[_0x34c860(0xc3)]){case _0x34c860(0xfa):return'Beta\x20version:\x20'+a34_0x5bb6e4[_0x34c860(0xee)](_0x28c54e)+'\x20→\x20'+a34_0x5bb6e4[_0x34c860(0xac)](_0x37c760[_0x34c860(0xcf)]);case _0x34c860(0xcf):return _0x34c860(0xdc)+a34_0x5bb6e4[_0x34c860(0xee)](_0x28c54e)+'\x20→\x20'+a34_0x5bb6e4[_0x34c860(0xac)](_0x37c760[_0x34c860(0xcf)]);case _0x34c860(0xf1):default:return'Update\x20available:\x20'+a34_0x5bb6e4[_0x34c860(0xee)](_0x28c54e)+_0x34c860(0xfc)+a34_0x5bb6e4[_0x34c860(0xac)](_0x37c760[_0x34c860(0xcf)]);}}async function installOfficialSkill(_0x3fb0b2){const _0x1bcf0a=a34_0x5b870d;console['log'](a34_0x5bb6e4['gray'](_0x1bcf0a(0xd0)));const _0x2cf59b=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x3fb0b2?_0x1bcf0a(0xb2):_0x1bcf0a(0xc2)});if(_0x2cf59b[_0x1bcf0a(0xc5)]){console[_0x1bcf0a(0xc0)](a34_0x5bb6e4[_0x1bcf0a(0xad)](_0x1bcf0a(0xbf)));return;}if(_0x2cf59b['ok']){console[_0x1bcf0a(0xc0)](a34_0x5bb6e4[_0x1bcf0a(0xad)](_0x1bcf0a(0xe9)));return;}console['warn'](a34_0x5bb6e4['yellow'](_0x1bcf0a(0xaf)+(_0x2cf59b['error']||_0x1bcf0a(0xd6)))),console[_0x1bcf0a(0xc0)](a34_0x5bb6e4[_0x1bcf0a(0xad)]('\x20\x20Run\x20manually:\x20'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x50b4d9){const _0x23dc65=a34_0x5b870d;await validateUpdateFlags(_0x50b4d9);const _0x3d1f82=getCurrentVersion();console[_0x23dc65(0xc0)](_0x23dc65(0xd1)+_0x3d1f82);const _0x3d02b2=a34_0x5dfe67('Checking\x20for\x20updates...')[_0x23dc65(0xeb)](),_0x284596=await resolveTargetVersion(_0x50b4d9);if(!_0x284596){const _0x4e796d=_0x50b4d9['bool'](_0x23dc65(0xfa))?_0x23dc65(0xb9):_0x23dc65(0xdd);return _0x3d02b2[_0x23dc65(0xd8)](_0x4e796d),console[_0x23dc65(0xc0)](a34_0x5bb6e4['gray'](_0x23dc65(0xd7)+NPM_PACKAGE_NAME+_0x23dc65(0xe4))),{'ok':![],'message':_0x4e796d};}const _0x59763d=a34_0x72f820[_0x23dc65(0xba)](VERSION),_0x1e1e4b=a34_0x72f820['valid'](_0x284596[_0x23dc65(0xcf)]);if(!_0x59763d||!_0x1e1e4b)return _0x3d02b2['fail'](_0x23dc65(0xde)),{'ok':![],'message':_0x23dc65(0xde)};if(!shouldInstallTarget(_0x59763d,_0x284596)){const _0x4f8c4f=_0x284596['source']===_0x23dc65(0xcf)?_0x23dc65(0xb8)+_0x284596['version']+')':_0x23dc65(0xec)+_0x284596[_0x23dc65(0xcf)]+')';return _0x3d02b2[_0x23dc65(0xc6)](_0x4f8c4f),shouldSkipOfficialSkill(_0x50b4d9)?console[_0x23dc65(0xc0)](a34_0x5bb6e4['gray'](_0x23dc65(0xb3))):await installOfficialSkill(_0x50b4d9[_0x23dc65(0xb4)]),{'ok':!![]};}_0x3d02b2[_0x23dc65(0xbd)](getInstallPlanLabel(_0x3d1f82,_0x284596));const _0x48794d=detectPackageManager(),_0x2f437c=_0x48794d==='npm'?resolveNpmBin('npm'):_0x48794d,_0x5ee117=a34_0x5dfe67(_0x23dc65(0xae)+_0x48794d+'...')['start']();try{return await execa(_0x2f437c,[_0x23dc65(0x100),'-g',NPM_PACKAGE_NAME+'@'+_0x284596[_0x23dc65(0xcf)]],{'stdio':_0x23dc65(0xb2)}),_0x5ee117[_0x23dc65(0xc6)](_0x23dc65(0xb7)+_0x284596[_0x23dc65(0xcf)]),console[_0x23dc65(0xc0)](a34_0x5bb6e4[_0x23dc65(0xad)](_0x23dc65(0xce))),shouldSkipOfficialSkill(_0x50b4d9)?console[_0x23dc65(0xc0)](a34_0x5bb6e4[_0x23dc65(0xad)]('Skipping\x20official\x20skill\x20package\x20(--no-skills).')):await installOfficialSkill(_0x50b4d9[_0x23dc65(0xb4)]),{'ok':!![]};}catch(_0x522e7d){return _0x5ee117[_0x23dc65(0xd8)](_0x23dc65(0xcd)),console[_0x23dc65(0xf7)](a34_0x5bb6e4[_0x23dc65(0xe8)]('\x20\x20'+_0x522e7d[_0x23dc65(0xb6)])),console[_0x23dc65(0xc0)](a34_0x5bb6e4[_0x23dc65(0xad)](_0x23dc65(0xef)+_0x48794d+_0x23dc65(0xf9)+NPM_PACKAGE_NAME+'@'+_0x284596[_0x23dc65(0xcf)])),{'ok':![],'message':_0x522e7d['message']};}}export const updateDefinition={'service':a34_0x5b870d(0xb1),'command':'run','description':a34_0x5b870d(0x101),'risk':a34_0x5b870d(0xaa),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a34_0x25914e=a34_0x5e30;(function(_0x20d148,_0x986972){const _0x5dd496=a34_0x5e30,_0x2a85b0=_0x20d148();while(!![]){try{const _0x479cca=parseInt(_0x5dd496(0x115))/0x1*(parseInt(_0x5dd496(0xe9))/0x2)+-parseInt(_0x5dd496(0xf6))/0x3*(parseInt(_0x5dd496(0xfa))/0x4)+parseInt(_0x5dd496(0xe2))/0x5*(-parseInt(_0x5dd496(0xdf))/0x6)+parseInt(_0x5dd496(0x11a))/0x7*(-parseInt(_0x5dd496(0x11d))/0x8)+-parseInt(_0x5dd496(0x111))/0x9*(parseInt(_0x5dd496(0x109))/0xa)+-parseInt(_0x5dd496(0x112))/0xb+parseInt(_0x5dd496(0xd3))/0xc;if(_0x479cca===_0x986972)break;else _0x2a85b0['push'](_0x2a85b0['shift']());}catch(_0x9fedd6){_0x2a85b0['push'](_0x2a85b0['shift']());}}}(a34_0x2832,0x4b975));import a34_0x2b18c0 from'chalk';import a34_0xb9993c from'ora';import a34_0x2ff947 from'semver';import{execa}from'execa';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{getCdnConfig}from'../utils/cdn-config.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x100b64=a34_0x5e30;return GIT_COMMIT!==_0x100b64(0x10d)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x100b64(0xf3)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x49fa9e=a34_0x5e30,_0x5510f7=process['execPath']['toLowerCase']();if(_0x5510f7[_0x49fa9e(0xea)](_0x49fa9e(0xff)))return _0x49fa9e(0xff);return _0x49fa9e(0x10f);}const updateFlags=[{'name':a34_0x25914e(0xdb),'type':a34_0x25914e(0x105),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a34_0x25914e(0xd1),'type':'string','description':a34_0x25914e(0xd0)},{'name':a34_0x25914e(0x10c),'type':a34_0x25914e(0x105),'description':a34_0x25914e(0xdd),'default':![]},{'name':a34_0x25914e(0xe0),'type':'boolean','description':'Refresh\x20official\x20skill\x20package\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x1bdc40){const _0x3d436f=a34_0x25914e;return _0x1bdc40[_0x3d436f(0xee)](_0x3d436f(0xd1))[_0x3d436f(0xeb)]();}function shouldSkipOfficialSkill(_0x5e6cde){const _0x3b9d72=a34_0x25914e;return _0x5e6cde[_0x3b9d72(0x102)](_0x3b9d72(0x10c))||_0x5e6cde[_0x3b9d72(0xec)](_0x3b9d72(0xe0))===![];}async function validateUpdateFlags(_0x1a46de){const _0x10232a=a34_0x25914e,_0x1e248a=_0x1a46de[_0x10232a(0x102)]('beta'),_0x5db3d2=getRequestedVersion(_0x1a46de);if(_0x1e248a&&_0x5db3d2)throw CliErrors[_0x10232a(0xfb)](_0x10232a(0xf1),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x5db3d2&&!a34_0x2ff947[_0x10232a(0x11f)](_0x5db3d2))throw CliErrors['validation'](_0x10232a(0xd8)+_0x5db3d2,_0x10232a(0x126));}function a34_0x2832(){const _0x53cff0=['34TOnSdj','includes','trim','flag','json','str','https://registry.npmjs.org/-/package/','succeed','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','\x20\x20Run\x20manually:\x20','slice','map','...','3HIEQgU','red','skipped','Checking\x20for\x20updates...','1858916AMNPZH','validation','start','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','info','bun','Already\x20on\x20requested\x20version\x20(v','Updating\x20via\x20','bool','Update\x20failed','Version\x20comparison\x20failed','boolean','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','fromEntries','Already\x20up\x20to\x20date\x20(v','10TnUrVO','object','@latest','no-skills','unknown','pipe','npm','filter','2139201uzFrwq','862708kYSEyW','Beta\x20version:\x20','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','25538ffAhRQ','gray','latest','inherit','Update\x20available:\x20','329fycAbR','warn','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','68920zwvLVP','\x20install\x20-g\x20','valid','cwd','yellow','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Skipping\x20official\x20skill\x20package\x20(--no-skills).','message','fail','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','string','\x20→\x20','run','install','Install\x20a\x20specific\x20CLI\x20version','version','log','14718360skbfbN','source','green','Requested\x20version:\x20','Checking\x20official\x20skill\x20package...','Invalid\x20version:\x20','nonInteractive','timeout','beta','Updated\x20to\x20v','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','\x20\x20Try\x20manually:\x20','12VNAnpD','skills','stableVersion','413260UMOnnB','\x20\x20Official\x20skill\x20update\x20failed:\x20','update','/dist-tags','cli','error','length'];a34_0x2832=function(){return _0x53cff0;};return a34_0x2832();}async function fetchNpmDistTags(){const _0x3728a1=a34_0x25914e;try{const _0xaab39f=await fetch(_0x3728a1(0xef)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x3728a1(0xe5),{'signal':AbortSignal[_0x3728a1(0xda)](0x2710)});if(!_0xaab39f['ok'])return null;const _0x5b5dcf=await _0xaab39f[_0x3728a1(0xed)]();if(!_0x5b5dcf||typeof _0x5b5dcf!==_0x3728a1(0x10a))return null;return Object[_0x3728a1(0x107)](Object['entries'](_0x5b5dcf)[_0x3728a1(0x110)](([,_0x376c73])=>typeof _0x376c73===_0x3728a1(0x127)&&_0x376c73[_0x3728a1(0xeb)]()[_0x3728a1(0xe8)]>0x0)[_0x3728a1(0xf4)](([_0x5b755c,_0x2b1c72])=>[_0x5b755c,String(_0x2b1c72)[_0x3728a1(0xeb)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x7a512){const _0x26eb5c=await fetchNpmDistTags();return _0x26eb5c?.[_0x7a512]??null;}async function fetchLatestVersion(){const _0x46d4a4=a34_0x25914e,_0x1ae426=await fetchNpmDistTagVersion(_0x46d4a4(0x117));if(_0x1ae426)return _0x1ae426;const _0x1cb03a=await getCdnConfig();return _0x1cb03a?.[_0x46d4a4(0xe6)]?.[_0x46d4a4(0xe1)]??null;}function a34_0x5e30(_0x27edd5,_0x3786af){_0x27edd5=_0x27edd5-0xd0;const _0x28321=a34_0x2832();let _0x5e304c=_0x28321[_0x27edd5];return _0x5e304c;}async function resolveTargetVersion(_0x160e50){const _0x304bb5=a34_0x25914e,_0x266c9a=getRequestedVersion(_0x160e50);if(_0x266c9a)return{'version':_0x266c9a,'source':_0x304bb5(0xd1)};if(_0x160e50[_0x304bb5(0x102)](_0x304bb5(0xdb))){const _0x282206=await fetchNpmDistTagVersion('beta');if(!_0x282206)return null;return{'version':_0x282206,'source':_0x304bb5(0xdb)};}const _0x3b161b=await fetchLatestVersion();if(!_0x3b161b)return null;return{'version':_0x3b161b,'source':'latest'};}function shouldInstallTarget(_0x411200,_0x4de84c){const _0x57f6df=a34_0x25914e;if(_0x4de84c[_0x57f6df(0xd4)]===_0x57f6df(0xd1)||_0x4de84c['source']===_0x57f6df(0xdb))return!a34_0x2ff947['eq'](_0x411200,_0x4de84c[_0x57f6df(0xd1)]);return a34_0x2ff947['lt'](_0x411200,_0x4de84c[_0x57f6df(0xd1)]);}function getInstallPlanLabel(_0x43bf74,_0x163b8b){const _0x321739=a34_0x25914e;switch(_0x163b8b[_0x321739(0xd4)]){case'beta':return _0x321739(0x113)+a34_0x2b18c0[_0x321739(0x121)](_0x43bf74)+_0x321739(0x128)+a34_0x2b18c0[_0x321739(0xd5)](_0x163b8b['version']);case _0x321739(0xd1):return _0x321739(0xd6)+a34_0x2b18c0[_0x321739(0x121)](_0x43bf74)+_0x321739(0x128)+a34_0x2b18c0[_0x321739(0xd5)](_0x163b8b[_0x321739(0xd1)]);case _0x321739(0x117):default:return _0x321739(0x119)+a34_0x2b18c0[_0x321739(0x121)](_0x43bf74)+_0x321739(0x128)+a34_0x2b18c0[_0x321739(0xd5)](_0x163b8b[_0x321739(0xd1)]);}}async function installOfficialSkill(_0x3aaf21){const _0x316ae7=a34_0x25914e;console['log'](a34_0x2b18c0[_0x316ae7(0x116)](_0x316ae7(0xd7)));const _0xe34e52=runNpxSkillsAddGlobal(process[_0x316ae7(0x120)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x3aaf21?_0x316ae7(0x10e):_0x316ae7(0x118)});if(_0xe34e52[_0x316ae7(0xf8)]){console[_0x316ae7(0xd2)](a34_0x2b18c0[_0x316ae7(0x116)](_0x316ae7(0x11c)));return;}if(_0xe34e52['ok']){console['log'](a34_0x2b18c0[_0x316ae7(0x116)](_0x316ae7(0x114)));return;}console[_0x316ae7(0x11b)](a34_0x2b18c0[_0x316ae7(0x121)](_0x316ae7(0xe3)+(_0xe34e52[_0x316ae7(0xe7)]||_0x316ae7(0x10d)))),console[_0x316ae7(0xd2)](a34_0x2b18c0[_0x316ae7(0x116)](_0x316ae7(0xf2)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x55ed1e){const _0xbe4142=a34_0x25914e;await validateUpdateFlags(_0x55ed1e);const _0x1ec77e=getCurrentVersion();console['log']('Current\x20version:\x20'+_0x1ec77e);const _0x481ea8=a34_0xb9993c(_0xbe4142(0xf9))['start'](),_0x2b2c5c=await resolveTargetVersion(_0x55ed1e);if(!_0x2b2c5c){const _0x5ae770=_0x55ed1e[_0xbe4142(0x102)]('beta')?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0xbe4142(0x122);return _0x481ea8['fail'](_0x5ae770),console['log'](a34_0x2b18c0[_0xbe4142(0x116)](_0xbe4142(0xfd)+NPM_PACKAGE_NAME+_0xbe4142(0x10b))),{'ok':![],'message':_0x5ae770};}const _0x185a0a=a34_0x2ff947[_0xbe4142(0x11f)](VERSION),_0xbd7a7=a34_0x2ff947[_0xbe4142(0x11f)](_0x2b2c5c[_0xbe4142(0xd1)]);if(!_0x185a0a||!_0xbd7a7)return _0x481ea8[_0xbe4142(0x125)](_0xbe4142(0x104)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x185a0a,_0x2b2c5c)){const _0x87ebf7=_0x2b2c5c[_0xbe4142(0xd4)]===_0xbe4142(0xd1)?_0xbe4142(0x100)+_0x2b2c5c[_0xbe4142(0xd1)]+')':_0xbe4142(0x108)+_0x2b2c5c[_0xbe4142(0xd1)]+')';return _0x481ea8[_0xbe4142(0xf0)](_0x87ebf7),shouldSkipOfficialSkill(_0x55ed1e)?console[_0xbe4142(0xd2)](a34_0x2b18c0[_0xbe4142(0x116)](_0xbe4142(0x123))):await installOfficialSkill(_0x55ed1e[_0xbe4142(0xd9)]),{'ok':!![]};}_0x481ea8[_0xbe4142(0xfe)](getInstallPlanLabel(_0x1ec77e,_0x2b2c5c));const _0x4b9eb5=detectPackageManager(),_0x49282e=_0x4b9eb5==='npm'?resolveNpmBin(_0xbe4142(0x10f)):_0x4b9eb5,_0x1ff44f=a34_0xb9993c(_0xbe4142(0x101)+_0x4b9eb5+_0xbe4142(0xf5))[_0xbe4142(0xfc)]();try{return await execa(_0x49282e,[_0xbe4142(0x12a),'-g',NPM_PACKAGE_NAME+'@'+_0x2b2c5c[_0xbe4142(0xd1)]],{'stdio':_0xbe4142(0x10e)}),_0x1ff44f[_0xbe4142(0xf0)](_0xbe4142(0xdc)+_0x2b2c5c[_0xbe4142(0xd1)]),console[_0xbe4142(0xd2)](a34_0x2b18c0[_0xbe4142(0x116)](_0xbe4142(0x106))),shouldSkipOfficialSkill(_0x55ed1e)?console[_0xbe4142(0xd2)](a34_0x2b18c0['gray'](_0xbe4142(0x123))):await installOfficialSkill(_0x55ed1e[_0xbe4142(0xd9)]),{'ok':!![]};}catch(_0x2bc0f5){return _0x1ff44f[_0xbe4142(0x125)](_0xbe4142(0x103)),console[_0xbe4142(0xe7)](a34_0x2b18c0[_0xbe4142(0xf7)]('\x20\x20'+_0x2bc0f5[_0xbe4142(0x124)])),console[_0xbe4142(0xd2)](a34_0x2b18c0['gray'](_0xbe4142(0xde)+_0x4b9eb5+_0xbe4142(0x11e)+NPM_PACKAGE_NAME+'@'+_0x2b2c5c[_0xbe4142(0xd1)])),{'ok':![],'message':_0x2bc0f5['message']};}}export const updateDefinition={'service':a34_0x25914e(0xe4),'command':a34_0x25914e(0x129),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x51c51e,_0x357f80){const _0x55d343=a35_0x179f,_0x1b3367=_0x51c51e();while(!![]){try{const _0x227bc1=-parseInt(_0x55d343(0x173))/0x1+parseInt(_0x55d343(0x16d))/0x2*(parseInt(_0x55d343(0x175))/0x3)+-parseInt(_0x55d343(0x176))/0x4+-parseInt(_0x55d343(0x174))/0x5*(-parseInt(_0x55d343(0x172))/0x6)+parseInt(_0x55d343(0x170))/0x7*(-parseInt(_0x55d343(0x16c))/0x8)+parseInt(_0x55d343(0x171))/0x9*(parseInt(_0x55d343(0x16f))/0xa)+-parseInt(_0x55d343(0x16b))/0xb*(-parseInt(_0x55d343(0x16e))/0xc);if(_0x227bc1===_0x357f80)break;else _0x1b3367['push'](_0x1b3367['shift']());}catch(_0x1b213b){_0x1b3367['push'](_0x1b3367['shift']());}}}(a35_0x6edd,0x6ba4c));function a35_0x179f(_0x1f8a10,_0x397d86){_0x1f8a10=_0x1f8a10-0x16b;const _0x6edda=a35_0x6edd();let _0x179fd1=_0x6edda[_0x1f8a10];return _0x179fd1;}function a35_0x6edd(){const _0x797cf5=['36LniwEa','18SEDHpa','172154WzGqMD','812635JlqlXC','438762avBsTJ','2815812TWBkFs','4917RrGODp','507056onvHIw','2PzILPq','34632uvmYoT','542760tzMUYN','91tOxdbI'];a35_0x6edd=function(){return _0x797cf5;};return a35_0x6edd();}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a36_0x1ef544=a36_0x3583;(function(_0x42384b,_0x31bdb2){const _0x1b9ca9=a36_0x3583,_0x72aa7d=_0x42384b();while(!![]){try{const _0x24bbc5=parseInt(_0x1b9ca9(0x80))/0x1+parseInt(_0x1b9ca9(0x82))/0x2+parseInt(_0x1b9ca9(0x88))/0x3*(-parseInt(_0x1b9ca9(0x98))/0x4)+-parseInt(_0x1b9ca9(0x89))/0x5*(-parseInt(_0x1b9ca9(0x8d))/0x6)+parseInt(_0x1b9ca9(0x84))/0x7*(parseInt(_0x1b9ca9(0x96))/0x8)+-parseInt(_0x1b9ca9(0x85))/0x9+parseInt(_0x1b9ca9(0x8c))/0xa*(-parseInt(_0x1b9ca9(0x99))/0xb);if(_0x24bbc5===_0x31bdb2)break;else _0x72aa7d['push'](_0x72aa7d['shift']());}catch(_0x146dda){_0x72aa7d['push'](_0x72aa7d['shift']());}}}(a36_0xa619,0x43b36));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a36_0x1ef544(0x97),'command':a36_0x1ef544(0x7f),'description':a36_0x1ef544(0x8a),'risk':a36_0x1ef544(0x92),'flags':[CODE_FLAG_OPTIONAL,{'name':a36_0x1ef544(0x87),'type':'string','description':a36_0x1ef544(0x81)},{'name':a36_0x1ef544(0x83),'type':'string','required':!![],'description':a36_0x1ef544(0x8b)},{'name':'skip-imports','type':'boolean','description':a36_0x1ef544(0x93)}],async 'execute'(_0x59618e){const _0x5c0fed=a36_0x1ef544,{dataset:_0x24b70d,operation:_0x160a31}=await getOperationDetail(_0x59618e[_0x5c0fed(0x8f)],_0x59618e['str'](_0x5c0fed(0x91)),_0x59618e[_0x5c0fed(0x8e)](_0x5c0fed(0x83))),_0x112e8b=generateSdkCode(_0x24b70d,_0x160a31,{'includeImports':!_0x59618e[_0x5c0fed(0x95)](_0x5c0fed(0x86))});return{'ok':!![],'data':{'dataset':{'name':_0x24b70d[_0x5c0fed(0x94)],'code':_0x24b70d[_0x5c0fed(0x91)],'tableName':_0x24b70d[_0x5c0fed(0x90)]},'operation':_0x59618e[_0x5c0fed(0x8e)](_0x5c0fed(0x83)),'code':_0x112e8b}};}};function a36_0x3583(_0x5d82a9,_0x2048b3){_0x5d82a9=_0x5d82a9-0x7f;const _0xa619af=a36_0xa619();let _0x3583bd=_0xa619af[_0x5d82a9];return _0x3583bd;}function a36_0xa619(){const _0x4f3230=['156764BghCLs','operation','3906cOIfFt','1652841GKfxRB','skip-imports','alias','51LaaaVi','171290YSRRNh','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','8600fgzKvK','18ljksWo','str','appCode','tableName','code','read','Omit\x20import\x20statements\x20from\x20generated\x20code','name','bool','7544RDaxym','codegen','47588rnnQIA','5390aAuHGO','sdk','377250XhMBZB','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'];a36_0xa619=function(){return _0x4f3230;};return a36_0xa619();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a37_0x58e9(_0x2b4364,_0x678908){_0x2b4364=_0x2b4364-0x138;const _0x424c59=a37_0x424c();let _0x58e90e=_0x424c59[_0x2b4364];return _0x58e90e;}const a37_0x39e2ad=a37_0x58e9;function a37_0x424c(){const _0x19b3c3=['724899dfpXip','176rptZbA','sqlcode','sqlName','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','3mCsBCL','301WQUVye','11KTilmV','355kGkESO','target','string','appCode','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','no-imports','2239606VesrTg','sdk','bool','sqlCode','sql','150018ibhfIF','11134160MRJLik','str','76996PsjeaQ','286371GZXwHI','38622588RuRtIm'];a37_0x424c=function(){return _0x19b3c3;};return a37_0x424c();}(function(_0x394569,_0xd9fd6a){const _0x4b930b=a37_0x58e9,_0x1eeacc=_0x394569();while(!![]){try{const _0xdb903c=-parseInt(_0x4b930b(0x148))/0x1+parseInt(_0x4b930b(0x13d))/0x2*(-parseInt(_0x4b930b(0x14d))/0x3)+parseInt(_0x4b930b(0x145))/0x4*(-parseInt(_0x4b930b(0x150))/0x5)+-parseInt(_0x4b930b(0x142))/0x6*(parseInt(_0x4b930b(0x14e))/0x7)+-parseInt(_0x4b930b(0x149))/0x8*(-parseInt(_0x4b930b(0x146))/0x9)+parseInt(_0x4b930b(0x143))/0xa+-parseInt(_0x4b930b(0x14f))/0xb*(-parseInt(_0x4b930b(0x147))/0xc);if(_0xdb903c===_0xd9fd6a)break;else _0x1eeacc['push'](_0x1eeacc['shift']());}catch(_0x41ea1a){_0x1eeacc['push'](_0x1eeacc['shift']());}}}(a37_0x424c,0xb6001));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':a37_0x39e2ad(0x141),'description':a37_0x39e2ad(0x13b),'risk':'read','flags':[SQLCODE_FLAG,{'name':a37_0x39e2ad(0x138),'type':a37_0x39e2ad(0x139),'description':a37_0x39e2ad(0x14c),'default':'sdk','enum':[a37_0x39e2ad(0x13e),'bff']},{'name':a37_0x39e2ad(0x13c),'type':'boolean','description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x2d490d){const _0x57be5d=a37_0x39e2ad,_0x4ae242=await getSqlQueryInfo(_0x2d490d[_0x57be5d(0x13a)],_0x2d490d[_0x57be5d(0x144)](_0x57be5d(0x14a))),_0x3321b6=_0x2d490d[_0x57be5d(0x144)](_0x57be5d(0x138))||_0x57be5d(0x13e),_0x2c43ec=generateSqlCodeTemplate(_0x4ae242,{'target':_0x3321b6,'includeImports':!_0x2d490d[_0x57be5d(0x13f)](_0x57be5d(0x13c))});return{'ok':!![],'data':{'sqlCode':_0x4ae242[_0x57be5d(0x140)],'sqlName':_0x4ae242[_0x57be5d(0x14b)],'target':_0x3321b6,'code':_0x2c43ec}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ecafb,_0x6275c3){const _0x4fb997=a38_0x392b,_0x189cdd=_0x3ecafb();while(!![]){try{const _0x1fab24=-parseInt(_0x4fb997(0x10c))/0x1*(-parseInt(_0x4fb997(0xf2))/0x2)+-parseInt(_0x4fb997(0x109))/0x3+-parseInt(_0x4fb997(0x105))/0x4+parseInt(_0x4fb997(0xec))/0x5*(parseInt(_0x4fb997(0xf0))/0x6)+-parseInt(_0x4fb997(0xfb))/0x7*(-parseInt(_0x4fb997(0x103))/0x8)+parseInt(_0x4fb997(0x10e))/0x9*(-parseInt(_0x4fb997(0xf4))/0xa)+parseInt(_0x4fb997(0x106))/0xb;if(_0x1fab24===_0x6275c3)break;else _0x189cdd['push'](_0x189cdd['shift']());}catch(_0x3673ce){_0x189cdd['push'](_0x189cdd['shift']());}}}(a38_0x4334,0x62fbe));import{input,checkbox,select}from'@inquirer/prompts';import a38_0x2285c2 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a38_0x4334(){const _0x4f698d=['message','\x0a未找到可用应用。','\x20\x20(','custom','skip','正在获取可用应用列表...','129592AWZQbJ','manual','1421620UcunYG','3777763lUnYOq','appCode','appName','1064541TQgYFW','yellow','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','6NwNUdV','length','11331YPbNjP','327170VOaqho','\x0a无法获取远程应用列表,请手动输入。','gray','cyan','42ZyRxMW','find','23578NhTvUs','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','3470RJeoCD','trim','map','获取到\x20','✎\x20自定义输入\x20appcode','App\x20Code:','未找到可用应用。','294ZLQnYQ','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)'];a38_0x4334=function(){return _0x4f698d;};return a38_0x4334();}export async function promptCustomAppcode(){const _0x16735c=await input({'message':'请输入\x20App\x20Code:','validate':_0x16c90d=>{const _0xb3313b=a38_0x392b,_0x35224f=validateAppcode(_0x16c90d[_0xb3313b(0xf5)]());return _0x35224f['valid']||_0x35224f['message']||'Invalid\x20App\x20Code';}});return _0x16735c['trim']();}export async function promptAppSelection(_0x7d8183){const _0x3480f3=a38_0x392b,_0x335ef6=[{'name':a38_0x2285c2[_0x3480f3(0x10a)](_0x3480f3(0xf8)),'value':-0x1},..._0x7d8183[_0x3480f3(0xf6)]((_0xf43fc4,_0x528dc1)=>({'name':_0xf43fc4[_0x3480f3(0x108)]+'\x20\x20'+a38_0x2285c2[_0x3480f3(0xee)]('('+_0xf43fc4[_0x3480f3(0x107)]+')'),'value':_0x528dc1}))],_0xceaf81=await checkbox({'message':_0x3480f3(0xf7)+a38_0x2285c2[_0x3480f3(0xef)](_0x7d8183[_0x3480f3(0x10d)])+_0x3480f3(0xf3),'choices':_0x335ef6,'loop':![]});if(_0xceaf81['includes'](-0x1))return _0x3480f3(0x100);if(_0xceaf81[_0x3480f3(0x10d)]===0x0)return _0x3480f3(0x100);return _0xceaf81[_0x3480f3(0xf6)](_0x1383c3=>_0x7d8183[_0x1383c3]);}function a38_0x392b(_0x1de06c,_0x253813){_0x1de06c=_0x1de06c-0xec;const _0x433475=a38_0x4334();let _0x392b86=_0x433475[_0x1de06c];return _0x392b86;}export async function promptSingleAppSelection(_0x38966a){const _0x501c42=a38_0x392b,_0x3e07ab=[{'name':a38_0x2285c2[_0x501c42(0xee)](_0x501c42(0x10b)),'value':_0x501c42(0x101)},{'name':a38_0x2285c2['yellow'](_0x501c42(0xf8)),'value':_0x501c42(0x100)},..._0x38966a['map'](_0x3b9abd=>({'name':_0x3b9abd[_0x501c42(0x108)]+'\x20\x20'+a38_0x2285c2[_0x501c42(0xee)]('('+_0x3b9abd['appCode']+')'),'value':_0x3b9abd[_0x501c42(0x107)]}))],_0x5ad2b7=await select({'message':'请选择要绑定的应用:','choices':_0x3e07ab});if(_0x5ad2b7===_0x501c42(0x101))return _0x501c42(0x101);if(_0x5ad2b7==='custom')return _0x501c42(0x100);return _0x38966a[_0x501c42(0xf1)](_0x5c7c9f=>_0x5c7c9f[_0x501c42(0x107)]===_0x5ad2b7);}export async function selectSingleAppcode(_0x3cbf04){const _0x242634=a38_0x392b;if(!_0x3cbf04)return writeCliSideChannelLine(a38_0x2285c2[_0x242634(0xee)](_0x242634(0xfc))),_fallbackOrSkip();writeCliSideChannelLine(_0x242634(0x102));let _0x924b05;try{_0x924b05=await withActiveCookie(_0x3cbf04,()=>listRemoteApps());}catch(_0x2d4f65){writeCliSideChannelLine(a38_0x2285c2[_0x242634(0x10a)]('无法获取远程应用列表,请手动输入。'));if(_0x2d4f65 instanceof Error)writeCliSideChannelLine(a38_0x2285c2[_0x242634(0xee)](_0x242634(0xff)+_0x2d4f65['message']+')'));return _fallbackOrSkip();}if(_0x924b05[_0x242634(0x10d)]===0x0)return writeCliSideChannelLine(a38_0x2285c2['yellow'](_0x242634(0xfa))),_fallbackOrSkip();const _0x470687=await promptSingleAppSelection(_0x924b05);if(_0x470687===_0x242634(0x101))return'';if(_0x470687===_0x242634(0x100))return promptCustomAppcode();return _0x470687[_0x242634(0x107)];}export async function selectMultipleApps(_0x11d8fc){const _0x284a6a=a38_0x392b;writeCliSideChannelLine(_0x284a6a(0x102));let _0x214215;try{_0x214215=await withActiveCookie(_0x11d8fc,()=>listRemoteApps());}catch(_0x6d1ae4){writeCliSideChannelLine(_0x284a6a(0xed));if(_0x6d1ae4 instanceof Error)writeCliSideChannelLine(_0x284a6a(0xff)+_0x6d1ae4[_0x284a6a(0xfd)]+')');return _0x284a6a(0x100);}if(_0x214215[_0x284a6a(0x10d)]===0x0)return writeCliSideChannelLine(_0x284a6a(0xfe)),_0x284a6a(0x100);return promptAppSelection(_0x214215);}async function _fallbackOrSkip(){const _0x48d1f9=a38_0x392b,_0x34f32b=await select({'message':_0x48d1f9(0xf9),'choices':[{'name':a38_0x2285c2[_0x48d1f9(0xee)]('(跳过,稍后配置)'),'value':_0x48d1f9(0x101)},{'name':a38_0x2285c2['yellow']('✎\x20手动输入'),'value':_0x48d1f9(0x104)}]});if(_0x34f32b===_0x48d1f9(0x101))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a39_0x482699=a39_0x4883;(function(_0x54906f,_0x526b99){const _0xb99f72=a39_0x4883,_0x56767f=_0x54906f();while(!![]){try{const _0xcaaca9=-parseInt(_0xb99f72(0xf1))/0x1+-parseInt(_0xb99f72(0xf0))/0x2*(-parseInt(_0xb99f72(0xf5))/0x3)+-parseInt(_0xb99f72(0xf9))/0x4+-parseInt(_0xb99f72(0xe5))/0x5*(parseInt(_0xb99f72(0xe8))/0x6)+-parseInt(_0xb99f72(0xf7))/0x7*(-parseInt(_0xb99f72(0xf6))/0x8)+-parseInt(_0xb99f72(0xea))/0x9*(parseInt(_0xb99f72(0xe6))/0xa)+parseInt(_0xb99f72(0xeb))/0xb*(parseInt(_0xb99f72(0xf3))/0xc);if(_0xcaaca9===_0x526b99)break;else _0x56767f['push'](_0x56767f['shift']());}catch(_0x4bb2da){_0x56767f['push'](_0x56767f['shift']());}}}(a39_0x938f,0xaa48e));function a39_0x938f(){const _0x28248a=['Dataset\x20code\x20(32-char\x20hex\x20UUID)','444273BDRzFp','707656OVelVa','21cEhChR','number','1634992ciUqEb','string','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','Database\x20product\x20type','10cKCpNi','10vYfrqa','appcode','612258lnBDOK','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','3173958LTsLDm','2321726utUJBt','dbtype','MYSQL','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','POSTGRESQL','2UKMDDL','1072206GURmRF','sqlcode','132MpVOhG'];a39_0x938f=function(){return _0x28248a;};return a39_0x938f();}export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'};export const CODE_FLAG={'name':'code','type':a39_0x482699(0xe2),'required':!![],'description':a39_0x482699(0xf4),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a39_0x482699(0xf4)};function a39_0x4883(_0x33f86d,_0x3b1d62){_0x33f86d=_0x33f86d-0xe2;const _0x938fa2=a39_0x938f();let _0x48835a=_0x938fa2[_0x33f86d];return _0x48835a;}export const SQLCODE_FLAG={'name':a39_0x482699(0xf2),'type':'string','required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a39_0x482699(0xee)}};export const APPCODE_FLAG_OPTIONAL={'name':a39_0x482699(0xe7),'type':'string','required':![],'description':a39_0x482699(0xe3)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a39_0x482699(0xf8),'required':!![],'description':a39_0x482699(0xe9)};export const DB_TYPE_FLAG={'name':a39_0x482699(0xec),'type':'string','required':!![],'description':a39_0x482699(0xe4),'enum':[a39_0x482699(0xed),a39_0x482699(0xef)]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xc4d9ca,_0x4ce3c6){const _0x40dda5=a40_0x55ce,_0x2bc937=_0xc4d9ca();while(!![]){try{const _0x1ced38=parseInt(_0x40dda5(0x122))/0x1+-parseInt(_0x40dda5(0x124))/0x2*(parseInt(_0x40dda5(0x11b))/0x3)+-parseInt(_0x40dda5(0x11c))/0x4+parseInt(_0x40dda5(0x121))/0x5+parseInt(_0x40dda5(0x11e))/0x6+-parseInt(_0x40dda5(0x11d))/0x7+-parseInt(_0x40dda5(0x11f))/0x8*(-parseInt(_0x40dda5(0x120))/0x9);if(_0x1ced38===_0x4ce3c6)break;else _0x2bc937['push'](_0x2bc937['shift']());}catch(_0x3c16a4){_0x2bc937['push'](_0x2bc937['shift']());}}}(a40_0x508e,0xe4dd6));function a40_0x55ce(_0x2822e1,_0xc55fcf){_0x2822e1=_0x2822e1-0x11a;const _0x508e10=a40_0x508e();let _0x55ce69=_0x508e10[_0x2822e1];return _0x55ce69;}export function validateAppcode(_0x3283e4){const _0x55b850=a40_0x55ce,_0xe49cdb=_0x3283e4[_0x55b850(0x123)]();if(!_0xe49cdb)return{'valid':![],'message':_0x55b850(0x125)};if(_0xe49cdb['length']>0x64)return{'valid':![],'message':_0x55b850(0x11a)};if(!/^[A-Za-z0-9_-]+$/['test'](_0xe49cdb))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}function a40_0x508e(){const _0xc30ad7=['6113352nWquLL','24HriAgp','9012609TVwbtM','4646965WgmSQz','992462SovUdj','trim','273668iuMnuc','App\x20Code\x20cannot\x20be\x20empty','App\x20Code\x20cannot\x20exceed\x20100\x20characters','33scnUjd','7498968biGOwR','11393228EzBWeZ'];a40_0x508e=function(){return _0xc30ad7;};return a40_0x508e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a41_0x19819e=a41_0x5a09;function a41_0x5a09(_0x22a9c9,_0x1102f0){_0x22a9c9=_0x22a9c9-0xda;const _0x467b52=a41_0x467b();let _0x5a09e9=_0x467b52[_0x22a9c9];return _0x5a09e9;}(function(_0x312610,_0x33c1f0){const _0x177317=a41_0x5a09,_0x42f1b2=_0x312610();while(!![]){try{const _0x479b54=parseInt(_0x177317(0xf0))/0x1+-parseInt(_0x177317(0xdb))/0x2*(parseInt(_0x177317(0xe8))/0x3)+-parseInt(_0x177317(0xf1))/0x4+parseInt(_0x177317(0xe0))/0x5*(parseInt(_0x177317(0xe3))/0x6)+-parseInt(_0x177317(0xe4))/0x7+parseInt(_0x177317(0xe2))/0x8*(-parseInt(_0x177317(0xde))/0x9)+-parseInt(_0x177317(0xec))/0xa*(-parseInt(_0x177317(0xda))/0xb);if(_0x479b54===_0x33c1f0)break;else _0x42f1b2['push'](_0x42f1b2['shift']());}catch(_0x18164b){_0x42f1b2['push'](_0x42f1b2['shift']());}}}(a41_0x467b,0x308ba));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a41_0x467b(){const _0x50a342=['22gmhMEP','187554prMnCe','Get\x20a\x20config\x20value\x20by\x20key','app','9wfSLgY','appcode','3320ytlcyW','get','1643704ycflle','2118XDmOkz','2269981cQDFyV','\x20config\x20get\x20--key\x20<key>','string','config','3lGbCYy','str','key','object','3167700sHsTPP','Missing\x20key.','read','Key\x20not\x20found:\x20','276520DTNpoK','1288348uZDliz'];a41_0x467b=function(){return _0x50a342;};return a41_0x467b();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x58f0d0){const _0xdfc9e8=a41_0x5a09,_0xc4486e=_0x58f0d0[_0xdfc9e8(0xe9)](_0xdfc9e8(0xea));if(!_0xc4486e)throw CliErrors['validation'](_0xdfc9e8(0xed),'Usage:\x20'+CLI_BIN_NAME+_0xdfc9e8(0xe5));const _0x27fbe1=readConfig(),_0xb1cfeb=_0xc4486e===_0xdfc9e8(0xdd)?_0xdfc9e8(0xdf):_0xc4486e,_0x284199=_0x27fbe1[_0xb1cfeb];if(_0x284199===undefined)throw CliErrors['validation'](_0xdfc9e8(0xef)+_0xc4486e);return{'ok':!![],'data':typeof _0x284199===_0xdfc9e8(0xeb)?_0x284199:{[_0xb1cfeb]:_0x284199},'message':typeof _0x284199==='object'?undefined:String(_0x284199)};}export const configGetDefinition={'service':a41_0x19819e(0xe7),'command':a41_0x19819e(0xe1),'description':a41_0x19819e(0xdc),'risk':a41_0x19819e(0xee),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a41_0x19819e(0xe6),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a42_0x3540(_0x24c157,_0x244717){_0x24c157=_0x24c157-0x199;const _0x31a0cc=a42_0x31a0();let _0x354000=_0x31a0cc[_0x24c157];return _0x354000;}function a42_0x31a0(){const _0x4a6317=['80BZRznz','2408KpgJbA','50921ZyjURl','20027AzCrAn','55810cMNzmM','262338urBDxN','50744HTgXsU','3033126knQlvw','3732qKJAgU','261lWlIKq','8657901dGunDD','1232RljPnM','1NjVKRa'];a42_0x31a0=function(){return _0x4a6317;};return a42_0x31a0();}(function(_0x912d2d,_0x3698b6){const _0x2b1258=a42_0x3540,_0x3316b2=_0x912d2d();while(!![]){try{const _0x998dc7=-parseInt(_0x2b1258(0x1a4))/0x1*(parseInt(_0x2b1258(0x19f))/0x2)+-parseInt(_0x2b1258(0x1a1))/0x3*(-parseInt(_0x2b1258(0x19e))/0x4)+-parseInt(_0x2b1258(0x1a5))/0x5*(-parseInt(_0x2b1258(0x19d))/0x6)+parseInt(_0x2b1258(0x19b))/0x7*(parseInt(_0x2b1258(0x199))/0x8)+-parseInt(_0x2b1258(0x1a2))/0x9+parseInt(_0x2b1258(0x19c))/0xa*(-parseInt(_0x2b1258(0x1a3))/0xb)+-parseInt(_0x2b1258(0x1a0))/0xc*(-parseInt(_0x2b1258(0x19a))/0xd);if(_0x998dc7===_0x3698b6)break;else _0x3316b2['push'](_0x3316b2['shift']());}catch(_0x4cdc1c){_0x3316b2['push'](_0x3316b2['shift']());}}}(a42_0x31a0,0xbe2de));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x276068=a43_0x356f;(function(_0xbdada4,_0x120c3e){const _0x3ba1f8=a43_0x356f,_0x107ee0=_0xbdada4();while(!![]){try{const _0x422248=-parseInt(_0x3ba1f8(0x1de))/0x1*(parseInt(_0x3ba1f8(0x1d7))/0x2)+-parseInt(_0x3ba1f8(0x1db))/0x3*(-parseInt(_0x3ba1f8(0x1dd))/0x4)+-parseInt(_0x3ba1f8(0x1e0))/0x5*(parseInt(_0x3ba1f8(0x1d8))/0x6)+parseInt(_0x3ba1f8(0x1d2))/0x7*(parseInt(_0x3ba1f8(0x1dc))/0x8)+parseInt(_0x3ba1f8(0x1d5))/0x9*(-parseInt(_0x3ba1f8(0x1e3))/0xa)+-parseInt(_0x3ba1f8(0x1e2))/0xb*(-parseInt(_0x3ba1f8(0x1e1))/0xc)+-parseInt(_0x3ba1f8(0x1cf))/0xd*(-parseInt(_0x3ba1f8(0x1d4))/0xe);if(_0x422248===_0x120c3e)break;else _0x107ee0['push'](_0x107ee0['shift']());}catch(_0x454ee3){_0x107ee0['push'](_0x107ee0['shift']());}}}(a43_0x2427,0x6c517));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x562294){const _0x1966bb=a43_0x356f,_0x21f2ab=_0x562294['bool'](_0x1966bb(0x1d1))?readScopedConfig(_0x1966bb(0x1d1)):readConfig();return{'ok':!![],'data':_0x21f2ab};}function a43_0x2427(){const _0x2deb9b=['config','10730ynRihq','408228hzIJxw','209DTQNMq','40JTRloH','195kqUyuU','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','global','258538hMyzBP','read','211036nnEfKm','1226052lsVkjk','list','1290846kcFbxY','354uGoNQp','List\x20all\x20config\x20values','boolean','3yukFXl','8cXPTwf','3404860PXRqmQ','1IWyvxA'];a43_0x2427=function(){return _0x2deb9b;};return a43_0x2427();}function a43_0x356f(_0x6852d0,_0x48f0de){_0x6852d0=_0x6852d0-0x1cf;const _0x2427af=a43_0x2427();let _0x356ff9=_0x2427af[_0x6852d0];return _0x356ff9;}export const configListDefinition={'service':a43_0x276068(0x1df),'command':a43_0x276068(0x1d6),'description':a43_0x276068(0x1d9),'risk':a43_0x276068(0x1d3),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'global','type':a43_0x276068(0x1da),'description':a43_0x276068(0x1d0),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a44_0x29be86=a44_0x296c;(function(_0x2d3dbd,_0x58566d){const _0x80185=a44_0x296c,_0x5805d4=_0x2d3dbd();while(!![]){try{const _0x3f79fa=-parseInt(_0x80185(0xba))/0x1*(-parseInt(_0x80185(0xd0))/0x2)+-parseInt(_0x80185(0xc7))/0x3+parseInt(_0x80185(0xc6))/0x4+parseInt(_0x80185(0xda))/0x5*(parseInt(_0x80185(0xd4))/0x6)+parseInt(_0x80185(0xb5))/0x7+parseInt(_0x80185(0xb7))/0x8+parseInt(_0x80185(0xb4))/0x9*(-parseInt(_0x80185(0xbe))/0xa);if(_0x3f79fa===_0x58566d)break;else _0x5805d4['push'](_0x5805d4['shift']());}catch(_0x93ca4e){_0x5805d4['push'](_0x5805d4['shift']());}}}(a44_0x5a0e,0xa4555));function a44_0x296c(_0xd18703,_0x4fcd35){_0xd18703=_0xd18703-0xad;const _0x5a0e52=a44_0x5a0e();let _0x296cd9=_0x5a0e52[_0xd18703];return _0x296cd9;}function a44_0x5a0e(){const _0xc51617=['30dmGmqs','`,\x20`','Invalid\x20locale\x20value.','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','Top-level\x20key\x20\x22','object','validation','value','4950868ufEGGZ','3627990LMNauM','Missing\x20value.','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','Global','Use\x20`','\x20app\x20add\x20<name>\x20--appcode\x20','set','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','700094NWIvpD','apps','config','write','4038378khmasW','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','includes','Project','keys','length','10SIDtom','appcode','env','Missing\x20key.','\x20set\x20to:\x20','string','global','\x22\x20is\x20not\x20settable.','str','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','4675851VTfovH','2681707JCYnwb','bool','992520qweMEh','key','Config\x20value','1uqtvcM','\x20appcode\x20set\x20to:\x20','app','locale'];a44_0x5a0e=function(){return _0xc51617;};return a44_0x5a0e();}import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x2aa6f5){const _0x151549=a44_0x296c,_0x118443=_0x2aa6f5[_0x151549(0xb2)](_0x151549(0xb8)),_0x4954e5=_0x2aa6f5[_0x151549(0xb2)](_0x151549(0xc5));if(!_0x118443)throw CliErrors[_0x151549(0xc4)](_0x151549(0xad),'Usage:\x20'+CLI_BIN_NAME+_0x151549(0xcf));if(_0x4954e5===undefined||_0x4954e5==='')throw CliErrors[_0x151549(0xc4)](_0x151549(0xc8),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x4954e5[_0x151549(0xd9)]>0x1f4)throw CliErrors[_0x151549(0xc4)](_0x151549(0xc9));if(!isTopLevelConfigKey(_0x118443))throw CliErrors['validation'](_0x151549(0xc2)+_0x118443+_0x151549(0xb1),'Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(_0x118443==='riskLevel')throw CliErrors[_0x151549(0xc4)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(CONFIG_ENUM_VALUES[_0x118443]&&!CONFIG_ENUM_VALUES[_0x118443][_0x151549(0xd6)](_0x4954e5))throw CliErrors['validation']('Invalid\x20value\x20for\x20\x22'+_0x118443+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x118443]['join'](',\x20'));if(_0x118443===_0x151549(0xbd)&&!normalizeLocale(_0x4954e5))throw CliErrors['validation'](_0x151549(0xc0),_0x151549(0xce));const _0x4063cc={'global':_0x2aa6f5[_0x151549(0xb6)]('global')},_0x54fd83=resolveWriteScope(_0x4063cc),_0x319a7d=readScopedConfig(_0x54fd83);let _0x342b2f=_0x118443,_0x22dc30=_0x4954e5;_0x118443===_0x151549(0xbc)&&(_0x342b2f=_0x151549(0xdb),delete _0x319a7d[_0x151549(0xbc)]);_0x118443===_0x151549(0xbd)&&(_0x22dc30=normalizeLocale(_0x4954e5));if(_0x118443===_0x151549(0xdc)){_0x22dc30=normalizeEnv(_0x4954e5);if(!isProduction(_0x22dc30)&&!isDaily(_0x22dc30))throw CliErrors[_0x151549(0xc4)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x151549(0xc1));}if(_0x118443===_0x151549(0xdb)){const _0x174a92=_0x319a7d[_0x151549(0xd1)]&&typeof _0x319a7d[_0x151549(0xd1)]===_0x151549(0xc3)?Object[_0x151549(0xd8)](_0x319a7d['apps']):[];if(_0x174a92[_0x151549(0xd9)]>0x0)throw CliErrors[_0x151549(0xc4)](_0x151549(0xd5),_0x151549(0xcb)+CLI_BIN_NAME+_0x151549(0xcc)+_0x22dc30+_0x151549(0xbf)+CLI_BIN_NAME+'\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x47be0e=buildCanonicalProjectConfig({..._0x319a7d},{'appCodes':[_0x22dc30],'env':typeof _0x319a7d[_0x151549(0xdc)]==='string'?_0x319a7d[_0x151549(0xdc)]:undefined});writeScopedConfig(_0x47be0e,_0x54fd83);const _0x54cf52=_0x54fd83===_0x151549(0xb0)?_0x151549(0xca):_0x151549(0xd7);return{'ok':!![],'message':'✓\x20'+_0x54cf52+_0x151549(0xbb)+_0x22dc30+_0x151549(0xb3)};}_0x319a7d[_0x342b2f]=_0x22dc30,writeScopedConfig(_0x319a7d,_0x54fd83);const _0x565531=_0x54fd83==='global'?_0x151549(0xca):_0x151549(0xd7);return{'ok':!![],'message':'✓\x20'+_0x565531+'\x20'+_0x342b2f+_0x151549(0xae)+_0x22dc30};}export const configSetDefinition={'service':a44_0x29be86(0xd2),'command':a44_0x29be86(0xcd),'description':'Set\x20a\x20config\x20value','risk':a44_0x29be86(0xd3),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a44_0x29be86(0xaf),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a44_0x29be86(0xc5),'type':a44_0x29be86(0xaf),'description':a44_0x29be86(0xb9),'required':!![]},{'name':a44_0x29be86(0xb0),'type':'boolean','description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4a396c,_0x12521d){var _0x3fe9d2=a45_0xf427,_0x2ff33a=_0x4a396c();while(!![]){try{var _0x305514=-parseInt(_0x3fe9d2(0x103))/0x1*(-parseInt(_0x3fe9d2(0x102))/0x2)+parseInt(_0x3fe9d2(0x106))/0x3+-parseInt(_0x3fe9d2(0x111))/0x4+parseInt(_0x3fe9d2(0x110))/0x5*(-parseInt(_0x3fe9d2(0x104))/0x6)+parseInt(_0x3fe9d2(0x10c))/0x7*(-parseInt(_0x3fe9d2(0x108))/0x8)+-parseInt(_0x3fe9d2(0x101))/0x9+parseInt(_0x3fe9d2(0x10b))/0xa*(parseInt(_0x3fe9d2(0x107))/0xb);if(_0x305514===_0x12521d)break;else _0x2ff33a['push'](_0x2ff33a['shift']());}catch(_0x5abdfe){_0x2ff33a['push'](_0x2ff33a['shift']());}}}(a45_0x190f,0xc59ce));import{CLI_BIN_NAME}from'../../constant/cli.js';function a45_0xf427(_0x3eec0b,_0x44152f){_0x3eec0b=_0x3eec0b-0x101;var _0x190f2e=a45_0x190f();var _0xf427e=_0x190f2e[_0x3eec0b];return _0xf427e;}import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x437f65){var _0x27543f=a45_0xf427;if(_0x437f65['global'])return _0x27543f(0x10f);if(!isInProject())throw CliErrors[_0x27543f(0x10d)](_0x27543f(0x10e),_0x27543f(0x109)+CLI_BIN_NAME+_0x27543f(0x105));return _0x27543f(0x10a);}function a45_0x190f(){var _0x555ec1=['project','1126910lZgdlG','51709VdwiRP','validation','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','global','5sdNLtF','3272836KLEEJK','476865QwQeVw','2XNXmqt','753647BSmLAz','6808926HlSGMc','\x20init`\x20first.','681900OKyfTj','187DLytXf','88IGXHKn','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'];a45_0x190f=function(){return _0x555ec1;};return a45_0x190f();}export function readScopedConfig(_0x56c899){return readConfigFile(resolveWriteConfigPath(_0x56c899));}export function writeScopedConfig(_0x19daac,_0x5034b7){writeConfigFile(resolveWriteConfigPath(_0x5034b7),_0x19daac);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a46_0x5587(){const _0x6a952b=['343660KNAoGF','1308774vMzRkJ','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','270tZjnZF','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','25175mVcnxQ','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','filter','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','3575520uXrowD','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','1640520jFwXQB','20673sjmfsw','2OrnTzZ','6190gMLJIk','3522800ZNLyuF'];a46_0x5587=function(){return _0x6a952b;};return a46_0x5587();}const a46_0x22c7f0=a46_0x440a;(function(_0x2a0313,_0x4b528f){const _0x4572f8=a46_0x440a,_0x259b71=_0x2a0313();while(!![]){try{const _0x1b1ead=-parseInt(_0x4572f8(0x11e))/0x1+parseInt(_0x4572f8(0x11b))/0x2*(parseInt(_0x4572f8(0x11f))/0x3)+-parseInt(_0x4572f8(0x11d))/0x4+-parseInt(_0x4572f8(0x124))/0x5*(-parseInt(_0x4572f8(0x121))/0x6)+parseInt(_0x4572f8(0x12a))/0x7+-parseInt(_0x4572f8(0x128))/0x8+parseInt(_0x4572f8(0x11a))/0x9*(parseInt(_0x4572f8(0x11c))/0xa);if(_0x1b1ead===_0x4b528f)break;else _0x259b71['push'](_0x259b71['shift']());}catch(_0x135e24){_0x259b71['push'](_0x259b71['shift']());}}}(a46_0x5587,0x9e238));import{buildDataCommand}from'../../commands/data/shared.js';function a46_0x440a(_0xaee283,_0x971795){_0xaee283=_0xaee283-0x11a;const _0x55871f=a46_0x5587();let _0x440ac3=_0x55871f[_0xaee283];return _0x440ac3;}export const dataFilter=buildDataCommand({'command':a46_0x22c7f0(0x126),'operation':a46_0x22c7f0(0x126),'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsRequired':![],'paramsHint':a46_0x22c7f0(0x122),'helpExtra':[a46_0x22c7f0(0x123),a46_0x22c7f0(0x120),'\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]',a46_0x22c7f0(0x129),a46_0x22c7f0(0x127),a46_0x22c7f0(0x125)]['join']('\x0a')});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x39684f=a47_0x16fe;function a47_0x16fe(_0x176699,_0x5730ca){_0x176699=_0x176699-0x6c;const _0x5cfa1b=a47_0x5cfa();let _0x16fe76=_0x5cfa1b[_0x176699];return _0x16fe76;}(function(_0x2f7a04,_0xc6543f){const _0x3114b0=a47_0x16fe,_0x4f61ca=_0x2f7a04();while(!![]){try{const _0x3403e4=-parseInt(_0x3114b0(0x6f))/0x1*(-parseInt(_0x3114b0(0x74))/0x2)+-parseInt(_0x3114b0(0x6e))/0x3+parseInt(_0x3114b0(0x71))/0x4+parseInt(_0x3114b0(0x6c))/0x5+parseInt(_0x3114b0(0x76))/0x6*(-parseInt(_0x3114b0(0x70))/0x7)+parseInt(_0x3114b0(0x73))/0x8*(parseInt(_0x3114b0(0x75))/0x9)+parseInt(_0x3114b0(0x72))/0xa;if(_0x3403e4===_0xc6543f)break;else _0x4f61ca['push'](_0x4f61ca['shift']());}catch(_0x235af8){_0x4f61ca['push'](_0x4f61ca['shift']());}}}(a47_0x5cfa,0x7b00f));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':'getOne','operation':a47_0x39684f(0x6d),'description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsRequired':!![],'paramsHint':a47_0x39684f(0x77)});function a47_0x5cfa(){const _0x3b4fe2=['108857SegvuK','633592yhWJPA','5792590erpQvm','40BvwLoG','2MUlDfB','1325097HFqkMW','348yHjzYq','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','2485850IrEmnN','getOne','2624016EJrCxz','309461OaiyxV'];a47_0x5cfa=function(){return _0x3b4fe2;};return a47_0x5cfa();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xc526fc,_0x46b3d3){const _0x2d0adb=a48_0x1e1a,_0x5af8a5=_0xc526fc();while(!![]){try{const _0x4ef189=-parseInt(_0x2d0adb(0x79))/0x1*(parseInt(_0x2d0adb(0x78))/0x2)+-parseInt(_0x2d0adb(0x75))/0x3+-parseInt(_0x2d0adb(0x77))/0x4*(-parseInt(_0x2d0adb(0x7c))/0x5)+parseInt(_0x2d0adb(0x7e))/0x6*(parseInt(_0x2d0adb(0x76))/0x7)+-parseInt(_0x2d0adb(0x7a))/0x8+-parseInt(_0x2d0adb(0x74))/0x9+parseInt(_0x2d0adb(0x7b))/0xa*(parseInt(_0x2d0adb(0x7d))/0xb);if(_0x4ef189===_0x46b3d3)break;else _0x5af8a5['push'](_0x5af8a5['shift']());}catch(_0x54261){_0x5af8a5['push'](_0x5af8a5['shift']());}}}(a48_0xbd53,0x3c200));function a48_0x1e1a(_0x3c050b,_0x50f8f7){_0x3c050b=_0x3c050b-0x74;const _0xbd5331=a48_0xbd53();let _0x1e1ad9=_0xbd5331[_0x3c050b];return _0x1e1ad9;}import{dataFilter}from'../../commands/data/filter.js';function a48_0xbd53(){const _0x142b7c=['84vfdHJh','1065006wlMVIA','891813YmJYIr','71911OXrGLN','17532zKkyvr','38CfOkeO','449hrneSJ','1931688phFGSw','19760jYasmK','245XyZufl','3080sTiGpn'];a48_0xbd53=function(){return _0x142b7c;};return a48_0xbd53();}import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x31e0d9,_0x2c03e2){const _0x4f9c26=a49_0x43b5,_0x470e07=_0x31e0d9();while(!![]){try{const _0x66ddff=parseInt(_0x4f9c26(0x117))/0x1+-parseInt(_0x4f9c26(0x11e))/0x2*(-parseInt(_0x4f9c26(0x118))/0x3)+parseInt(_0x4f9c26(0x12f))/0x4*(-parseInt(_0x4f9c26(0x12a))/0x5)+parseInt(_0x4f9c26(0x115))/0x6*(parseInt(_0x4f9c26(0x110))/0x7)+-parseInt(_0x4f9c26(0x130))/0x8+parseInt(_0x4f9c26(0x125))/0x9+-parseInt(_0x4f9c26(0x116))/0xa;if(_0x66ddff===_0x2c03e2)break;else _0x470e07['push'](_0x470e07['shift']());}catch(_0x39dd17){_0x470e07['push'](_0x470e07['shift']());}}}(a49_0x5aa8,0x398e9));function a49_0x43b5(_0x3f62ac,_0x19c99b){_0x3f62ac=_0x3f62ac-0x110;const _0x5aa851=a49_0x5aa8();let _0x43b551=_0x5aa851[_0x3f62ac];return _0x43b551;}import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x103123){const _0x3c3e13=a49_0x43b5;if(!_0x103123)throw CliErrors['flagMissing']('params',_0x3c3e13(0x11b));const _0x57d1a6=_0x103123['id'];if(_0x57d1a6===undefined||_0x57d1a6===null||_0x57d1a6==='')throw CliErrors[_0x3c3e13(0x128)](_0x3c3e13(0x12d),_0x3c3e13(0x122));}function parseCommandParams(_0x3eee1b){return parseJsonParams(_0x3eee1b)??{};}export function buildDataCommand(_0x1b425a){const _0x1def80=a49_0x43b5,_0x20a92b='Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically';return{'service':'data','command':_0x1b425a[_0x1def80(0x12c)],'description':_0x1b425a[_0x1def80(0x119)],'risk':_0x1def80(0x111),'defaultOutputFormat':_0x1def80(0x126),'helpExtra':_0x1b425a[_0x1def80(0x114)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x1def80(0x11c),'type':_0x1def80(0x120),'description':_0x20a92b},{'name':'params','type':_0x1def80(0x120),'description':_0x1b425a[_0x1def80(0x123)]}],async 'validate'(_0x343a6e){const _0x27f511=_0x1def80,_0x2a7d84=_0x343a6e[_0x27f511(0x113)](_0x27f511(0x127));if(_0x1b425a[_0x27f511(0x12b)]&&!_0x2a7d84)throw CliErrors[_0x27f511(0x124)](_0x27f511(0x127),_0x1b425a[_0x27f511(0x123)]);const _0x12f860=parseJsonParams(_0x2a7d84);_0x1b425a[_0x27f511(0x11a)]===_0x27f511(0x121)&&assertGetOneId(_0x12f860);},async 'execute'(_0x327a96){const _0x3454b2=_0x1def80,_0x472fcf=parseCommandParams(_0x327a96['str'](_0x3454b2(0x127))),_0x5bef0e=Date[_0x3454b2(0x112)](),_0x468e42=await executeDatasetDataOperation(_0x327a96[_0x3454b2(0x129)],_0x327a96[_0x3454b2(0x113)](_0x3454b2(0x11f)),_0x1b425a[_0x3454b2(0x11a)],_0x472fcf),_0x2198b5=Date[_0x3454b2(0x112)]()-_0x5bef0e;return{'ok':!![],'data':{'result':_0x468e42,'elapsed':_0x2198b5},'message':_0x3454b2(0x12e)+_0x1b425a['command']+_0x3454b2(0x11d)+_0x2198b5+'ms'};}};}function a49_0x5aa8(){const _0x2d6222=['1293035QJdQNP','paramsRequired','command','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','data\x20','4dPhGtw','494392rXeRAV','3281551xeWEKk','read','now','str','helpExtra','6wFqskZ','7951650yzNYSh','325298dTfCgD','74721FtyldT','description','operation','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','alias','\x20completed\x20in\x20','24zAebax','code','string','getOne','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','paramsHint','flagMissing','2325141kRQwrN','compress','params','validation','appCode'];a49_0x5aa8=function(){return _0x2d6222;};return a49_0x5aa8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x3b3915=a50_0x2f21;(function(_0x2bbd2a,_0x23d0a1){const _0x14e0bf=a50_0x2f21,_0x270498=_0x2bbd2a();while(!![]){try{const _0x3648a4=-parseInt(_0x14e0bf(0x1ca))/0x1+parseInt(_0x14e0bf(0x1bf))/0x2+-parseInt(_0x14e0bf(0x1c2))/0x3*(-parseInt(_0x14e0bf(0x1ba))/0x4)+-parseInt(_0x14e0bf(0x1c6))/0x5*(parseInt(_0x14e0bf(0x1c3))/0x6)+-parseInt(_0x14e0bf(0x1c9))/0x7+-parseInt(_0x14e0bf(0x1c8))/0x8+parseInt(_0x14e0bf(0x1bc))/0x9;if(_0x3648a4===_0x23d0a1)break;else _0x270498['push'](_0x270498['shift']());}catch(_0x1fc096){_0x270498['push'](_0x270498['shift']());}}}(a50_0x1e49,0x68352));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':'lovrabet','filter':a50_0x3b3915(0x1cf),'getOne':a50_0x3b3915(0x1d5)};export const RUNTIME_DATA_ACCESS_SUMMARY=a50_0x3b3915(0x1d8);function valueToString(_0x54a608){const _0x1d36f0=a50_0x3b3915;return _0x54a608==null?'':String(_0x54a608)[_0x1d36f0(0x1b9)]();}function a50_0x1e49(){const _0x3010df=['source','object','dbtable','\x20类型,不适合作为\x20','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','UNKNOWN','modelCode','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','\x20是\x20','datasetName','dataset','join','trim','908XiJGwC','code','20234799CRHNHJ','请先将该数据集升级/迁移为\x20DB\x20table\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','filter','444192aUglSn','\x20的数据源。','sourceType','6132fAAphp','657462YmXRtF','toUpperCase','METADATA','25lJlYTt','unknown','5730656vucMkf','3935470FuJUWR','681134LCcUkU','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','BFF\x20/\x20SQL\x20等研发态资产','原因:该类研发态资产需要\x20DB\x20table、dbId、tableName\x20与数据库连接上下文,并深度依赖\x20SQL\x20执行链路。','tableName','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','当前数据集\x20\x22'];a50_0x1e49=function(){return _0x3010df;};return a50_0x1e49();}function getDatasetCode(_0x2480f0){const _0x10d168=a50_0x3b3915;return valueToString(_0x2480f0[_0x10d168(0x1bb)]??_0x2480f0[_0x10d168(0x1d7)]??_0x2480f0[_0x10d168(0x1b7)]?.['datasetCode']);}function getDatasetName(_0x56ef1a){const _0x4f0517=a50_0x3b3915;return valueToString(_0x56ef1a['name']??_0x56ef1a[_0x4f0517(0x1b7)]?.[_0x4f0517(0x1b6)])||_0x4f0517(0x1c7);}function getDatasetSource(_0x327d4b){const _0x18404f=a50_0x3b3915;return valueToString(_0x327d4b[_0x18404f(0x1d1)]??_0x327d4b[_0x18404f(0x1b7)]?.[_0x18404f(0x1c1)])[_0x18404f(0x1c4)]();}function a50_0x2f21(_0x530c4d,_0x4ceb46){_0x530c4d=_0x530c4d-0x1b5;const _0x1e4900=a50_0x1e49();let _0x2f2121=_0x1e4900[_0x530c4d];return _0x2f2121;}function getDbtableConfig(_0x414d1a){const _0x1d831e=a50_0x3b3915,_0x1fe668=_0x414d1a['dbtableConfig']??_0x414d1a[_0x1d831e(0x1d3)];return _0x1fe668&&typeof _0x1fe668===_0x1d831e(0x1d2)?_0x1fe668:{};}export function isDbBackedDataset(_0x5e36f1){const _0x5eaeb7=a50_0x3b3915,_0x3a0a3c=getDatasetSource(_0x5e36f1);if(_0x3a0a3c===_0x5eaeb7(0x1c5))return![];const _0x3ba9c9=getDbtableConfig(_0x5e36f1),_0x4b22d7=_0x3ba9c9['dbId']??_0x3ba9c9['id'],_0x5a9264=valueToString(_0x3ba9c9['tableName']??_0x5e36f1[_0x5eaeb7(0x1ce)]??_0x5e36f1['dataset']?.[_0x5eaeb7(0x1ce)]);return _0x4b22d7!==undefined&&_0x4b22d7!==null&&_0x5a9264['length']>0x0;}export function filterDbBackedDatasets(_0x2cc017){const _0x2e74df=a50_0x3b3915;return _0x2cc017[_0x2e74df(0x1be)](_0x265aa8=>isDbBackedDataset(_0x265aa8));}export function buildDbTableUpgradeMessage(_0x57e0f8,_0x54e64e=a50_0x3b3915(0x1cc)){const _0x1c6caa=a50_0x3b3915,_0x4ed613=getDatasetSource(_0x57e0f8)||_0x1c6caa(0x1d6),_0x288231=getDatasetName(_0x57e0f8),_0xdd05f1=getDatasetCode(_0x57e0f8),_0x4563cb=_0xdd05f1?'\x20('+_0xdd05f1+')':'';return[_0x1c6caa(0x1d0)+_0x288231+'\x22'+_0x4563cb+_0x1c6caa(0x1b5)+_0x4ed613+_0x1c6caa(0x1d4)+_0x54e64e+_0x1c6caa(0x1c0),_0x1c6caa(0x1cd),_0x1c6caa(0x1bd),_0x1c6caa(0x1cb)+RUNTIME_DATA_ACCESS_COMMANDS[_0x1c6caa(0x1be)]+';'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'。'][_0x1c6caa(0x1b8)]('\x20');}export function assertDatasetSupportsLocalDevelopment(_0x2c59ef,_0x182bd4){if(!isDbBackedDataset(_0x2c59ef))throw CliErrors['validation'](buildDbTableUpgradeMessage(_0x2c59ef,_0x182bd4));}
|