@lovrabet/rabetbase-cli 2.1.14-beta.0 → 2.1.14-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- 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 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/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 +3 -3
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a32_0x2da1cd=a32_0x4533;(function(_0x491def,_0x46ada3){const _0x5c14e7=a32_0x4533,_0x4ef708=_0x491def();while(!![]){try{const _0x33b583=parseInt(_0x5c14e7(0x1a9))/0x1*(-parseInt(_0x5c14e7(0x1ad))/0x2)+parseInt(_0x5c14e7(0x1e9))/0x3*(-parseInt(_0x5c14e7(0x198))/0x4)+-parseInt(_0x5c14e7(0x1c4))/0x5*(-parseInt(_0x5c14e7(0x1a0))/0x6)+parseInt(_0x5c14e7(0x1c0))/0x7*(-parseInt(_0x5c14e7(0x1af))/0x8)+parseInt(_0x5c14e7(0x1c5))/0x9*(-parseInt(_0x5c14e7(0x1bd))/0xa)+parseInt(_0x5c14e7(0x1d9))/0xb+-parseInt(_0x5c14e7(0x1a4))/0xc*(-parseInt(_0x5c14e7(0x1b2))/0xd);if(_0x33b583===_0x46ada3)break;else _0x4ef708['push'](_0x4ef708['shift']());}catch(_0x481851){_0x4ef708['push'](_0x4ef708['shift']());}}}(a32_0x39a0,0x21764));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';function a32_0x4533(_0x163cb6,_0x58bbd7){_0x163cb6=_0x163cb6-0x198;const _0x39a072=a32_0x39a0();let _0x4533bf=_0x39a072[_0x163cb6];return _0x4533bf;}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':a32_0x2da1cd(0x1a5),'command':a32_0x2da1cd(0x19e),'description':'Push\x20local\x20BFF\x20scripts\x20to\x20remote','risk':a32_0x2da1cd(0x1b8),'flags':[{'name':'type','type':a32_0x2da1cd(0x1ca),'description':a32_0x2da1cd(0x1d3),'enum':[a32_0x2da1cd(0x1ce),'ENDPOINT','HOOK']},{'name':a32_0x2da1cd(0x1ae),'type':a32_0x2da1cd(0x1ca),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a32_0x2da1cd(0x1c2),'type':a32_0x2da1cd(0x1d5),'description':a32_0x2da1cd(0x1cc)}],async 'dryRun'(_0x2f14d0){const _0x46bb1c=a32_0x2da1cd,_0x5b8cc0=loadBffProjectConfig(_0x2f14d0[_0x46bb1c(0x1eb)]),_0xa8dff7=await readBffLockFile(_0x5b8cc0[_0x46bb1c(0x1a3)]),{appLock:_0x4e5544}=ensureLockScope(_0xa8dff7??createEmptyBffLock(),_0x2f14d0['appCode'],_0x5b8cc0[_0x46bb1c(0x1d0)],_0x46bb1c(0x19e)),_0x11d3f0=await getTargetFunctions(_0x5b8cc0,_0x2f14d0),_0x5c3f45=_0x2f14d0[_0x46bb1c(0x19c)](_0x46bb1c(0x1c2)),_0x50b422=[];for(const _0x1e6b27 of _0x11d3f0){const _0x4b9992=await computeFileHash(_0x1e6b27[_0x46bb1c(0x199)]),_0xacc58d=_0x4e5544[_0x46bb1c(0x1dc)][_0x1e6b27['lockKey']],_0x404dca=!!_0xacc58d&&_0xacc58d[_0x46bb1c(0x1c9)]===_0x4b9992;_0x50b422['push']({'lockKey':_0x1e6b27[_0x46bb1c(0x1d7)],'filePath':_0x1e6b27[_0x46bb1c(0x199)],'remoteId':_0xacc58d?.[_0x46bb1c(0x1b6)]??null,'mode':_0xacc58d?.[_0x46bb1c(0x1b6)]?_0x46bb1c(0x19a):'create','status':!_0x5c3f45&&_0x404dca?'unchanged':_0x46bb1c(0x1b9)});}return{'method':_0x46bb1c(0x1c8),'url':_0x46bb1c(0x1c7),'body':{'appCode':_0x2f14d0[_0x46bb1c(0x1eb)],'force':_0x5c3f45,'files':_0x50b422,'cacheClearAtRuntime':_0x50b422[_0x46bb1c(0x1b1)](_0x25a139=>_0x25a139[_0x46bb1c(0x1aa)]==='would_push'),'cacheClearAtRuntimeTimes':_0x50b422[_0x46bb1c(0x1b1)](_0x4f9883=>_0x4f9883[_0x46bb1c(0x1aa)]===_0x46bb1c(0x1b9))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x46bb1c(0x1cf)+_0x50b422[_0x46bb1c(0x1a7)]+'\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0x28d22c){const _0x442242=a32_0x2da1cd,_0x19ef93=loadBffProjectConfig(_0x28d22c[_0x442242(0x1eb)]),_0x470b94=await readBffLockFile(_0x19ef93[_0x442242(0x1a3)]),{lockData:_0x23613b,appLock:_0x3cf746}=ensureLockScope(_0x470b94??createEmptyBffLock(),_0x28d22c[_0x442242(0x1eb)],_0x19ef93[_0x442242(0x1d0)],'push'),_0x1f4081=await getTargetFunctions(_0x19ef93,_0x28d22c);if(_0x1f4081['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x442242(0x19f)};const _0x3244b8=_0x28d22c['bool']('force'),_0x3309f3=JSON[_0x442242(0x1ac)](JSON[_0x442242(0x1c3)](_0x23613b)),_0x2b7a87=_0x3309f3[_0x442242(0x1c1)][_0x28d22c[_0x442242(0x1eb)]];if(!_0x2b7a87)throw new Error(_0x442242(0x1a8)+_0x28d22c[_0x442242(0x1eb)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x2edc1d=await buildHookMaps(_0x28d22c[_0x442242(0x1eb)],_0x28d22c[_0x442242(0x1e2)],_0x1f4081,_0x2b7a87),_0x52290e=[],_0x1a6acd=[],_0x218596=[];for(const _0x48f9f9 of _0x1f4081){const _0x2a27a4=await computeFileHash(_0x48f9f9[_0x442242(0x199)]),_0x55fefb=_0x2b7a87[_0x442242(0x1dc)][_0x48f9f9[_0x442242(0x1d7)]];if(!_0x3244b8&&_0x55fefb&&_0x55fefb[_0x442242(0x1c9)]===_0x2a27a4){_0x1a6acd[_0x442242(0x19e)]({'lockKey':_0x48f9f9['lockKey'],'reason':_0x442242(0x1d6)});continue;}try{await uploadSingleFunction(_0x28d22c['appCode'],_0x48f9f9,_0x2b7a87,_0x2edc1d);const _0x361d82=_0x2b7a87[_0x442242(0x1dc)][_0x48f9f9[_0x442242(0x1d7)]];_0x52290e[_0x442242(0x19e)]({'lockKey':_0x48f9f9[_0x442242(0x1d7)],'remoteId':_0x361d82?.['remoteId']??0x0});}catch(_0x4682df){_0x218596[_0x442242(0x19e)]({'lockKey':_0x48f9f9[_0x442242(0x1d7)],'error':_0x4682df instanceof Error?_0x4682df[_0x442242(0x1bf)]:String(_0x4682df)});}}_0x2b7a87[_0x442242(0x1e6)]=new Date()[_0x442242(0x1b7)](),await writeBffLockFile(_0x19ef93[_0x442242(0x1a3)],_0x3309f3),await waitForUploadedLockEntries(_0x19ef93[_0x442242(0x1a3)],_0x28d22c[_0x442242(0x1eb)],_0x52290e['map'](_0xcae3e2=>_0xcae3e2['lockKey']));let _0x2d2012={'attempted':![],'cleared':![]};if(_0x52290e[_0x442242(0x1a7)]>0x0)try{let _0x3a185b='';for(let _0x299d6e=0x0;_0x299d6e<CACHE_CLEAR_ATTEMPTS;_0x299d6e+=0x1){_0x3a185b=await clearBffScriptCache(),_0x299d6e<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x2d2012={'attempted':!![],'cleared':!![],'message':_0x3a185b||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x12e3fb){_0x2d2012={'attempted':!![],'cleared':![],'error':_0x12e3fb instanceof Error?_0x12e3fb[_0x442242(0x1bf)]:String(_0x12e3fb)};}const _0x3aeae7=_0x218596['length']===0x0&&(_0x2d2012[_0x442242(0x1d2)]?_0x2d2012[_0x442242(0x19d)]:!![]),_0x3a169a=_0x2d2012[_0x442242(0x1d2)]?_0x2d2012[_0x442242(0x19d)]?'runtime\x20cache\x20cleared':_0x442242(0x1e0):_0x442242(0x1e3);return{'ok':_0x3aeae7,'data':{'uploaded':_0x52290e,'skipped':_0x1a6acd,'failed':_0x218596,'cacheClear':_0x2d2012},'message':_0x442242(0x1df)+_0x52290e[_0x442242(0x1a7)]+_0x442242(0x1d4)+_0x1a6acd[_0x442242(0x1a7)]+'\x20skipped,\x20'+_0x218596[_0x442242(0x1a7)]+'\x20failed,\x20'+_0x3a169a};}};async function getTargetFunctions(_0x45777d,_0x4feef3){const _0x567d41=a32_0x2da1cd,_0xcce591=_0x4feef3[_0x567d41(0x1e5)](_0x567d41(0x1be)),_0x3e75ad=_0x4feef3[_0x567d41(0x1e5)](_0x567d41(0x1ae)),_0x9c0f1b=normalizeBffType(_0xcce591)??undefined;if(_0x3e75ad&&!_0x9c0f1b)throw CliErrors[_0x567d41(0x1b5)](_0x567d41(0x1e7));const _0x3f8159=await scanLocalBffFunctions(_0x45777d,_0x9c0f1b);if(_0x3e75ad){const _0x23084c=_0x3f8159['filter'](_0x1f85de=>_0x1f85de[_0x567d41(0x1ae)]===_0x3e75ad);if(_0x23084c[_0x567d41(0x1a7)]===0x0)throw CliErrors[_0x567d41(0x1b5)](_0x567d41(0x1d8)+_0x9c0f1b+'/'+_0x3e75ad);return _0x23084c;}return _0x3f8159;}async function buildHookMaps(_0x23cae4,_0x78e834,_0x2be718,_0x490333){const _0x70defe=a32_0x2da1cd,_0x505d73=_0x2be718[_0x70defe(0x1b1)](_0x5c7b2b=>_0x5c7b2b[_0x70defe(0x1be)]===_0x70defe(0x1b0));if(!_0x505d73)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x1da5f3=loadAliasMap(_0x78e834,undefined,resolveApiFilePath(_0x78e834,_0x23cae4)),_0x51305b=new Map(_0x1da5f3[_0x70defe(0x1ea)](_0x31cdfc=>[_0x31cdfc['alias'],_0x31cdfc[_0x70defe(0x1a1)]]));for(const _0x392d3f of Object[_0x70defe(0x1de)](_0x490333[_0x70defe(0x1dc)])){_0x392d3f[_0x70defe(0x1e1)]&&_0x392d3f[_0x70defe(0x1a1)]&&!_0x51305b['has'](_0x392d3f['alias'])&&_0x51305b[_0x70defe(0x1db)](_0x392d3f[_0x70defe(0x1e1)],_0x392d3f[_0x70defe(0x1a1)]);}const _0x2937cc=await listDatasets(_0x23cae4),_0x28ed3c=new Map(_0x2937cc['map'](_0x360b61=>[_0x360b61[_0x70defe(0x1e8)],_0x360b61]));return{'aliasToDatasetCode':_0x51305b,'datasetCodeToDataset':_0x28ed3c};}async function uploadSingleFunction(_0x1682fd,_0x59572a,_0x35022a,_0x3a825b){const _0x1f7f6a=a32_0x2da1cd,_0x1a3439=await readFile(_0x59572a[_0x1f7f6a(0x199)],'utf8'),_0xbd9eac=await computeFileHash(_0x59572a[_0x1f7f6a(0x199)]),_0x450fab=_0x35022a[_0x1f7f6a(0x1dc)][_0x59572a['lockKey']];if(_0x450fab?.[_0x1f7f6a(0x1b6)]&&_0x450fab[_0x1f7f6a(0x1a6)]==null)throw CliErrors[_0x1f7f6a(0x1b5)](_0x59572a[_0x1f7f6a(0x1d7)]+_0x1f7f6a(0x1da));let _0x107524=extractScriptDescription(_0x1a3439);if(!_0x107524&&_0x450fab?.[_0x1f7f6a(0x1b6)]){const _0x1be526=await getBffScriptInfo(_0x450fab[_0x1f7f6a(0x1b6)]);_0x107524=_0x1be526['description']||undefined;}const _0x3f342e={'appCode':_0x1682fd,'functionName':_0x59572a[_0x1f7f6a(0x1ae)],'scriptType':_0x59572a[_0x1f7f6a(0x1be)],'scriptContent':_0x1a3439};if(_0x450fab?.[_0x1f7f6a(0x1b6)])_0x3f342e['id']=_0x450fab[_0x1f7f6a(0x1b6)];if(_0x450fab?.[_0x1f7f6a(0x1a6)]!=null)_0x3f342e[_0x1f7f6a(0x1a6)]=_0x450fab[_0x1f7f6a(0x1a6)];if(_0x107524)_0x3f342e[_0x1f7f6a(0x1ba)]=_0x107524;if(_0x59572a[_0x1f7f6a(0x1be)]===_0x1f7f6a(0x1b0)){const _0x45a70c=_0x59572a[_0x1f7f6a(0x1e1)];if(!_0x45a70c||!_0x59572a[_0x1f7f6a(0x1b3)]||!_0x59572a[_0x1f7f6a(0x1cd)])throw CliErrors[_0x1f7f6a(0x1b5)](_0x1f7f6a(0x1cb)+_0x59572a[_0x1f7f6a(0x1d7)]);const _0x4e4c18=_0x3a825b[_0x1f7f6a(0x19b)][_0x1f7f6a(0x1d1)](_0x45a70c)??_0x450fab?.[_0x1f7f6a(0x1a1)]??_0x45a70c,_0xea0937=_0x3a825b[_0x1f7f6a(0x1ab)]['get'](_0x4e4c18);if(!_0xea0937)throw CliErrors[_0x1f7f6a(0x1b5)]('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x45a70c+_0x1f7f6a(0x1a2)+('Run\x20`'+CLI_BIN_NAME+_0x1f7f6a(0x1e4)));assertDatasetSupportsLocalDevelopment(_0xea0937,_0x1f7f6a(0x1bb)+_0x59572a['lockKey']),_0x3f342e[_0x1f7f6a(0x1dd)]=_0xea0937['id'],_0x3f342e[_0x1f7f6a(0x1b3)]=_0x59572a['operationType'],_0x3f342e['functionNode']=_0x59572a[_0x1f7f6a(0x1cd)];}const _0x4edf52=await saveBffScript(_0x3f342e),_0x98a08d=_0x4edf52['id'],_0x20d53e=_0x4edf52['script']??await getBffScriptInfo(_0x98a08d),_0x49fd3c={'hash':_0xbd9eac,'remoteId':_0x98a08d,'version':_0x20d53e[_0x1f7f6a(0x1a6)]};if(_0x59572a['type']===_0x1f7f6a(0x1b0)){const _0x48aa57=_0x59572a[_0x1f7f6a(0x1e1)],_0x566fba=_0x3a825b[_0x1f7f6a(0x19b)][_0x1f7f6a(0x1d1)](_0x48aa57)??_0x450fab?.[_0x1f7f6a(0x1a1)]??_0x48aa57;_0x3a825b[_0x1f7f6a(0x19b)]['has'](_0x48aa57)?_0x49fd3c[_0x1f7f6a(0x1e1)]=_0x48aa57:_0x49fd3c[_0x1f7f6a(0x1e1)]=_0x450fab?.[_0x1f7f6a(0x1e1)],_0x49fd3c[_0x1f7f6a(0x1a1)]=_0x566fba,_0x49fd3c[_0x1f7f6a(0x1b3)]=_0x59572a[_0x1f7f6a(0x1b3)],_0x49fd3c[_0x1f7f6a(0x1cd)]=_0x59572a[_0x1f7f6a(0x1cd)];}_0x35022a[_0x1f7f6a(0x1dc)][_0x59572a[_0x1f7f6a(0x1d7)]]=_0x49fd3c;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x5b8d20,_0x3816ee,_0x4bebcb){const _0x4c55c8=a32_0x2da1cd;if(_0x4bebcb[_0x4c55c8(0x1a7)]===0x0)return;for(let _0x357ef6=0x0;_0x357ef6<LOCK_SETTLE_RETRY_COUNT;_0x357ef6+=0x1){const _0x41463a=await readBffLockFile(_0x5b8d20),_0xfd7b22=_0x41463a?.[_0x4c55c8(0x1c1)]?.[_0x3816ee]?.[_0x4c55c8(0x1dc)]??{},_0x3d04a7=_0x4bebcb[_0x4c55c8(0x1bc)](_0x3e944b=>!!_0xfd7b22[_0x3e944b]?.[_0x4c55c8(0x1b6)]);if(_0x3d04a7)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x4c55c8(0x1b4)+_0x4bebcb[_0x4c55c8(0x1c6)](',\x20')+'.');}function a32_0x39a0(){const _0x490fd8=['boolean','unchanged','lockKey','Local\x20function\x20not\x20found:\x20','2201243thmHFF',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','set','functions','datasetId','values','Push\x20complete:\x20','runtime\x20cache\x20clear\x20failed','alias','apiDir','runtime\x20cache\x20not\x20needed','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','str','lastSync','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','code','443289Cechcd','map','appCode','4fmQvLo','filePath','update','aliasToDatasetCode','bool','cleared','push','No\x20local\x20BFF\x20functions\x20found.','6spjKwu','datasetCode','\x22.\x20','lockFilePath','1305468vQZDbZ','bff','version','length','Lock\x20scope\x20for\x20app\x20\x22','4227VkeoZK','status','datasetCodeToDataset','parse','54Zvmfqq','name','1216616QNJVJQ','HOOK','some','39nHRCha','operationType','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','validation','remoteId','toISOString','high-risk-write','would_push','description','BFF\x20HOOK\x20','every','25660JpvUHv','type','message','7WWjqIN','apps','force','stringify','674435tgnXqa','387EHiCuV','join','/api/management/library/scripts/save','POST','hash','string','Incomplete\x20HOOK\x20path:\x20','Force\x20push\x20ignoring\x20hash\x20protection','functionNode','COMMON','Would\x20inspect\x20','scriptsRoot','get','attempted','Push\x20only\x20this\x20script\x20type','\x20uploaded,\x20'];a32_0x39a0=function(){return _0x490fd8;};return a32_0x39a0();}
|
|
1
|
+
const a32_0x49c204=a32_0x1ec1;(function(_0x34b339,_0x1e5515){const _0x544c9f=a32_0x1ec1,_0x34006e=_0x34b339();while(!![]){try{const _0x414783=parseInt(_0x544c9f(0x147))/0x1+parseInt(_0x544c9f(0x11c))/0x2*(-parseInt(_0x544c9f(0x137))/0x3)+-parseInt(_0x544c9f(0x120))/0x4*(-parseInt(_0x544c9f(0x11d))/0x5)+parseInt(_0x544c9f(0x10d))/0x6*(-parseInt(_0x544c9f(0x135))/0x7)+parseInt(_0x544c9f(0x141))/0x8*(parseInt(_0x544c9f(0x106))/0x9)+-parseInt(_0x544c9f(0xfd))/0xa*(-parseInt(_0x544c9f(0x101))/0xb)+parseInt(_0x544c9f(0x108))/0xc*(-parseInt(_0x544c9f(0x114))/0xd);if(_0x414783===_0x1e5515)break;else _0x34006e['push'](_0x34006e['shift']());}catch(_0x15834d){_0x34006e['push'](_0x34006e['shift']());}}}(a32_0x202b,0x2721c));import{readFile}from'node:fs/promises';function a32_0x202b(){const _0x445870=['set','3964sKcWYR','string','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','unchanged','type','HOOK','Push\x20only\x20this\x20script\x20type','description','Runtime\x20script\x20cache\x20cleared.','No\x20local\x20BFF\x20functions\x20found.','scriptsRoot','Push\x20local\x20BFF\x20scripts\x20to\x20remote','Cannot\x20resolve\x20dataset\x20for\x20\x22','parse','runtime\x20cache\x20cleared','operationType','lockKey','functions','POST','lastSync','create','1355207sbqTWH','hash','24uDnKmh','apiDir','lockFilePath','Lock\x20scope\x20for\x20app\x20\x22','datasetId','/api/management/library/scripts/save','name','every','\x20uploaded,\x20','code','27944sbpnUU','alias','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','cleared','would_push','datasetCodeToDataset','295085opDzYs','str','BFF\x20HOOK\x20','push','filePath','stringify','functionNode','boolean','some','join','\x22\x20not\x20found\x20after\x20ensureLockScope.','map','version','\x20failed,\x20','toISOString','1550ZwflPF','script','get','attempted','6303sPzLlj','Push\x20complete:\x20','values','aliasToDatasetCode','COMMON','639IrAlfs','length','1296660ZgGDTY','runtime\x20cache\x20not\x20needed','status','validation','appCode','6myIcku','runtime\x20cache\x20clear\x20failed','remoteId','force','high-risk-write','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','Would\x20inspect\x20','13EtfUUQ','datasetCode','has','update','Run\x20`','apps','message','\x20skipped,\x20','57108tZqmMD','295lFKdnV','bff'];a32_0x202b=function(){return _0x445870;};return a32_0x202b();}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':a32_0x49c204(0x11e),'command':a32_0x49c204(0x14a),'description':a32_0x49c204(0x12b),'risk':a32_0x49c204(0x111),'flags':[{'name':a32_0x49c204(0x124),'type':a32_0x49c204(0x121),'description':a32_0x49c204(0x126),'enum':[a32_0x49c204(0x105),'ENDPOINT',a32_0x49c204(0x125)]},{'name':a32_0x49c204(0x13d),'type':a32_0x49c204(0x121),'description':a32_0x49c204(0x143)},{'name':a32_0x49c204(0x110),'type':a32_0x49c204(0xf5),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x42b1f3){const _0x1f82d2=a32_0x49c204,_0x5821a0=loadBffProjectConfig(_0x42b1f3[_0x1f82d2(0x10c)]),_0x2e34e8=await readBffLockFile(_0x5821a0[_0x1f82d2(0x139)]),{appLock:_0x30145b}=ensureLockScope(_0x2e34e8??createEmptyBffLock(),_0x42b1f3[_0x1f82d2(0x10c)],_0x5821a0['scriptsRoot'],_0x1f82d2(0x14a)),_0x482e47=await getTargetFunctions(_0x5821a0,_0x42b1f3),_0x46ad6f=_0x42b1f3['bool'](_0x1f82d2(0x110)),_0x4edcdc=[];for(const _0xb3d5b7 of _0x482e47){const _0x42ac37=await computeFileHash(_0xb3d5b7['filePath']),_0x33d532=_0x30145b[_0x1f82d2(0x131)][_0xb3d5b7['lockKey']],_0x28f3d6=!!_0x33d532&&_0x33d532[_0x1f82d2(0x136)]===_0x42ac37;_0x4edcdc[_0x1f82d2(0x14a)]({'lockKey':_0xb3d5b7['lockKey'],'filePath':_0xb3d5b7[_0x1f82d2(0x14b)],'remoteId':_0x33d532?.[_0x1f82d2(0x10f)]??null,'mode':_0x33d532?.[_0x1f82d2(0x10f)]?_0x1f82d2(0x117):_0x1f82d2(0x134),'status':!_0x46ad6f&&_0x28f3d6?_0x1f82d2(0x123):'would_push'});}return{'method':_0x1f82d2(0x132),'url':_0x1f82d2(0x13c),'body':{'appCode':_0x42b1f3['appCode'],'force':_0x46ad6f,'files':_0x4edcdc,'cacheClearAtRuntime':_0x4edcdc['some'](_0x1b0705=>_0x1b0705[_0x1f82d2(0x10a)]===_0x1f82d2(0x145)),'cacheClearAtRuntimeTimes':_0x4edcdc[_0x1f82d2(0xf6)](_0x4457e1=>_0x4457e1['status']==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x1f82d2(0x113)+_0x4edcdc[_0x1f82d2(0x107)]+_0x1f82d2(0x112)};},async 'execute'(_0x4ddf9b){const _0x2ec345=a32_0x49c204,_0xadf1f9=loadBffProjectConfig(_0x4ddf9b[_0x2ec345(0x10c)]),_0x229a98=await readBffLockFile(_0xadf1f9[_0x2ec345(0x139)]),{lockData:_0x427659,appLock:_0x372ea7}=ensureLockScope(_0x229a98??createEmptyBffLock(),_0x4ddf9b['appCode'],_0xadf1f9[_0x2ec345(0x12a)],_0x2ec345(0x14a)),_0x377038=await getTargetFunctions(_0xadf1f9,_0x4ddf9b);if(_0x377038[_0x2ec345(0x107)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x2ec345(0x129)};const _0x4e6a2c=_0x4ddf9b['bool'](_0x2ec345(0x110)),_0x32fb3c=JSON[_0x2ec345(0x12d)](JSON[_0x2ec345(0x14c)](_0x427659)),_0x14d49a=_0x32fb3c[_0x2ec345(0x119)][_0x4ddf9b[_0x2ec345(0x10c)]];if(!_0x14d49a)throw new Error(_0x2ec345(0x13a)+_0x4ddf9b[_0x2ec345(0x10c)]+_0x2ec345(0xf8));const _0x34f955=await buildHookMaps(_0x4ddf9b[_0x2ec345(0x10c)],_0x4ddf9b[_0x2ec345(0x138)],_0x377038,_0x14d49a),_0x1d8409=[],_0x59506f=[],_0x50ca5e=[];for(const _0x24d1d8 of _0x377038){const _0x4c7b8a=await computeFileHash(_0x24d1d8[_0x2ec345(0x14b)]),_0x309b87=_0x14d49a[_0x2ec345(0x131)][_0x24d1d8[_0x2ec345(0x130)]];if(!_0x4e6a2c&&_0x309b87&&_0x309b87[_0x2ec345(0x136)]===_0x4c7b8a){_0x59506f['push']({'lockKey':_0x24d1d8[_0x2ec345(0x130)],'reason':_0x2ec345(0x123)});continue;}try{await uploadSingleFunction(_0x4ddf9b[_0x2ec345(0x10c)],_0x24d1d8,_0x14d49a,_0x34f955);const _0x3910c0=_0x14d49a[_0x2ec345(0x131)][_0x24d1d8[_0x2ec345(0x130)]];_0x1d8409[_0x2ec345(0x14a)]({'lockKey':_0x24d1d8[_0x2ec345(0x130)],'remoteId':_0x3910c0?.[_0x2ec345(0x10f)]??0x0});}catch(_0x18ffcc){_0x50ca5e['push']({'lockKey':_0x24d1d8[_0x2ec345(0x130)],'error':_0x18ffcc instanceof Error?_0x18ffcc['message']:String(_0x18ffcc)});}}_0x14d49a[_0x2ec345(0x133)]=new Date()[_0x2ec345(0xfc)](),await writeBffLockFile(_0xadf1f9['lockFilePath'],_0x32fb3c),await waitForUploadedLockEntries(_0xadf1f9[_0x2ec345(0x139)],_0x4ddf9b['appCode'],_0x1d8409[_0x2ec345(0xf9)](_0x1248a9=>_0x1248a9[_0x2ec345(0x130)]));let _0x55b8c9={'attempted':![],'cleared':![]};if(_0x1d8409[_0x2ec345(0x107)]>0x0)try{let _0x59cf8a='';for(let _0x4cac87=0x0;_0x4cac87<CACHE_CLEAR_ATTEMPTS;_0x4cac87+=0x1){_0x59cf8a=await clearBffScriptCache(),_0x4cac87<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x55b8c9={'attempted':!![],'cleared':!![],'message':_0x59cf8a||_0x2ec345(0x128)};}catch(_0x38c50e){_0x55b8c9={'attempted':!![],'cleared':![],'error':_0x38c50e instanceof Error?_0x38c50e[_0x2ec345(0x11a)]:String(_0x38c50e)};}const _0x329f5f=_0x50ca5e[_0x2ec345(0x107)]===0x0&&(_0x55b8c9[_0x2ec345(0x100)]?_0x55b8c9[_0x2ec345(0x144)]:!![]),_0x30b8c2=_0x55b8c9[_0x2ec345(0x100)]?_0x55b8c9[_0x2ec345(0x144)]?_0x2ec345(0x12e):_0x2ec345(0x10e):_0x2ec345(0x109);return{'ok':_0x329f5f,'data':{'uploaded':_0x1d8409,'skipped':_0x59506f,'failed':_0x50ca5e,'cacheClear':_0x55b8c9},'message':_0x2ec345(0x102)+_0x1d8409[_0x2ec345(0x107)]+_0x2ec345(0x13f)+_0x59506f[_0x2ec345(0x107)]+_0x2ec345(0x11b)+_0x50ca5e[_0x2ec345(0x107)]+_0x2ec345(0xfb)+_0x30b8c2};}};async function getTargetFunctions(_0x3c6b1a,_0x358a43){const _0x35a738=a32_0x49c204,_0x4c23fb=_0x358a43[_0x35a738(0x148)](_0x35a738(0x124)),_0x146ede=_0x358a43[_0x35a738(0x148)](_0x35a738(0x13d)),_0x3e1a93=normalizeBffType(_0x4c23fb)??undefined;if(_0x146ede&&!_0x3e1a93)throw CliErrors[_0x35a738(0x10b)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x426905=await scanLocalBffFunctions(_0x3c6b1a,_0x3e1a93);if(_0x146ede){const _0x498384=_0x426905['filter'](_0x453370=>_0x453370['name']===_0x146ede);if(_0x498384['length']===0x0)throw CliErrors[_0x35a738(0x10b)]('Local\x20function\x20not\x20found:\x20'+_0x3e1a93+'/'+_0x146ede);return _0x498384;}return _0x426905;}function a32_0x1ec1(_0x1af3ff,_0x555fa4){_0x1af3ff=_0x1af3ff-0xf5;const _0x202b15=a32_0x202b();let _0x1ec164=_0x202b15[_0x1af3ff];return _0x1ec164;}async function buildHookMaps(_0x260c52,_0x428066,_0x39d97e,_0x2ecdb6){const _0x2758d8=a32_0x49c204,_0x52bb13=_0x39d97e[_0x2758d8(0xf6)](_0x2e9a55=>_0x2e9a55['type']===_0x2758d8(0x125));if(!_0x52bb13)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x1a38f6=loadAliasMap(_0x428066,undefined,resolveApiFilePath(_0x428066,_0x260c52)),_0x2c0654=new Map(_0x1a38f6[_0x2758d8(0xf9)](_0x7891e5=>[_0x7891e5['alias'],_0x7891e5[_0x2758d8(0x115)]]));for(const _0x2b0213 of Object[_0x2758d8(0x103)](_0x2ecdb6[_0x2758d8(0x131)])){_0x2b0213[_0x2758d8(0x142)]&&_0x2b0213[_0x2758d8(0x115)]&&!_0x2c0654[_0x2758d8(0x116)](_0x2b0213[_0x2758d8(0x142)])&&_0x2c0654[_0x2758d8(0x11f)](_0x2b0213[_0x2758d8(0x142)],_0x2b0213[_0x2758d8(0x115)]);}const _0x581ec7=await listDatasets(_0x260c52),_0x24f337=new Map(_0x581ec7['map'](_0x48aa2d=>[_0x48aa2d[_0x2758d8(0x140)],_0x48aa2d]));return{'aliasToDatasetCode':_0x2c0654,'datasetCodeToDataset':_0x24f337};}async function uploadSingleFunction(_0x32c92d,_0x2350d2,_0x2a6884,_0x37288c){const _0x40b0b5=a32_0x49c204,_0xc27d3a=await readFile(_0x2350d2['filePath'],'utf8'),_0x1cc7ce=await computeFileHash(_0x2350d2['filePath']),_0x5ce191=_0x2a6884[_0x40b0b5(0x131)][_0x2350d2['lockKey']];if(_0x5ce191?.[_0x40b0b5(0x10f)]&&_0x5ce191[_0x40b0b5(0xfa)]==null)throw CliErrors['validation'](_0x2350d2[_0x40b0b5(0x130)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x4cf4da=extractScriptDescription(_0xc27d3a);if(!_0x4cf4da&&_0x5ce191?.[_0x40b0b5(0x10f)]){const _0x30f297=await getBffScriptInfo(_0x5ce191['remoteId']);_0x4cf4da=_0x30f297[_0x40b0b5(0x127)]||undefined;}const _0xc1ec8d={'appCode':_0x32c92d,'functionName':_0x2350d2[_0x40b0b5(0x13d)],'scriptType':_0x2350d2[_0x40b0b5(0x124)],'scriptContent':_0xc27d3a};if(_0x5ce191?.[_0x40b0b5(0x10f)])_0xc1ec8d['id']=_0x5ce191['remoteId'];if(_0x5ce191?.[_0x40b0b5(0xfa)]!=null)_0xc1ec8d[_0x40b0b5(0xfa)]=_0x5ce191[_0x40b0b5(0xfa)];if(_0x4cf4da)_0xc1ec8d[_0x40b0b5(0x127)]=_0x4cf4da;if(_0x2350d2[_0x40b0b5(0x124)]===_0x40b0b5(0x125)){const _0x724797=_0x2350d2[_0x40b0b5(0x142)];if(!_0x724797||!_0x2350d2[_0x40b0b5(0x12f)]||!_0x2350d2[_0x40b0b5(0x14d)])throw CliErrors[_0x40b0b5(0x10b)]('Incomplete\x20HOOK\x20path:\x20'+_0x2350d2[_0x40b0b5(0x130)]);const _0x216368=_0x37288c['aliasToDatasetCode'][_0x40b0b5(0xff)](_0x724797)??_0x5ce191?.['datasetCode']??_0x724797,_0xdf01f0=_0x37288c[_0x40b0b5(0x146)][_0x40b0b5(0xff)](_0x216368);if(!_0xdf01f0)throw CliErrors[_0x40b0b5(0x10b)](_0x40b0b5(0x12c)+_0x724797+'\x22.\x20'+(_0x40b0b5(0x118)+CLI_BIN_NAME+_0x40b0b5(0x122)));assertDatasetSupportsLocalDevelopment(_0xdf01f0,_0x40b0b5(0x149)+_0x2350d2[_0x40b0b5(0x130)]),_0xc1ec8d[_0x40b0b5(0x13b)]=_0xdf01f0['id'],_0xc1ec8d[_0x40b0b5(0x12f)]=_0x2350d2['operationType'],_0xc1ec8d[_0x40b0b5(0x14d)]=_0x2350d2[_0x40b0b5(0x14d)];}const _0x541400=await saveBffScript(_0xc1ec8d),_0x15dc3e=_0x541400['id'],_0x414847=_0x541400[_0x40b0b5(0xfe)]??await getBffScriptInfo(_0x15dc3e),_0x24218c={'hash':_0x1cc7ce,'remoteId':_0x15dc3e,'version':_0x414847['version']};if(_0x2350d2[_0x40b0b5(0x124)]===_0x40b0b5(0x125)){const _0x2d0723=_0x2350d2[_0x40b0b5(0x142)],_0x3ef605=_0x37288c[_0x40b0b5(0x104)][_0x40b0b5(0xff)](_0x2d0723)??_0x5ce191?.[_0x40b0b5(0x115)]??_0x2d0723;_0x37288c[_0x40b0b5(0x104)]['has'](_0x2d0723)?_0x24218c[_0x40b0b5(0x142)]=_0x2d0723:_0x24218c[_0x40b0b5(0x142)]=_0x5ce191?.[_0x40b0b5(0x142)],_0x24218c[_0x40b0b5(0x115)]=_0x3ef605,_0x24218c[_0x40b0b5(0x12f)]=_0x2350d2[_0x40b0b5(0x12f)],_0x24218c['functionNode']=_0x2350d2[_0x40b0b5(0x14d)];}_0x2a6884[_0x40b0b5(0x131)][_0x2350d2[_0x40b0b5(0x130)]]=_0x24218c;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x506a17,_0x23cb86,_0x1db4b7){const _0x21e35f=a32_0x49c204;if(_0x1db4b7[_0x21e35f(0x107)]===0x0)return;for(let _0xe81821=0x0;_0xe81821<LOCK_SETTLE_RETRY_COUNT;_0xe81821+=0x1){const _0x317d1a=await readBffLockFile(_0x506a17),_0x387784=_0x317d1a?.[_0x21e35f(0x119)]?.[_0x23cb86]?.['functions']??{},_0x5d01a8=_0x1db4b7[_0x21e35f(0x13e)](_0x56acb0=>!!_0x387784[_0x56acb0]?.['remoteId']);if(_0x5d01a8)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x1db4b7[_0x21e35f(0xf7)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x399500=a33_0x37bf;(function(_0x4251c3,_0x1ae353){const _0x21ffb7=a33_0x37bf,_0x4b1c39=_0x4251c3();while(!![]){try{const _0x9b2255=-parseInt(_0x21ffb7(0x8b))/0x1+parseInt(_0x21ffb7(0x73))/0x2*(-parseInt(_0x21ffb7(0x81))/0x3)+parseInt(_0x21ffb7(0x69))/0x4+-parseInt(_0x21ffb7(0x6e))/0x5*(parseInt(_0x21ffb7(0x75))/0x6)+parseInt(_0x21ffb7(0x79))/0x7*(parseInt(_0x21ffb7(0x71))/0x8)+-parseInt(_0x21ffb7(0x6d))/0x9+parseInt(_0x21ffb7(0x72))/0xa*(parseInt(_0x21ffb7(0x77))/0xb);if(_0x9b2255===_0x1ae353)break;else _0x4b1c39['push'](_0x4b1c39['shift']());}catch(_0x454b49){_0x4b1c39['push'](_0x4b1c39['shift']());}}}(a33_0x430e,0xabbbd));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a33_0x37bf(_0x5db483,_0x314201){_0x5db483=_0x5db483-0x68;const _0x430e25=a33_0x430e();let _0x37bf82=_0x430e25[_0x5db483];return _0x37bf82;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a33_0x430e(){const _0x2e75fa=['apiDir','scriptsRoot','1102552JxkrOm','functions','alias','hash','8993718RaZiXS','130LsOCTO','filePath','appCode','304IsUAVm','233130PgFoVG','1748pvUooA','boolean','303762BTydhQ','bool','1991HuVYjb','status','109445RSiFXp','lockKey','\x20unchanged','all','\x20modified,\x20','read','bff','All\x20BFF\x20scripts\x20are\x20in\x20sync.','4803hNQdfE','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','has','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','lockFilePath','map','datasetCode','length','remote','push','671122GkOubN'];a33_0x430e=function(){return _0x2e75fa;};return a33_0x430e();}import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a33_0x399500(0x7f),'command':'status','description':a33_0x399500(0x82),'risk':a33_0x399500(0x7e),'flags':[{'name':a33_0x399500(0x89),'type':a33_0x399500(0x74),'description':a33_0x399500(0x84)}],async 'execute'(_0x2b132d){const _0x2d5955=a33_0x399500,_0x1e42bf=loadBffProjectConfig(_0x2b132d[_0x2d5955(0x70)]),_0x1509c8=await readBffLockFile(_0x1e42bf[_0x2d5955(0x85)]),{appLock:_0xd472c2}=ensureLockScope(_0x1509c8??createEmptyBffLock(),_0x2b132d[_0x2d5955(0x70)],_0x1e42bf[_0x2d5955(0x68)],_0x2d5955(0x78)),_0x1952fc=await scanLocalBffFunctions(_0x1e42bf),_0x208fa4=[],_0x333057=[],_0x5dbbfb=[];for(const _0x47b23e of _0x1952fc){const _0x402afc=await computeFileHash(_0x47b23e[_0x2d5955(0x6f)]),_0x1ef96c=_0xd472c2[_0x2d5955(0x6a)][_0x47b23e[_0x2d5955(0x7a)]];if(!_0x1ef96c)_0x208fa4[_0x2d5955(0x8a)](_0x47b23e[_0x2d5955(0x7a)]);else _0x1ef96c[_0x2d5955(0x6c)]!==_0x402afc?_0x333057[_0x2d5955(0x8a)](_0x47b23e['lockKey']):_0x5dbbfb['push'](_0x47b23e['lockKey']);}const _0x50bb60=[];if(_0x2b132d[_0x2d5955(0x76)](_0x2d5955(0x89))){const _0x4ee31f=loadAliasMap(_0x2b132d[_0x2d5955(0x8c)],undefined,resolveApiFilePath(_0x2b132d[_0x2d5955(0x8c)],_0x2b132d[_0x2d5955(0x70)])),_0x20fad6=new Map(_0x4ee31f[_0x2d5955(0x86)](_0x25b002=>[_0x25b002[_0x2d5955(0x87)],_0x25b002[_0x2d5955(0x6b)]])),[_0x59128a,_0x57f0e6]=await Promise[_0x2d5955(0x7c)]([listBffScripts(_0x2b132d['appCode']),getBffScriptStatistics(_0x2b132d[_0x2d5955(0x70)])]),_0x50fa7a=createHookLocationMap(_0x57f0e6),_0x981b61=new Set(_0x1952fc[_0x2d5955(0x86)](_0x3b22f4=>_0x3b22f4[_0x2d5955(0x7a)]));for(const _0x2609b8 of _0x59128a){const _0x2d5e1a=resolveRemoteScriptTarget(_0x1e42bf,_0x2609b8,_0x50fa7a,_0xd472c2[_0x2d5955(0x6a)],_0x20fad6);_0x2d5e1a&&!_0x981b61[_0x2d5955(0x83)](_0x2d5e1a['lockKey'])&&_0x50bb60['push'](_0x2d5e1a[_0x2d5955(0x7a)]);}}const _0x54bb00=_0x208fa4[_0x2d5955(0x88)]===0x0&&_0x333057[_0x2d5955(0x88)]===0x0&&_0x50bb60[_0x2d5955(0x88)]===0x0;return{'ok':!![],'data':{'added':_0x208fa4,'modified':_0x333057,'unchanged':_0x5dbbfb,'remoteOnly':_0x50bb60},'message':_0x54bb00?_0x2d5955(0x80):_0x208fa4[_0x2d5955(0x88)]+'\x20added,\x20'+_0x333057[_0x2d5955(0x88)]+_0x2d5955(0x7d)+_0x5dbbfb[_0x2d5955(0x88)]+_0x2d5955(0x7b)+(_0x50bb60[_0x2d5955(0x88)]>0x0?',\x20'+_0x50bb60['length']+'\x20remote-only':'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a34_0x82898c=a34_0x28f5;(function(_0x7293da,_0x2d5021){const _0x2a6db1=a34_0x28f5,_0x4c39b7=_0x7293da();while(!![]){try{const _0x4c7e49=parseInt(_0x2a6db1(0x98))/0x1*(-parseInt(_0x2a6db1(0x86))/0x2)+-parseInt(_0x2a6db1(0x94))/0x3+-parseInt(_0x2a6db1(0xa8))/0x4*(parseInt(_0x2a6db1(0xbb))/0x5)+parseInt(_0x2a6db1(0x71))/0x6*(parseInt(_0x2a6db1(0x7b))/0x7)+parseInt(_0x2a6db1(0xbf))/0x8*(-parseInt(_0x2a6db1(0xad))/0x9)+-parseInt(_0x2a6db1(0x87))/0xa*(parseInt(_0x2a6db1(0xb2))/0xb)+parseInt(_0x2a6db1(0x92))/0xc;if(_0x4c7e49===_0x2d5021)break;else _0x4c39b7['push'](_0x4c39b7['shift']());}catch(_0x1186c0){_0x4c39b7['push'](_0x4c39b7['shift']());}}}(a34_0x4181,0x6852a));import a34_0x17d004 from'chalk';import a34_0x3bfa13 from'ora';import a34_0x3827db 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 _0x50f8b6=a34_0x28f5;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x50f8b6(0x96)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x27577f=a34_0x28f5,_0x340199=process[_0x27577f(0x9e)]['toLowerCase']();if(_0x340199[_0x27577f(0xb8)](_0x27577f(0xb9)))return'bun';return _0x27577f(0xae);}const updateFlags=[{'name':a34_0x82898c(0x8c),'type':'boolean','description':a34_0x82898c(0x75),'default':![]},{'name':a34_0x82898c(0x8b),'type':a34_0x82898c(0x89),'description':a34_0x82898c(0xa7)},{'name':a34_0x82898c(0xc0),'type':a34_0x82898c(0x9d),'description':a34_0x82898c(0x82),'default':![]},{'name':a34_0x82898c(0x74),'type':a34_0x82898c(0x9d),'description':a34_0x82898c(0xa3),'default':!![],'hidden':!![]}];function getRequestedVersion(_0xa257ec){const _0x2f6039=a34_0x82898c;return _0xa257ec[_0x2f6039(0x6f)](_0x2f6039(0x8b))[_0x2f6039(0x7d)]();}function shouldSkipOfficialSkill(_0x3719b5){const _0x32bcce=a34_0x82898c;return _0x3719b5[_0x32bcce(0x79)](_0x32bcce(0xc0))||_0x3719b5[_0x32bcce(0xa9)](_0x32bcce(0x74))===![];}async function validateUpdateFlags(_0x2081aa){const _0x11c9d5=a34_0x82898c,_0x5d2b63=_0x2081aa[_0x11c9d5(0x79)](_0x11c9d5(0x8c)),_0x50d231=getRequestedVersion(_0x2081aa);if(_0x5d2b63&&_0x50d231)throw CliErrors[_0x11c9d5(0x9f)](_0x11c9d5(0xb0),_0x11c9d5(0xbd));if(_0x50d231&&!a34_0x3827db['valid'](_0x50d231))throw CliErrors[_0x11c9d5(0x9f)](_0x11c9d5(0xa0)+_0x50d231,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}function a34_0x4181(){const _0x55fdda=['Beta\x20version:\x20','skipped','Version\x20comparison\x20failed','bool','Update\x20available:\x20','7ajBEfc','fail','trim','write','Checking\x20official\x20skill\x20package...','stableVersion','succeed','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','gray','fromEntries','cwd','151322iAlIQy','800FAfCpG','\x20→\x20','string','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','version','beta','info','message','https://registry.npmjs.org/-/package/','Updating\x20via\x20','nonInteractive','21739020SSwMyc','log','1209984DxVAWp','filter','slice','unknown','4pbVMvb','entries','timeout','Update\x20failed','Updated\x20to\x20v','boolean','execPath','validation','Invalid\x20version:\x20','...','latest','Refresh\x20official\x20skill\x20package\x20after\x20updating','pipe','\x20\x20Run\x20manually:\x20','yellow','Install\x20a\x20specific\x20CLI\x20version','16KPzGqQ','flag','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Already\x20on\x20requested\x20version\x20(v','error','972TDqmbv','npm','\x20\x20Try\x20manually:\x20','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','valid','65131pwYqMj','Already\x20up\x20to\x20date\x20(v','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','green','start','inherit','includes','bun','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','569965QEWsLz','install','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','length','42904MQnrTr','no-skills','update','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','json','source','Checking\x20for\x20updates...','str','Skipping\x20official\x20skill\x20package\x20(--no-skills).','4983294AAVGji','/dist-tags','warn','skills','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag'];a34_0x4181=function(){return _0x55fdda;};return a34_0x4181();}async function fetchNpmDistTags(){const _0x58e246=a34_0x82898c;try{const _0x5c24c7=await fetch(_0x58e246(0x8f)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x58e246(0x72),{'signal':AbortSignal[_0x58e246(0x9a)](0x2710)});if(!_0x5c24c7['ok'])return null;const _0xf54ad6=await _0x5c24c7[_0x58e246(0xc3)]();if(!_0xf54ad6||typeof _0xf54ad6!=='object')return null;return Object[_0x58e246(0x84)](Object[_0x58e246(0x99)](_0xf54ad6)[_0x58e246(0x95)](([,_0x2ed80d])=>typeof _0x2ed80d===_0x58e246(0x89)&&_0x2ed80d['trim']()[_0x58e246(0xbe)]>0x0)['map'](([_0x278de5,_0x10b775])=>[_0x278de5,String(_0x10b775)[_0x58e246(0x7d)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x4b493b){const _0x41311b=await fetchNpmDistTags();return _0x41311b?.[_0x4b493b]??null;}async function fetchLatestVersion(){const _0x805662=a34_0x82898c,_0x34bd11=await fetchNpmDistTagVersion(_0x805662(0xa2));if(_0x34bd11)return _0x34bd11;const _0x25bfc7=await getCdnConfig();return _0x25bfc7?.['cli']?.[_0x805662(0x80)]??null;}async function resolveTargetVersion(_0x508357){const _0x3e60e6=a34_0x82898c,_0x125c20=getRequestedVersion(_0x508357);if(_0x125c20)return{'version':_0x125c20,'source':'version'};if(_0x508357[_0x3e60e6(0x79)](_0x3e60e6(0x8c))){const _0x2ee3e1=await fetchNpmDistTagVersion(_0x3e60e6(0x8c));if(!_0x2ee3e1)return null;return{'version':_0x2ee3e1,'source':_0x3e60e6(0x8c)};}const _0x2e44e2=await fetchLatestVersion();if(!_0x2e44e2)return null;return{'version':_0x2e44e2,'source':_0x3e60e6(0xa2)};}function shouldInstallTarget(_0x3d2ba3,_0x3df124){const _0x17db58=a34_0x82898c;if(_0x3df124[_0x17db58(0xc4)]===_0x17db58(0x8b)||_0x3df124[_0x17db58(0xc4)]==='beta')return!a34_0x3827db['eq'](_0x3d2ba3,_0x3df124[_0x17db58(0x8b)]);return a34_0x3827db['lt'](_0x3d2ba3,_0x3df124[_0x17db58(0x8b)]);}function getInstallPlanLabel(_0x493e2b,_0x4fc115){const _0x1a34cb=a34_0x82898c;switch(_0x4fc115['source']){case'beta':return _0x1a34cb(0x76)+a34_0x17d004[_0x1a34cb(0xa6)](_0x493e2b)+_0x1a34cb(0x88)+a34_0x17d004[_0x1a34cb(0xb5)](_0x4fc115[_0x1a34cb(0x8b)]);case _0x1a34cb(0x8b):return'Requested\x20version:\x20'+a34_0x17d004['yellow'](_0x493e2b)+_0x1a34cb(0x88)+a34_0x17d004['green'](_0x4fc115[_0x1a34cb(0x8b)]);case'latest':default:return _0x1a34cb(0x7a)+a34_0x17d004[_0x1a34cb(0xa6)](_0x493e2b)+'\x20→\x20'+a34_0x17d004['green'](_0x4fc115[_0x1a34cb(0x8b)]);}}async function installOfficialSkill(_0xeb32f5){const _0x2e0c89=a34_0x82898c;console[_0x2e0c89(0x93)](a34_0x17d004[_0x2e0c89(0x83)](_0x2e0c89(0x7f)));const _0x29c86f=runNpxSkillsAddGlobal(process[_0x2e0c89(0x85)](),RABETBASE_SKILL_SOURCE,{'stdio':_0xeb32f5?_0x2e0c89(0xa4):_0x2e0c89(0xb7)});if(_0x29c86f[_0x2e0c89(0x77)]){console[_0x2e0c89(0x93)](a34_0x17d004[_0x2e0c89(0x83)](_0x2e0c89(0xba)));return;}if(_0x29c86f['ok']){console['log'](a34_0x17d004[_0x2e0c89(0x83)]('\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.'));return;}console[_0x2e0c89(0x73)](a34_0x17d004[_0x2e0c89(0xa6)]('\x20\x20Official\x20skill\x20update\x20failed:\x20'+(_0x29c86f['error']||_0x2e0c89(0x97)))),console['log'](a34_0x17d004[_0x2e0c89(0x83)](_0x2e0c89(0xa5)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x44afa7){const _0x545784=a34_0x82898c;await validateUpdateFlags(_0x44afa7);const _0x9a8dc0=getCurrentVersion();console['log']('Current\x20version:\x20'+_0x9a8dc0);const _0x439b94=a34_0x3bfa13(_0x545784(0xc5))[_0x545784(0xb6)](),_0x592aed=await resolveTargetVersion(_0x44afa7);if(!_0x592aed){const _0x15a04e=_0x44afa7[_0x545784(0x79)](_0x545784(0x8c))?_0x545784(0x8a):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x439b94[_0x545784(0x7c)](_0x15a04e),console[_0x545784(0x93)](a34_0x17d004[_0x545784(0x83)](_0x545784(0xaa)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x15a04e};}const _0x458701=a34_0x3827db[_0x545784(0xb1)](VERSION),_0x459a23=a34_0x3827db['valid'](_0x592aed[_0x545784(0x8b)]);if(!_0x458701||!_0x459a23)return _0x439b94[_0x545784(0x7c)](_0x545784(0x78)),{'ok':![],'message':_0x545784(0x78)};if(!shouldInstallTarget(_0x458701,_0x592aed)){const _0x3504e9=_0x592aed['source']===_0x545784(0x8b)?_0x545784(0xab)+_0x592aed[_0x545784(0x8b)]+')':_0x545784(0xb3)+_0x592aed[_0x545784(0x8b)]+')';return _0x439b94[_0x545784(0x81)](_0x3504e9),shouldSkipOfficialSkill(_0x44afa7)?console[_0x545784(0x93)](a34_0x17d004['gray']('Skipping\x20official\x20skill\x20package\x20(--no-skills).')):await installOfficialSkill(_0x44afa7[_0x545784(0x91)]),{'ok':!![]};}_0x439b94[_0x545784(0x8d)](getInstallPlanLabel(_0x9a8dc0,_0x592aed));const _0xd2e49a=detectPackageManager(),_0x5e7678=_0xd2e49a===_0x545784(0xae)?resolveNpmBin(_0x545784(0xae)):_0xd2e49a,_0x59f1cc=a34_0x3bfa13(_0x545784(0x90)+_0xd2e49a+_0x545784(0xa1))[_0x545784(0xb6)]();try{return await execa(_0x5e7678,[_0x545784(0xbc),'-g',NPM_PACKAGE_NAME+'@'+_0x592aed['version']],{'stdio':_0x545784(0xa4)}),_0x59f1cc['succeed'](_0x545784(0x9c)+_0x592aed[_0x545784(0x8b)]),console['log'](a34_0x17d004[_0x545784(0x83)](_0x545784(0xc2))),shouldSkipOfficialSkill(_0x44afa7)?console[_0x545784(0x93)](a34_0x17d004[_0x545784(0x83)](_0x545784(0x70))):await installOfficialSkill(_0x44afa7[_0x545784(0x91)]),{'ok':!![]};}catch(_0x1a30dd){return _0x59f1cc[_0x545784(0x7c)](_0x545784(0x9b)),console[_0x545784(0xac)](a34_0x17d004['red']('\x20\x20'+_0x1a30dd[_0x545784(0x8e)])),console[_0x545784(0x93)](a34_0x17d004[_0x545784(0x83)](_0x545784(0xaf)+_0xd2e49a+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x592aed[_0x545784(0x8b)])),{'ok':![],'message':_0x1a30dd[_0x545784(0x8e)]};}}function a34_0x28f5(_0x28d214,_0x2cb55d){_0x28d214=_0x28d214-0x6f;const _0x4181d2=a34_0x4181();let _0x28f571=_0x4181d2[_0x28d214];return _0x28f571;}export const updateDefinition={'service':a34_0x82898c(0xc1),'command':'run','description':a34_0x82898c(0xb4),'risk':a34_0x82898c(0x7e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a34_0x15b66c=a34_0xe198;(function(_0x190f52,_0x46501c){const _0x35e8ab=a34_0xe198,_0x40c333=_0x190f52();while(!![]){try{const _0x47ae46=-parseInt(_0x35e8ab(0xd2))/0x1*(parseInt(_0x35e8ab(0xe3))/0x2)+parseInt(_0x35e8ab(0xea))/0x3*(-parseInt(_0x35e8ab(0xb0))/0x4)+parseInt(_0x35e8ab(0xb1))/0x5*(parseInt(_0x35e8ab(0xdd))/0x6)+-parseInt(_0x35e8ab(0xb3))/0x7+parseInt(_0x35e8ab(0xb5))/0x8*(parseInt(_0x35e8ab(0xc1))/0x9)+parseInt(_0x35e8ab(0xcd))/0xa+parseInt(_0x35e8ab(0xcf))/0xb;if(_0x47ae46===_0x46501c)break;else _0x40c333['push'](_0x40c333['shift']());}catch(_0x530c3d){_0x40c333['push'](_0x40c333['shift']());}}}(a34_0xdf90,0x4f9dc));import a34_0x2d9f6c from'chalk';import a34_0x1d4325 from'ora';import a34_0x5a7f9f 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';function a34_0xdf90(){const _0x278c24=['message','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','includes','str','beta','npm','Current\x20version:\x20','\x20\x20Run\x20manually:\x20','entries','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','\x20install\x20-g\x20','27SmPOKt','log','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','slice','boolean','Install\x20a\x20specific\x20CLI\x20version','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','gray','\x20→\x20','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','...','https://registry.npmjs.org/-/package/','5379040UniAdg','map','2761869ktNtXM','Update\x20available:\x20','trim','1gaNgVh','Update\x20failed','source','flag','info','run','latest','fromEntries','\x20\x20Official\x20skill\x20update\x20failed:\x20','json','timeout','186DqrChn','Checking\x20official\x20skill\x20package...','skills','Skipping\x20official\x20skill\x20package\x20(--no-skills).','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','inherit','86810cTgSfB','object','unknown','skipped','toLowerCase','yellow','pipe','33iIXZsb','cwd','Already\x20up\x20to\x20date\x20(v','string','validation','@latest','no-skills','start','version','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','error','succeed','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Requested\x20version:\x20','Already\x20on\x20requested\x20version\x20(v','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','warn','nonInteractive','Updated\x20to\x20v','length','fail','Version\x20comparison\x20failed','230948CfBxsF','57685IwqLeT','bool','1055138QrJwll','green','23264idrVrf'];a34_0xdf90=function(){return _0x278c24;};return a34_0xdf90();}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 _0x5c74a2=a34_0xe198;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x5c74a2(0xc4)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x51bbd2=a34_0xe198,_0x509153=process['execPath'][_0x51bbd2(0xe7)]();if(_0x509153[_0x51bbd2(0xb8)]('bun'))return'bun';return _0x51bbd2(0xbb);}const updateFlags=[{'name':a34_0x15b66c(0xba),'type':'boolean','description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':'version','type':'string','description':a34_0x15b66c(0xc6)},{'name':a34_0x15b66c(0xf0),'type':a34_0x15b66c(0xc5),'description':a34_0x15b66c(0xb7),'default':![]},{'name':'skills','type':'boolean','description':'Refresh\x20official\x20skill\x20package\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x844025){const _0x2a1302=a34_0x15b66c;return _0x844025[_0x2a1302(0xb9)](_0x2a1302(0xf2))['trim']();}function shouldSkipOfficialSkill(_0x5a34c5){const _0x2da5e4=a34_0x15b66c;return _0x5a34c5[_0x2da5e4(0xb2)](_0x2da5e4(0xf0))||_0x5a34c5[_0x2da5e4(0xd5)](_0x2da5e4(0xdf))===![];}async function validateUpdateFlags(_0x21500b){const _0x41265c=a34_0x15b66c,_0x3e3a22=_0x21500b['bool'](_0x41265c(0xba)),_0xcede01=getRequestedVersion(_0x21500b);if(_0x3e3a22&&_0xcede01)throw CliErrors['validation'](_0x41265c(0xa9),_0x41265c(0xca));if(_0xcede01&&!a34_0x5a7f9f['valid'](_0xcede01))throw CliErrors[_0x41265c(0xee)]('Invalid\x20version:\x20'+_0xcede01,_0x41265c(0xc7));}async function fetchNpmDistTags(){const _0x39cbd8=a34_0x15b66c;try{const _0x25c3b1=await fetch(_0x39cbd8(0xcc)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x39cbd8(0xdc)](0x2710)});if(!_0x25c3b1['ok'])return null;const _0x3aad4b=await _0x25c3b1[_0x39cbd8(0xdb)]();if(!_0x3aad4b||typeof _0x3aad4b!==_0x39cbd8(0xe4))return null;return Object[_0x39cbd8(0xd9)](Object[_0x39cbd8(0xbe)](_0x3aad4b)['filter'](([,_0x414565])=>typeof _0x414565===_0x39cbd8(0xed)&&_0x414565[_0x39cbd8(0xd1)]()[_0x39cbd8(0xad)]>0x0)[_0x39cbd8(0xce)](([_0x755b79,_0xea7814])=>[_0x755b79,String(_0xea7814)[_0x39cbd8(0xd1)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x38fd5e){const _0x25277d=await fetchNpmDistTags();return _0x25277d?.[_0x38fd5e]??null;}async function fetchLatestVersion(){const _0xb31506=await fetchNpmDistTagVersion('latest');if(_0xb31506)return _0xb31506;const _0x1c28be=await getCdnConfig();return _0x1c28be?.['cli']?.['stableVersion']??null;}function a34_0xe198(_0x100b82,_0x46e361){_0x100b82=_0x100b82-0xa7;const _0xdf90b7=a34_0xdf90();let _0xe19830=_0xdf90b7[_0x100b82];return _0xe19830;}async function resolveTargetVersion(_0x34b358){const _0x457cba=a34_0x15b66c,_0x6cd0da=getRequestedVersion(_0x34b358);if(_0x6cd0da)return{'version':_0x6cd0da,'source':_0x457cba(0xf2)};if(_0x34b358[_0x457cba(0xb2)]('beta')){const _0x36c777=await fetchNpmDistTagVersion(_0x457cba(0xba));if(!_0x36c777)return null;return{'version':_0x36c777,'source':'beta'};}const _0x2b43ce=await fetchLatestVersion();if(!_0x2b43ce)return null;return{'version':_0x2b43ce,'source':_0x457cba(0xd8)};}function shouldInstallTarget(_0x2b5f25,_0x289948){const _0x3e61e8=a34_0x15b66c;if(_0x289948[_0x3e61e8(0xd4)]===_0x3e61e8(0xf2)||_0x289948[_0x3e61e8(0xd4)]===_0x3e61e8(0xba))return!a34_0x5a7f9f['eq'](_0x2b5f25,_0x289948[_0x3e61e8(0xf2)]);return a34_0x5a7f9f['lt'](_0x2b5f25,_0x289948[_0x3e61e8(0xf2)]);}function getInstallPlanLabel(_0x2bbbe5,_0x1d75ea){const _0xdae59a=a34_0x15b66c;switch(_0x1d75ea[_0xdae59a(0xd4)]){case _0xdae59a(0xba):return'Beta\x20version:\x20'+a34_0x2d9f6c['yellow'](_0x2bbbe5)+_0xdae59a(0xc9)+a34_0x2d9f6c[_0xdae59a(0xb4)](_0x1d75ea[_0xdae59a(0xf2)]);case _0xdae59a(0xf2):return _0xdae59a(0xa7)+a34_0x2d9f6c['yellow'](_0x2bbbe5)+_0xdae59a(0xc9)+a34_0x2d9f6c[_0xdae59a(0xb4)](_0x1d75ea[_0xdae59a(0xf2)]);case _0xdae59a(0xd8):default:return _0xdae59a(0xd0)+a34_0x2d9f6c[_0xdae59a(0xe8)](_0x2bbbe5)+_0xdae59a(0xc9)+a34_0x2d9f6c['green'](_0x1d75ea[_0xdae59a(0xf2)]);}}async function installOfficialSkill(_0x1f0910){const _0x31d8f9=a34_0x15b66c;console[_0x31d8f9(0xc2)](a34_0x2d9f6c[_0x31d8f9(0xc8)](_0x31d8f9(0xde)));const _0x5c6eae=runNpxSkillsAddGlobal(process[_0x31d8f9(0xeb)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x1f0910?_0x31d8f9(0xe9):_0x31d8f9(0xe2)});if(_0x5c6eae[_0x31d8f9(0xe6)]){console[_0x31d8f9(0xc2)](a34_0x2d9f6c[_0x31d8f9(0xc8)](_0x31d8f9(0xf3)));return;}if(_0x5c6eae['ok']){console[_0x31d8f9(0xc2)](a34_0x2d9f6c[_0x31d8f9(0xc8)]('\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.'));return;}console[_0x31d8f9(0xaa)](a34_0x2d9f6c[_0x31d8f9(0xe8)](_0x31d8f9(0xda)+(_0x5c6eae['error']||_0x31d8f9(0xe5)))),console['log'](a34_0x2d9f6c[_0x31d8f9(0xc8)](_0x31d8f9(0xbd)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x292545){const _0x57ff15=a34_0x15b66c;await validateUpdateFlags(_0x292545);const _0x577300=getCurrentVersion();console[_0x57ff15(0xc2)](_0x57ff15(0xbc)+_0x577300);const _0x19f5fd=a34_0x1d4325('Checking\x20for\x20updates...')[_0x57ff15(0xf1)](),_0x45cee5=await resolveTargetVersion(_0x292545);if(!_0x45cee5){const _0x28033b=_0x292545[_0x57ff15(0xb2)](_0x57ff15(0xba))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x57ff15(0xe1);return _0x19f5fd[_0x57ff15(0xae)](_0x28033b),console[_0x57ff15(0xc2)](a34_0x2d9f6c[_0x57ff15(0xc8)](_0x57ff15(0xbf)+NPM_PACKAGE_NAME+_0x57ff15(0xef))),{'ok':![],'message':_0x28033b};}const _0x10dcea=a34_0x5a7f9f['valid'](VERSION),_0x3565ed=a34_0x5a7f9f['valid'](_0x45cee5['version']);if(!_0x10dcea||!_0x3565ed)return _0x19f5fd[_0x57ff15(0xae)](_0x57ff15(0xaf)),{'ok':![],'message':_0x57ff15(0xaf)};if(!shouldInstallTarget(_0x10dcea,_0x45cee5)){const _0xed16e2=_0x45cee5['source']===_0x57ff15(0xf2)?_0x57ff15(0xa8)+_0x45cee5[_0x57ff15(0xf2)]+')':_0x57ff15(0xec)+_0x45cee5['version']+')';return _0x19f5fd[_0x57ff15(0xf5)](_0xed16e2),shouldSkipOfficialSkill(_0x292545)?console[_0x57ff15(0xc2)](a34_0x2d9f6c[_0x57ff15(0xc8)](_0x57ff15(0xe0))):await installOfficialSkill(_0x292545[_0x57ff15(0xab)]),{'ok':!![]};}_0x19f5fd[_0x57ff15(0xd6)](getInstallPlanLabel(_0x577300,_0x45cee5));const _0x1a0ac9=detectPackageManager(),_0x5c1949=_0x1a0ac9===_0x57ff15(0xbb)?resolveNpmBin('npm'):_0x1a0ac9,_0x1798cf=a34_0x1d4325('Updating\x20via\x20'+_0x1a0ac9+_0x57ff15(0xcb))[_0x57ff15(0xf1)]();try{return await execa(_0x5c1949,['install','-g',NPM_PACKAGE_NAME+'@'+_0x45cee5[_0x57ff15(0xf2)]],{'stdio':'pipe'}),_0x1798cf[_0x57ff15(0xf5)](_0x57ff15(0xac)+_0x45cee5['version']),console['log'](a34_0x2d9f6c[_0x57ff15(0xc8)](_0x57ff15(0xc3))),shouldSkipOfficialSkill(_0x292545)?console[_0x57ff15(0xc2)](a34_0x2d9f6c[_0x57ff15(0xc8)](_0x57ff15(0xe0))):await installOfficialSkill(_0x292545['nonInteractive']),{'ok':!![]};}catch(_0x20cb5f){return _0x1798cf[_0x57ff15(0xae)](_0x57ff15(0xd3)),console[_0x57ff15(0xf4)](a34_0x2d9f6c['red']('\x20\x20'+_0x20cb5f['message'])),console[_0x57ff15(0xc2)](a34_0x2d9f6c[_0x57ff15(0xc8)]('\x20\x20Try\x20manually:\x20'+_0x1a0ac9+_0x57ff15(0xc0)+NPM_PACKAGE_NAME+'@'+_0x45cee5[_0x57ff15(0xf2)])),{'ok':![],'message':_0x20cb5f[_0x57ff15(0xb6)]};}}export const updateDefinition={'service':'update','command':a34_0x15b66c(0xd7),'description':a34_0x15b66c(0xf6),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x31196e,_0x2a07c7){const _0x349636=a35_0x144e,_0x1b1ec5=_0x31196e();while(!![]){try{const _0x2c9ac5=-parseInt(_0x349636(0xd3))/0x1*(parseInt(_0x349636(0xce))/0x2)+-parseInt(_0x349636(0xd4))/0x3+-parseInt(_0x349636(0xcb))/0x4+parseInt(_0x349636(0xcc))/0x5*(-parseInt(_0x349636(0xcf))/0x6)+-parseInt(_0x349636(0xcd))/0x7*(parseInt(_0x349636(0xd2))/0x8)+-parseInt(_0x349636(0xca))/0x9*(parseInt(_0x349636(0xd0))/0xa)+parseInt(_0x349636(0xd1))/0xb;if(_0x2c9ac5===_0x2a07c7)break;else _0x1b1ec5['push'](_0x1b1ec5['shift']());}catch(_0x4e7eaa){_0x1b1ec5['push'](_0x1b1ec5['shift']());}}}(a35_0x48c8,0x60416));function a35_0x48c8(){const _0x2d800d=['694510EafFtW','176715kQdReY','108bTwUCP','6DaZpqV','72170NbWSZi','21137490eVoXtM','104ZSHeoU','11188Exlcni','598533SgXzoM','9UXWNxG','997444lVjmSf'];a35_0x48c8=function(){return _0x2d800d;};return a35_0x48c8();}function a35_0x144e(_0x5937cc,_0x456008){_0x5937cc=_0x5937cc-0xca;const _0x48c829=a35_0x48c8();let _0x144ec0=_0x48c829[_0x5937cc];return _0x144ec0;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a36_0x2b71a9=a36_0x1f38;(function(_0x54daff,_0x58dd1d){const _0x2a232a=a36_0x1f38,_0x1adee1=_0x54daff();while(!![]){try{const _0xe142ec=parseInt(_0x2a232a(0x154))/0x1*(parseInt(_0x2a232a(0x150))/0x2)+-parseInt(_0x2a232a(0x158))/0x3+parseInt(_0x2a232a(0x14b))/0x4*(parseInt(_0x2a232a(0x152))/0x5)+parseInt(_0x2a232a(0x151))/0x6*(parseInt(_0x2a232a(0x14a))/0x7)+parseInt(_0x2a232a(0x15b))/0x8*(parseInt(_0x2a232a(0x157))/0x9)+-parseInt(_0x2a232a(0x147))/0xa+-parseInt(_0x2a232a(0x149))/0xb;if(_0xe142ec===_0x58dd1d)break;else _0x1adee1['push'](_0x1adee1['shift']());}catch(_0x12a7f3){_0x1adee1['push'](_0x1adee1['shift']());}}}(a36_0x3266,0xaab62));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a36_0x1f38(_0x5d2b5e,_0x5f2ebf){_0x5d2b5e=_0x5d2b5e-0x145;const _0x326659=a36_0x3266();let _0x1f3895=_0x326659[_0x5d2b5e];return _0x1f3895;}function a36_0x3266(){const _0x3c354a=['read','tableName','138360IlmRGi','code','5870722BTLrqN','14vPRjnr','255004kuXhAj','name','str','bool','skip-imports','1660684FjasXt','677748EBTapz','10nWChna','codegen','1zLTciC','operation','boolean','558IISqTU','861306oikJdp','appCode','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','45176WNprsy'];a36_0x3266=function(){return _0x3c354a;};return a36_0x3266();}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a36_0x2b71a9(0x153),'command':'sdk','description':a36_0x2b71a9(0x15a),'risk':a36_0x2b71a9(0x145),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a36_0x2b71a9(0x155),'type':'string','required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a36_0x2b71a9(0x14f),'type':a36_0x2b71a9(0x156),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x4fbf7a){const _0x28ba59=a36_0x2b71a9,{dataset:_0x5b7ee5,operation:_0xbec413}=await getOperationDetail(_0x4fbf7a[_0x28ba59(0x159)],_0x4fbf7a['str'](_0x28ba59(0x148)),_0x4fbf7a[_0x28ba59(0x14d)]('operation')),_0x2c4079=generateSdkCode(_0x5b7ee5,_0xbec413,{'includeImports':!_0x4fbf7a[_0x28ba59(0x14e)](_0x28ba59(0x14f))});return{'ok':!![],'data':{'dataset':{'name':_0x5b7ee5[_0x28ba59(0x14c)],'code':_0x5b7ee5[_0x28ba59(0x148)],'tableName':_0x5b7ee5[_0x28ba59(0x146)]},'operation':_0x4fbf7a[_0x28ba59(0x14d)](_0x28ba59(0x155)),'code':_0x2c4079}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a37_0x9a87a9=a37_0x5a89;(function(_0x269ec6,_0x207574){const _0x2e5b05=a37_0x5a89,_0x94beea=_0x269ec6();while(!![]){try{const _0x5b2db3=-parseInt(_0x2e5b05(0x1e3))/0x1+-parseInt(_0x2e5b05(0x1d4))/0x2+parseInt(_0x2e5b05(0x1e6))/0x3+-parseInt(_0x2e5b05(0x1e2))/0x4*(parseInt(_0x2e5b05(0x1de))/0x5)+-parseInt(_0x2e5b05(0x1da))/0x6+-parseInt(_0x2e5b05(0x1dc))/0x7+parseInt(_0x2e5b05(0x1d7))/0x8;if(_0x5b2db3===_0x207574)break;else _0x94beea['push'](_0x94beea['shift']());}catch(_0x200326){_0x94beea['push'](_0x94beea['shift']());}}}(a37_0x10d9,0xba12e));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a37_0x5a89(_0x2636d3,_0x11af2c){_0x2636d3=_0x2636d3-0x1d0;const _0x10d933=a37_0x10d9();let _0x5a8940=_0x10d933[_0x2636d3];return _0x5a8940;}export const codegenSql={'service':a37_0x9a87a9(0x1d0),'command':a37_0x9a87a9(0x1e7),'description':a37_0x9a87a9(0x1d6),'risk':a37_0x9a87a9(0x1e0),'flags':[SQLCODE_FLAG,{'name':'target','type':a37_0x9a87a9(0x1e4),'description':a37_0x9a87a9(0x1d8),'default':a37_0x9a87a9(0x1db),'enum':['sdk',a37_0x9a87a9(0x1d9)]},{'name':a37_0x9a87a9(0x1df),'type':'boolean','description':a37_0x9a87a9(0x1d5)}],async 'execute'(_0x191df8){const _0x182fab=a37_0x9a87a9,_0x5e484a=await getSqlQueryInfo(_0x191df8[_0x182fab(0x1dd)],_0x191df8[_0x182fab(0x1e5)](_0x182fab(0x1d1))),_0x197eb3=_0x191df8[_0x182fab(0x1e5)](_0x182fab(0x1d2))||_0x182fab(0x1db),_0x1e5daa=generateSqlCodeTemplate(_0x5e484a,{'target':_0x197eb3,'includeImports':!_0x191df8[_0x182fab(0x1e1)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x5e484a[_0x182fab(0x1d3)],'sqlName':_0x5e484a['sqlName'],'target':_0x197eb3,'code':_0x1e5daa}};}};function a37_0x10d9(){const _0x43f302=['str','2137701ZxksqY','sql','codegen','sqlcode','target','sqlCode','2246294vNyYRv','Omit\x20import\x20statements\x20from\x20generated\x20code','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','36796600ICjFwC','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','bff','8547270EXUqQm','sdk','4720884IVVTHh','appCode','1875mwIOnb','no-imports','read','bool','3100pGdEXd','1037255JuyBVa','string'];a37_0x10d9=function(){return _0x43f302;};return a37_0x10d9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x164b5d,_0x1c4a00){const _0x3889d8=a38_0x432e,_0x1cfcfd=_0x164b5d();while(!![]){try{const _0x3ce955=parseInt(_0x3889d8(0x17c))/0x1*(-parseInt(_0x3889d8(0x17d))/0x2)+parseInt(_0x3889d8(0x18b))/0x3+-parseInt(_0x3889d8(0x178))/0x4+-parseInt(_0x3889d8(0x189))/0x5*(parseInt(_0x3889d8(0x17a))/0x6)+-parseInt(_0x3889d8(0x18e))/0x7+-parseInt(_0x3889d8(0x185))/0x8+parseInt(_0x3889d8(0x181))/0x9;if(_0x3ce955===_0x1c4a00)break;else _0x1cfcfd['push'](_0x1cfcfd['shift']());}catch(_0x2a0401){_0x1cfcfd['push'](_0x1cfcfd['shift']());}}}(a38_0x5b80,0x700f6));import{input,checkbox,select}from'@inquirer/prompts';import a38_0x52777e from'chalk';import{validateAppcode}from'../../commands/common/validate.js';function a38_0x432e(_0x256aac,_0xec938d){_0x256aac=_0x256aac-0x16e;const _0x5b8001=a38_0x5b80();let _0x432eb1=_0x5b8001[_0x256aac];return _0x432eb1;}import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function a38_0x5b80(){const _0x2585ec=['appCode','✎\x20自定义输入\x20appcode','✎\x20手动输入','无法获取远程应用列表,请手动输入。','find','未找到可用应用。','\x0a未找到可用应用。','\x0a无法获取远程应用列表,请手动输入。','map','length','118116wetWvx','请选择要绑定的应用:','30eRUvPs','App\x20Code:','1kPsSnk','1753618cmacKp','\x20\x20(','正在获取可用应用列表...','(跳过,稍后配置)','21064383pMWnRo','trim','custom','includes','6361960GmPAvJ','manual','message','gray','227515YCetws','skip','1469490MzjgsN','yellow','valid','3095547XPxlcA'];a38_0x5b80=function(){return _0x2585ec;};return a38_0x5b80();}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0xf57000=await input({'message':'请输入\x20App\x20Code:','validate':_0x4fe62c=>{const _0x46a13e=a38_0x432e,_0x18d021=validateAppcode(_0x4fe62c[_0x46a13e(0x182)]());return _0x18d021[_0x46a13e(0x18d)]||_0x18d021['message']||'Invalid\x20App\x20Code';}});return _0xf57000['trim']();}export async function promptAppSelection(_0x16e773){const _0x457a58=a38_0x432e,_0x32de33=[{'name':a38_0x52777e[_0x457a58(0x18c)]('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0x16e773[_0x457a58(0x176)]((_0x58771b,_0xd75bcf)=>({'name':_0x58771b['appName']+'\x20\x20'+a38_0x52777e[_0x457a58(0x188)]('('+_0x58771b[_0x457a58(0x16e)]+')'),'value':_0xd75bcf}))],_0xc27334=await checkbox({'message':'获取到\x20'+a38_0x52777e['cyan'](_0x16e773['length'])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x32de33,'loop':![]});if(_0xc27334[_0x457a58(0x184)](-0x1))return _0x457a58(0x183);if(_0xc27334[_0x457a58(0x177)]===0x0)return'custom';return _0xc27334[_0x457a58(0x176)](_0x1b0257=>_0x16e773[_0x1b0257]);}export async function promptSingleAppSelection(_0x49060c){const _0x4d3f03=a38_0x432e,_0x320e61=[{'name':a38_0x52777e[_0x4d3f03(0x188)]('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x4d3f03(0x18a)},{'name':a38_0x52777e[_0x4d3f03(0x18c)](_0x4d3f03(0x16f)),'value':'custom'},..._0x49060c[_0x4d3f03(0x176)](_0x4f5301=>({'name':_0x4f5301['appName']+'\x20\x20'+a38_0x52777e['gray']('('+_0x4f5301[_0x4d3f03(0x16e)]+')'),'value':_0x4f5301[_0x4d3f03(0x16e)]}))],_0x3cf03f=await select({'message':_0x4d3f03(0x179),'choices':_0x320e61});if(_0x3cf03f==='skip')return _0x4d3f03(0x18a);if(_0x3cf03f===_0x4d3f03(0x183))return _0x4d3f03(0x183);return _0x49060c[_0x4d3f03(0x172)](_0x1766a9=>_0x1766a9[_0x4d3f03(0x16e)]===_0x3cf03f);}export async function selectSingleAppcode(_0x3c59f9){const _0x1ead75=a38_0x432e;if(!_0x3c59f9)return writeCliSideChannelLine(a38_0x52777e[_0x1ead75(0x188)]('(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)')),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x4ddfa6;try{_0x4ddfa6=await withActiveCookie(_0x3c59f9,()=>listRemoteApps());}catch(_0x57ff62){writeCliSideChannelLine(a38_0x52777e[_0x1ead75(0x18c)](_0x1ead75(0x171)));if(_0x57ff62 instanceof Error)writeCliSideChannelLine(a38_0x52777e[_0x1ead75(0x188)](_0x1ead75(0x17e)+_0x57ff62[_0x1ead75(0x187)]+')'));return _fallbackOrSkip();}if(_0x4ddfa6['length']===0x0)return writeCliSideChannelLine(a38_0x52777e['yellow'](_0x1ead75(0x173))),_fallbackOrSkip();const _0x24b5bd=await promptSingleAppSelection(_0x4ddfa6);if(_0x24b5bd==='skip')return'';if(_0x24b5bd==='custom')return promptCustomAppcode();return _0x24b5bd[_0x1ead75(0x16e)];}export async function selectMultipleApps(_0xe76307){const _0x21eea6=a38_0x432e;writeCliSideChannelLine(_0x21eea6(0x17f));let _0x47e86b;try{_0x47e86b=await withActiveCookie(_0xe76307,()=>listRemoteApps());}catch(_0x3e33e4){writeCliSideChannelLine(_0x21eea6(0x175));if(_0x3e33e4 instanceof Error)writeCliSideChannelLine(_0x21eea6(0x17e)+_0x3e33e4['message']+')');return _0x21eea6(0x183);}if(_0x47e86b['length']===0x0)return writeCliSideChannelLine(_0x21eea6(0x174)),'custom';return promptAppSelection(_0x47e86b);}async function _fallbackOrSkip(){const _0x1f5e88=a38_0x432e,_0x449ac4=await select({'message':_0x1f5e88(0x17b),'choices':[{'name':a38_0x52777e['gray'](_0x1f5e88(0x180)),'value':'skip'},{'name':a38_0x52777e['yellow'](_0x1f5e88(0x170)),'value':_0x1f5e88(0x186)}]});if(_0x449ac4==='skip')return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a39_0x1efe31=a39_0x8264;(function(_0x4aaa9f,_0xfa3f52){const _0x40cb62=a39_0x8264,_0x1e63f0=_0x4aaa9f();while(!![]){try{const _0x3ada2b=parseInt(_0x40cb62(0x1e7))/0x1+parseInt(_0x40cb62(0x1df))/0x2*(-parseInt(_0x40cb62(0x1ed))/0x3)+parseInt(_0x40cb62(0x1e3))/0x4*(parseInt(_0x40cb62(0x1eb))/0x5)+-parseInt(_0x40cb62(0x1ea))/0x6*(-parseInt(_0x40cb62(0x1f3))/0x7)+parseInt(_0x40cb62(0x1e1))/0x8+parseInt(_0x40cb62(0x1e4))/0x9+-parseInt(_0x40cb62(0x1f6))/0xa*(parseInt(_0x40cb62(0x1f2))/0xb);if(_0x3ada2b===_0xfa3f52)break;else _0x1e63f0['push'](_0x1e63f0['shift']());}catch(_0x31d97b){_0x1e63f0['push'](_0x1e63f0['shift']());}}}(a39_0x2781,0x3ab9b));function a39_0x2781(){const _0x592ea4=['2467152NTJjui','dbtype','Dataset\x20code\x20(32-char\x20hex\x20UUID)','367717FhSapI','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','number','15528iDcfIH','5fbNnli','appcode','9DrBKzS','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','MYSQL','string','11Emickt','105rPTnEO','POSTGRESQL','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','10317270ZICzdP','datasetcode','sqlcode','10466OBGtea','code','1450488ISRAhV','Database\x20product\x20type','1703956AiHaRR'];a39_0x2781=function(){return _0x592ea4;};return a39_0x2781();}export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a39_0x1efe31(0x1f5)};export const CODE_FLAG={'name':a39_0x1efe31(0x1e0),'type':a39_0x1efe31(0x1f1),'required':!![],'description':a39_0x1efe31(0x1e6),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a39_0x1efe31(0x1f7),'description':a39_0x1efe31(0x1e6)};export const SQLCODE_FLAG={'name':a39_0x1efe31(0x1f8),'type':a39_0x1efe31(0x1f1),'required':!![],'description':a39_0x1efe31(0x1ee),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a39_0x1efe31(0x1e8)}};export const APPCODE_FLAG_OPTIONAL={'name':a39_0x1efe31(0x1ec),'type':a39_0x1efe31(0x1f1),'required':![],'description':a39_0x1efe31(0x1ef)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};function a39_0x8264(_0x52e7d5,_0x54d874){_0x52e7d5=_0x52e7d5-0x1df;const _0x278108=a39_0x2781();let _0x82642f=_0x278108[_0x52e7d5];return _0x82642f;}export const DBLINK_ID_FLAG={'name':'id','type':a39_0x1efe31(0x1e9),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':a39_0x1efe31(0x1e5),'type':a39_0x1efe31(0x1f1),'required':!![],'description':a39_0x1efe31(0x1e2),'enum':[a39_0x1efe31(0x1f0),a39_0x1efe31(0x1f4)]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a40_0x444d(_0x5c84e5,_0x3ae9d0){_0x5c84e5=_0x5c84e5-0x193;const _0x306aff=a40_0x306a();let _0x444d7b=_0x306aff[_0x5c84e5];return _0x444d7b;}(function(_0x111790,_0x56a5d2){const _0x1a1bb9=a40_0x444d,_0x3d17da=_0x111790();while(!![]){try{const _0x5a2591=-parseInt(_0x1a1bb9(0x197))/0x1+-parseInt(_0x1a1bb9(0x194))/0x2*(parseInt(_0x1a1bb9(0x19f))/0x3)+-parseInt(_0x1a1bb9(0x1a0))/0x4+-parseInt(_0x1a1bb9(0x19c))/0x5+-parseInt(_0x1a1bb9(0x193))/0x6+-parseInt(_0x1a1bb9(0x195))/0x7*(-parseInt(_0x1a1bb9(0x19d))/0x8)+parseInt(_0x1a1bb9(0x198))/0x9*(parseInt(_0x1a1bb9(0x196))/0xa);if(_0x5a2591===_0x56a5d2)break;else _0x3d17da['push'](_0x3d17da['shift']());}catch(_0x469ca8){_0x3d17da['push'](_0x3d17da['shift']());}}}(a40_0x306a,0x20b0e));function a40_0x306a(){const _0x5f57f3=['392GswGrw','199395SbGKEW','70eUbWvT','32173YDDVsl','634887VyEhUR','length','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','test','116315fCImXv','40MQcPEM','trim','1698wTcvgN','319744IvxOpL','1536096uotWlQ'];a40_0x306a=function(){return _0x5f57f3;};return a40_0x306a();}export function validateAppcode(_0x369cbd){const _0x17ce22=a40_0x444d,_0x327549=_0x369cbd[_0x17ce22(0x19e)]();if(!_0x327549)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x327549[_0x17ce22(0x199)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/[_0x17ce22(0x19b)](_0x327549))return{'valid':![],'message':_0x17ce22(0x19a)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a41_0x454058=a41_0x2c16;(function(_0x319b04,_0x20bff1){const _0x42c870=a41_0x2c16,_0x263abd=_0x319b04();while(!![]){try{const _0xbf3217=parseInt(_0x42c870(0x1fa))/0x1+parseInt(_0x42c870(0x202))/0x2*(parseInt(_0x42c870(0x1f3))/0x3)+-parseInt(_0x42c870(0x1f9))/0x4*(parseInt(_0x42c870(0x1fe))/0x5)+-parseInt(_0x42c870(0x206))/0x6+parseInt(_0x42c870(0x1fb))/0x7*(-parseInt(_0x42c870(0x1ff))/0x8)+-parseInt(_0x42c870(0x1f0))/0x9+parseInt(_0x42c870(0x1f7))/0xa*(parseInt(_0x42c870(0x200))/0xb);if(_0xbf3217===_0x20bff1)break;else _0x263abd['push'](_0x263abd['shift']());}catch(_0x4e03d6){_0x263abd['push'](_0x263abd['shift']());}}}(a41_0x5c1d,0xc4623));import{CliErrors}from'../../errors.js';function a41_0x2c16(_0x4536b8,_0x3fe7cd){_0x4536b8=_0x4536b8-0x1f0;const _0x5c1d6b=a41_0x5c1d();let _0x2c1638=_0x5c1d6b[_0x4536b8];return _0x2c1638;}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x13c961){const _0x37543f=a41_0x2c16,_0x5c3b5f=_0x13c961[_0x37543f(0x207)](_0x37543f(0x201));if(!_0x5c3b5f)throw CliErrors[_0x37543f(0x1f2)](_0x37543f(0x1fc),_0x37543f(0x1fd)+CLI_BIN_NAME+_0x37543f(0x203));const _0x2bedc5=readConfig(),_0x88bcdc=_0x5c3b5f===_0x37543f(0x1f4)?_0x37543f(0x204):_0x5c3b5f,_0x5c743d=_0x2bedc5[_0x88bcdc];if(_0x5c743d===undefined)throw CliErrors[_0x37543f(0x1f2)](_0x37543f(0x1f1)+_0x5c3b5f);return{'ok':!![],'data':typeof _0x5c743d===_0x37543f(0x1f6)?_0x5c743d:{[_0x88bcdc]:_0x5c743d},'message':typeof _0x5c743d===_0x37543f(0x1f6)?undefined:String(_0x5c743d)};}function a41_0x5c1d(){const _0x29edb0=['object','49427890KeYHxC','config','6302008uXplfc','625276GWfhJl','7pkDTGG','Missing\x20key.','Usage:\x20','5QvdznA','4930256GKKcxr','11znqnLl','key','6bVrwst','\x20config\x20get\x20--key\x20<key>','appcode','get','7202748PPWnof','str','13618728XrlvLF','Key\x20not\x20found:\x20','validation','141756dcrpmq','app','read'];a41_0x5c1d=function(){return _0x29edb0;};return a41_0x5c1d();}export const configGetDefinition={'service':a41_0x454058(0x1f8),'command':a41_0x454058(0x205),'description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a41_0x454058(0x1f5),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a41_0x454058(0x201),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1c0c93,_0x16f5eb){const _0x552b21=a42_0x1915,_0x3d9506=_0x1c0c93();while(!![]){try{const _0x48000d=-parseInt(_0x552b21(0xbe))/0x1+-parseInt(_0x552b21(0xc2))/0x2+parseInt(_0x552b21(0xc7))/0x3+-parseInt(_0x552b21(0xc1))/0x4*(-parseInt(_0x552b21(0xbf))/0x5)+-parseInt(_0x552b21(0xc3))/0x6*(-parseInt(_0x552b21(0xc4))/0x7)+parseInt(_0x552b21(0xc6))/0x8*(-parseInt(_0x552b21(0xc5))/0x9)+parseInt(_0x552b21(0xc0))/0xa;if(_0x48000d===_0x16f5eb)break;else _0x3d9506['push'](_0x3d9506['shift']());}catch(_0x1ca406){_0x3d9506['push'](_0x3d9506['shift']());}}}(a42_0x442b,0xbf637));import{configListDefinition}from'../../commands/config/list.js';function a42_0x1915(_0x3ec2cd,_0x423890){_0x3ec2cd=_0x3ec2cd-0xbe;const _0x442b02=a42_0x442b();let _0x191529=_0x442b02[_0x3ec2cd];return _0x191529;}import{configGetDefinition}from'../../commands/config/get.js';function a42_0x442b(){const _0x4db56d=['9eCXsGK','2687384LmGEIr','3905832KzKilb','1467326yNVZND','7145fTxSIh','7602760HqYGqs','524HEHDuS','2251164WZgxvN','6DUMcPE','10243373QroWXl'];a42_0x442b=function(){return _0x4db56d;};return a42_0x442b();}import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a43_0x2712(){const _0x469c09=['36lxBsBC','global','904888AFVLPU','bool','749483gZrwQZ','1206117hOPSZC','List\x20all\x20config\x20values','1259880jRqzTx','626193AolSVv','5lxDUlz','1530528mxWWrk','config','373562eymqDg','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','read'];a43_0x2712=function(){return _0x469c09;};return a43_0x2712();}function a43_0x460b(_0x113a77,_0xc5d3fb){_0x113a77=_0x113a77-0xee;const _0x271216=a43_0x2712();let _0x460bad=_0x271216[_0x113a77];return _0x460bad;}const a43_0x40bc91=a43_0x460b;(function(_0x2af755,_0x1fb591){const _0x2dfe64=a43_0x460b,_0x1155e9=_0x2af755();while(!![]){try{const _0x38534c=parseInt(_0x2dfe64(0xf4))/0x1+-parseInt(_0x2dfe64(0xf8))/0x2+parseInt(_0x2dfe64(0xf3))/0x3+parseInt(_0x2dfe64(0xee))/0x4*(parseInt(_0x2dfe64(0xf5))/0x5)+parseInt(_0x2dfe64(0xfb))/0x6*(-parseInt(_0x2dfe64(0xf0))/0x7)+-parseInt(_0x2dfe64(0xf6))/0x8+parseInt(_0x2dfe64(0xf1))/0x9;if(_0x38534c===_0x1fb591)break;else _0x1155e9['push'](_0x1155e9['shift']());}catch(_0x3061d0){_0x1155e9['push'](_0x1155e9['shift']());}}}(a43_0x2712,0x5e355));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x3da291){const _0x290b3a=a43_0x460b,_0x14c933=_0x3da291[_0x290b3a(0xef)]('global')?readScopedConfig(_0x290b3a(0xfc)):readConfig();return{'ok':!![],'data':_0x14c933};}export const configListDefinition={'service':a43_0x40bc91(0xf7),'command':'list','description':a43_0x40bc91(0xf2),'risk':a43_0x40bc91(0xfa),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a43_0x40bc91(0xfc),'type':'boolean','description':a43_0x40bc91(0xf9),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a44_0x2e19a7=a44_0x13c2;(function(_0x22849e,_0x4e6189){const _0x408211=a44_0x13c2,_0x3bdd59=_0x22849e();while(!![]){try{const _0x434569=parseInt(_0x408211(0xe2))/0x1*(-parseInt(_0x408211(0xb4))/0x2)+parseInt(_0x408211(0xbf))/0x3+-parseInt(_0x408211(0xc6))/0x4+-parseInt(_0x408211(0xb3))/0x5*(-parseInt(_0x408211(0xbc))/0x6)+-parseInt(_0x408211(0xb7))/0x7*(-parseInt(_0x408211(0xc5))/0x8)+parseInt(_0x408211(0xc8))/0x9+-parseInt(_0x408211(0xc0))/0xa;if(_0x434569===_0x4e6189)break;else _0x3bdd59['push'](_0x3bdd59['shift']());}catch(_0x2c9be9){_0x3bdd59['push'](_0x3bdd59['shift']());}}}(a44_0x5340,0xdb0af));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a44_0x13c2(_0x4cfea9,_0x596019){_0x4cfea9=_0x4cfea9-0xb3;const _0x5340ad=a44_0x5340();let _0x13c2c7=_0x5340ad[_0x4cfea9];return _0x13c2c7;}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';function a44_0x5340(){const _0x3a3ae3=['app','5217276JMTPWx','18035290VIECXq','includes','length','str','set','7816208WdVrXZ','6485408kOUTMm','apps','6599781RfmDmo','Usage:\x20','boolean','\x22.\x20Allowed:\x20','string','validation','Global','Project','object','key','`,\x20`','Config\x20value','join','\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','value','\x22\x20is\x20not\x20settable.','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','keys','Settable\x20top-level\x20keys:\x20','Invalid\x20locale\x20value.','\x20app\x20add\x20<name>\x20--appcode\x20','Set\x20a\x20config\x20value','Use\x20`','locale','39233bBzDld','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Top-level\x20key\x20\x22','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','10gJuqcu','22FpCUZF','env','global','7iXbqvn','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','appcode','Missing\x20key.','write','3912648ymnTnN','config'];a44_0x5340=function(){return _0x3a3ae3;};return a44_0x5340();}async function execute(_0x3bc87c){const _0x39de08=a44_0x13c2,_0x4a5645=_0x3bc87c[_0x39de08(0xc3)](_0x39de08(0xd1)),_0xec9ee1=_0x3bc87c[_0x39de08(0xc3)]('value');if(!_0x4a5645)throw CliErrors['validation'](_0x39de08(0xba),_0x39de08(0xc9)+CLI_BIN_NAME+_0x39de08(0xe3));if(_0xec9ee1===undefined||_0xec9ee1==='')throw CliErrors[_0x39de08(0xcd)]('Missing\x20value.',_0x39de08(0xc9)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0xec9ee1[_0x39de08(0xc2)]>0x1f4)throw CliErrors[_0x39de08(0xcd)](_0x39de08(0xd6));if(!isTopLevelConfigKey(_0x4a5645))throw CliErrors[_0x39de08(0xcd)](_0x39de08(0xe5)+_0x4a5645+_0x39de08(0xd9),_0x39de08(0xdc)+getTopLevelConfigKeySummary());if(_0x4a5645==='riskLevel')throw CliErrors['validation'](_0x39de08(0xd7));if(CONFIG_ENUM_VALUES[_0x4a5645]&&!CONFIG_ENUM_VALUES[_0x4a5645][_0x39de08(0xc1)](_0xec9ee1))throw CliErrors['validation']('Invalid\x20value\x20for\x20\x22'+_0x4a5645+_0x39de08(0xcb)+CONFIG_ENUM_VALUES[_0x4a5645][_0x39de08(0xd4)](',\x20'));if(_0x4a5645===_0x39de08(0xe1)&&!normalizeLocale(_0xec9ee1))throw CliErrors[_0x39de08(0xcd)](_0x39de08(0xdd),_0x39de08(0xda));const _0x193d56={'global':_0x3bc87c['bool'](_0x39de08(0xb6))},_0x3c5667=resolveWriteScope(_0x193d56),_0x7a0918=readScopedConfig(_0x3c5667);let _0x14cd87=_0x4a5645,_0xb891a5=_0xec9ee1;_0x4a5645===_0x39de08(0xbe)&&(_0x14cd87=_0x39de08(0xb9),delete _0x7a0918['app']);_0x4a5645===_0x39de08(0xe1)&&(_0xb891a5=normalizeLocale(_0xec9ee1));if(_0x4a5645===_0x39de08(0xb5)){_0xb891a5=normalizeEnv(_0xec9ee1);if(!isProduction(_0xb891a5)&&!isDaily(_0xb891a5))throw CliErrors['validation'](_0x39de08(0xb8),'Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x4a5645===_0x39de08(0xb9)){const _0x4f7469=_0x7a0918['apps']&&typeof _0x7a0918['apps']===_0x39de08(0xd0)?Object[_0x39de08(0xdb)](_0x7a0918[_0x39de08(0xc7)]):[];if(_0x4f7469[_0x39de08(0xc2)]>0x0)throw CliErrors['validation'](_0x39de08(0xe4),_0x39de08(0xe0)+CLI_BIN_NAME+_0x39de08(0xde)+_0xb891a5+_0x39de08(0xd2)+CLI_BIN_NAME+_0x39de08(0xd5));const _0x61ba66=buildCanonicalProjectConfig({..._0x7a0918},{'appCodes':[_0xb891a5],'env':typeof _0x7a0918[_0x39de08(0xb5)]===_0x39de08(0xcc)?_0x7a0918[_0x39de08(0xb5)]:undefined});writeScopedConfig(_0x61ba66,_0x3c5667);const _0x272533=_0x3c5667===_0x39de08(0xb6)?_0x39de08(0xce):_0x39de08(0xcf);return{'ok':!![],'message':'✓\x20'+_0x272533+'\x20appcode\x20set\x20to:\x20'+_0xb891a5+'\x20(stored\x20as\x20apps\x20+\x20defaultApp)'};}_0x7a0918[_0x14cd87]=_0xb891a5,writeScopedConfig(_0x7a0918,_0x3c5667);const _0x54b24e=_0x3c5667===_0x39de08(0xb6)?_0x39de08(0xce):_0x39de08(0xcf);return{'ok':!![],'message':'✓\x20'+_0x54b24e+'\x20'+_0x14cd87+'\x20set\x20to:\x20'+_0xb891a5};}export const configSetDefinition={'service':a44_0x2e19a7(0xbd),'command':a44_0x2e19a7(0xc4),'description':a44_0x2e19a7(0xdf),'risk':a44_0x2e19a7(0xbb),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a44_0x2e19a7(0xd1),'type':a44_0x2e19a7(0xcc),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a44_0x2e19a7(0xd8),'type':a44_0x2e19a7(0xcc),'description':a44_0x2e19a7(0xd3),'required':!![]},{'name':a44_0x2e19a7(0xb6),'type':a44_0x2e19a7(0xca),'description':a44_0x2e19a7(0xe6),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x29cba1,_0x41fcbc){var _0x200507=a45_0x5332,_0x3e58df=_0x29cba1();while(!![]){try{var _0x39253a=-parseInt(_0x200507(0x182))/0x1+-parseInt(_0x200507(0x17b))/0x2+parseInt(_0x200507(0x17d))/0x3*(-parseInt(_0x200507(0x181))/0x4)+parseInt(_0x200507(0x186))/0x5+parseInt(_0x200507(0x17f))/0x6*(-parseInt(_0x200507(0x180))/0x7)+parseInt(_0x200507(0x188))/0x8+-parseInt(_0x200507(0x183))/0x9*(-parseInt(_0x200507(0x187))/0xa);if(_0x39253a===_0x41fcbc)break;else _0x3e58df['push'](_0x3e58df['shift']());}catch(_0x1ab2a8){_0x3e58df['push'](_0x3e58df['shift']());}}}(a45_0x245e,0x99a36));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';function a45_0x5332(_0x85efed,_0x39022d){_0x85efed=_0x85efed-0x17b;var _0x245e17=a45_0x245e();var _0x53324a=_0x245e17[_0x85efed];return _0x53324a;}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(_0x3c01f4){var _0x42ecae=a45_0x5332;if(_0x3c01f4[_0x42ecae(0x189)])return _0x42ecae(0x189);if(!isInProject())throw CliErrors[_0x42ecae(0x18a)](_0x42ecae(0x17c),_0x42ecae(0x185)+CLI_BIN_NAME+_0x42ecae(0x17e));return _0x42ecae(0x184);}export function readScopedConfig(_0x4e1f3a){return readConfigFile(resolveWriteConfigPath(_0x4e1f3a));}export function writeScopedConfig(_0x449bf1,_0x28b869){writeConfigFile(resolveWriteConfigPath(_0x28b869),_0x449bf1);}function a45_0x245e(){var _0x521268=['3722815gPJJDB','170650JxPwxW','2610344PIQHiD','global','validation','1375080wSEGxF','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','12WWjjIv','\x20init`\x20first.','2538ZzwJZj','4879fqQGGM','745152VrFKoE','335206wLnScy','855gRiIBm','project','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'];a45_0x245e=function(){return _0x521268;};return a45_0x245e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x4a1222=a46_0x5d4d;function a46_0x5d4d(_0x228ac3,_0xa7bb40){_0x228ac3=_0x228ac3-0x1b8;const _0x4fd75a=a46_0x4fd7();let _0x5d4da5=_0x4fd75a[_0x228ac3];return _0x5d4da5;}(function(_0x4cb653,_0x4cadd0){const _0x25f505=a46_0x5d4d,_0x18e938=_0x4cb653();while(!![]){try{const _0x4da6f5=-parseInt(_0x25f505(0x1c1))/0x1*(-parseInt(_0x25f505(0x1bd))/0x2)+parseInt(_0x25f505(0x1be))/0x3+parseInt(_0x25f505(0x1c5))/0x4+parseInt(_0x25f505(0x1c2))/0x5*(-parseInt(_0x25f505(0x1c4))/0x6)+parseInt(_0x25f505(0x1bf))/0x7*(parseInt(_0x25f505(0x1c0))/0x8)+-parseInt(_0x25f505(0x1ca))/0x9*(parseInt(_0x25f505(0x1bc))/0xa)+parseInt(_0x25f505(0x1ba))/0xb;if(_0x4da6f5===_0x4cadd0)break;else _0x18e938['push'](_0x18e938['shift']());}catch(_0x3d3bc9){_0x18e938['push'](_0x18e938['shift']());}}}(a46_0x4fd7,0x31a20));import{buildDataCommand}from'../../commands/data/shared.js';function a46_0x4fd7(){const _0x4f34c2=['\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}]','10DOnHbD','51476zCxobW','1139625xfHoDf','167958lIKaBY','24hiGeXI','2hkysdV','1592385GpBarh','\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]','6yBbCJO','1324724HuNsKv','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','3342339wSpBwn','join','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','644930CkKTQu'];a46_0x4fd7=function(){return _0x4f34c2;};return a46_0x4fd7();}export const dataFilter=buildDataCommand({'command':'filter','operation':'filter','description':a46_0x4a1222(0x1c7),'paramsRequired':![],'paramsHint':'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','helpExtra':[a46_0x4a1222(0x1c8),a46_0x4a1222(0x1c6),a46_0x4a1222(0x1c3),a46_0x4a1222(0x1bb),a46_0x4a1222(0x1b9),a46_0x4a1222(0x1c9)][a46_0x4a1222(0x1b8)]('\x0a')});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x10e32e=a47_0x5f52;function a47_0x5f52(_0x44e66b,_0x3ae144){_0x44e66b=_0x44e66b-0x105;const _0x479b7d=a47_0x479b();let _0x5f5294=_0x479b7d[_0x44e66b];return _0x5f5294;}(function(_0x31de4b,_0x3ff745){const _0x17c4a6=a47_0x5f52,_0x541774=_0x31de4b();while(!![]){try{const _0x3091e1=-parseInt(_0x17c4a6(0x106))/0x1+-parseInt(_0x17c4a6(0x107))/0x2+-parseInt(_0x17c4a6(0x108))/0x3*(parseInt(_0x17c4a6(0x10c))/0x4)+parseInt(_0x17c4a6(0x10d))/0x5*(-parseInt(_0x17c4a6(0x10a))/0x6)+parseInt(_0x17c4a6(0x10e))/0x7+parseInt(_0x17c4a6(0x105))/0x8+-parseInt(_0x17c4a6(0x10f))/0x9*(-parseInt(_0x17c4a6(0x10b))/0xa);if(_0x3091e1===_0x3ff745)break;else _0x541774['push'](_0x541774['shift']());}catch(_0x4917b0){_0x541774['push'](_0x541774['shift']());}}}(a47_0x479b,0xe5c0b));import{buildDataCommand}from'../../commands/data/shared.js';function a47_0x479b(){const _0x148cdb=['171sLALar','getOne','9964848Ianxio','1537458GzXMVi','693076WwTGdg','3PBbphk','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','6jWjWcc','1923270PEuOuZ','5296560XBtJPy','6835370YmnNQt','4315206CmAVao'];a47_0x479b=function(){return _0x148cdb;};return a47_0x479b();}export const dataGetOne=buildDataCommand({'command':a47_0x10e32e(0x110),'operation':a47_0x10e32e(0x110),'description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsRequired':!![],'paramsHint':a47_0x10e32e(0x109)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5f3af8,_0x2162cb){const _0x187535=a48_0x49c1,_0x169348=_0x5f3af8();while(!![]){try{const _0x1d72b6=-parseInt(_0x187535(0x11f))/0x1*(-parseInt(_0x187535(0x11d))/0x2)+-parseInt(_0x187535(0x11e))/0x3+-parseInt(_0x187535(0x121))/0x4*(-parseInt(_0x187535(0x120))/0x5)+parseInt(_0x187535(0x11b))/0x6+-parseInt(_0x187535(0x11c))/0x7+-parseInt(_0x187535(0x11a))/0x8+-parseInt(_0x187535(0x122))/0x9;if(_0x1d72b6===_0x2162cb)break;else _0x169348['push'](_0x169348['shift']());}catch(_0xc670a3){_0x169348['push'](_0x169348['shift']());}}}(a48_0x52b7,0x465cf));import{dataFilter}from'../../commands/data/filter.js';function a48_0x49c1(_0x4fb1c7,_0x3ba7d2){_0x4fb1c7=_0x4fb1c7-0x11a;const _0x52b761=a48_0x52b7();let _0x49c1fc=_0x52b761[_0x4fb1c7];return _0x49c1fc;}function a48_0x52b7(){const _0x40ca1f=['3559192UYSBQx','18farepq','1041192fwQgFW','50472SAciPj','10PwODTh','1025624jfTcdL','394191eJgnqD','1151312TSHvxl','2186280OdjrTD'];a48_0x52b7=function(){return _0x40ca1f;};return a48_0x52b7();}import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0xf4d10a,_0x3b3082){const _0x2b2d55=a49_0x3cc2,_0x218b2f=_0xf4d10a();while(!![]){try{const _0xa554e=parseInt(_0x2b2d55(0x15f))/0x1*(-parseInt(_0x2b2d55(0x15e))/0x2)+parseInt(_0x2b2d55(0x16f))/0x3+-parseInt(_0x2b2d55(0x174))/0x4*(parseInt(_0x2b2d55(0x16e))/0x5)+-parseInt(_0x2b2d55(0x161))/0x6+-parseInt(_0x2b2d55(0x171))/0x7*(-parseInt(_0x2b2d55(0x158))/0x8)+-parseInt(_0x2b2d55(0x175))/0x9*(-parseInt(_0x2b2d55(0x159))/0xa)+parseInt(_0x2b2d55(0x16a))/0xb;if(_0xa554e===_0x3b3082)break;else _0x218b2f['push'](_0x218b2f['shift']());}catch(_0x51a702){_0x218b2f['push'](_0x218b2f['shift']());}}}(a49_0x41db,0x82f2b));function a49_0x41db(){const _0x5aefbd=['315064oQPocF','1109630SpWVci','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','compress','read','178htNkFS','7603IufyVx','description','951264yogqsJ','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','validation','params','flagMissing','data\x20','paramsHint','command','operation','10169610BDBCuf','paramsRequired','appCode','code','5UkoyDG','290031HpauJM','helpExtra','49ZWMPVy','str','data','1920436VRssna','45nJAfdx','string'];a49_0x41db=function(){return _0x5aefbd;};return a49_0x41db();}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(_0x5d232a){const _0x22381c=a49_0x3cc2;if(!_0x5d232a)throw CliErrors[_0x22381c(0x165)](_0x22381c(0x164),'Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.');const _0xa4b515=_0x5d232a['id'];if(_0xa4b515===undefined||_0xa4b515===null||_0xa4b515==='')throw CliErrors[_0x22381c(0x163)](_0x22381c(0x15a),_0x22381c(0x15b));}function parseCommandParams(_0x11d055){return parseJsonParams(_0x11d055)??{};}function a49_0x3cc2(_0x1bc084,_0x5c5bf1){_0x1bc084=_0x1bc084-0x158;const _0x41db4d=a49_0x41db();let _0x3cc2df=_0x41db4d[_0x1bc084];return _0x3cc2df;}export function buildDataCommand(_0x13c6e7){const _0x204a4e=a49_0x3cc2,_0x49a0ba=_0x204a4e(0x162);return{'service':_0x204a4e(0x173),'command':_0x13c6e7['command'],'description':_0x13c6e7[_0x204a4e(0x160)],'risk':_0x204a4e(0x15d),'defaultOutputFormat':_0x204a4e(0x15c),'helpExtra':_0x13c6e7[_0x204a4e(0x170)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':_0x204a4e(0x176),'description':_0x49a0ba},{'name':_0x204a4e(0x164),'type':_0x204a4e(0x176),'description':_0x13c6e7['paramsHint']}],async 'validate'(_0x4d44d9){const _0x404194=_0x204a4e,_0x3751c3=_0x4d44d9[_0x404194(0x172)](_0x404194(0x164));if(_0x13c6e7[_0x404194(0x16b)]&&!_0x3751c3)throw CliErrors[_0x404194(0x165)](_0x404194(0x164),_0x13c6e7[_0x404194(0x167)]);const _0x38e1eb=parseJsonParams(_0x3751c3);_0x13c6e7[_0x404194(0x169)]==='getOne'&&assertGetOneId(_0x38e1eb);},async 'execute'(_0x17cc1b){const _0x24794b=_0x204a4e,_0x4b550e=parseCommandParams(_0x17cc1b['str'](_0x24794b(0x164))),_0x449c5e=Date['now'](),_0x5aa145=await executeDatasetDataOperation(_0x17cc1b[_0x24794b(0x16c)],_0x17cc1b[_0x24794b(0x172)](_0x24794b(0x16d)),_0x13c6e7[_0x24794b(0x169)],_0x4b550e),_0x5e66d5=Date['now']()-_0x449c5e;return{'ok':!![],'data':{'result':_0x5aa145,'elapsed':_0x5e66d5},'message':_0x24794b(0x166)+_0x13c6e7[_0x24794b(0x168)]+'\x20completed\x20in\x20'+_0x5e66d5+'ms'};}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x4da8c1=a50_0x1b4a;(function(_0x282678,_0x37bbb){const _0x223116=a50_0x1b4a,_0x189181=_0x282678();while(!![]){try{const _0x4ac158=-parseInt(_0x223116(0x1b1))/0x1*(parseInt(_0x223116(0x19f))/0x2)+parseInt(_0x223116(0x199))/0x3+-parseInt(_0x223116(0x19e))/0x4*(parseInt(_0x223116(0x1a2))/0x5)+parseInt(_0x223116(0x19d))/0x6+parseInt(_0x223116(0x1a4))/0x7+-parseInt(_0x223116(0x1a9))/0x8+parseInt(_0x223116(0x1ac))/0x9*(parseInt(_0x223116(0x1b0))/0xa);if(_0x4ac158===_0x37bbb)break;else _0x189181['push'](_0x189181['shift']());}catch(_0x4bc0d9){_0x189181['push'](_0x189181['shift']());}}}(a50_0x4b55,0x33006));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a50_0x4da8c1(0x1a3),'filter':'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','getOne':'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress'};export const RUNTIME_DATA_ACCESS_SUMMARY='Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.';function valueToString(_0x4cdec1){const _0x2da161=a50_0x4da8c1;return _0x4cdec1==null?'':String(_0x4cdec1)[_0x2da161(0x19b)]();}function getDatasetCode(_0x2672d6){const _0x206799=a50_0x4da8c1;return valueToString(_0x2672d6[_0x206799(0x198)]??_0x2672d6[_0x206799(0x1a5)]??_0x2672d6[_0x206799(0x193)]?.[_0x206799(0x1a6)]);}function getDatasetName(_0x27e039){const _0x1f628f=a50_0x4da8c1;return valueToString(_0x27e039[_0x1f628f(0x190)]??_0x27e039[_0x1f628f(0x193)]?.[_0x1f628f(0x196)])||_0x1f628f(0x1ab);}function getDatasetSource(_0x18198e){const _0x5671c2=a50_0x4da8c1;return valueToString(_0x18198e[_0x5671c2(0x18e)]??_0x18198e['dataset']?.[_0x5671c2(0x195)])[_0x5671c2(0x1a8)]();}function a50_0x1b4a(_0x5e003c,_0x50908d){_0x5e003c=_0x5e003c-0x18d;const _0x4b558e=a50_0x4b55();let _0x1b4a4f=_0x4b558e[_0x5e003c];return _0x1b4a4f;}function getDbtableConfig(_0x35c6fd){const _0x46c119=a50_0x4da8c1,_0x41767d=_0x35c6fd[_0x46c119(0x1ae)]??_0x35c6fd[_0x46c119(0x194)];return _0x41767d&&typeof _0x41767d===_0x46c119(0x191)?_0x41767d:{};}function a50_0x4b55(){const _0x4b6c3f=['object','\x20类型,不适合作为\x20','dataset','dbtable','sourceType','datasetName','请先将该数据集升级/迁移为\x20DB\x20table\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','code','357879LMEFnt','BFF\x20/\x20SQL\x20等研发态资产','trim','UNKNOWN','2490252EZbEpT','1097228SsAnnu','28PdfOCN','getOne','filter','5GBggUX','lovrabet','1724527wZCcDA','modelCode','datasetCode','length','toUpperCase','728880XmqWYy','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','unknown','2799wZnhID','当前数据集\x20\x22','dbtableConfig','\x20是\x20','2510qqTYqu','20317bfOjwN','dbId','source','tableName','name'];a50_0x4b55=function(){return _0x4b6c3f;};return a50_0x4b55();}export function isDbBackedDataset(_0x27beb1){const _0x2930cf=a50_0x4da8c1,_0x14d422=getDatasetSource(_0x27beb1);if(_0x14d422==='METADATA')return![];const _0x10ef28=getDbtableConfig(_0x27beb1),_0x1511b8=_0x10ef28[_0x2930cf(0x18d)]??_0x10ef28['id'],_0x2f6481=valueToString(_0x10ef28[_0x2930cf(0x18f)]??_0x27beb1[_0x2930cf(0x18f)]??_0x27beb1[_0x2930cf(0x193)]?.[_0x2930cf(0x18f)]);return _0x1511b8!==undefined&&_0x1511b8!==null&&_0x2f6481[_0x2930cf(0x1a7)]>0x0;}export function filterDbBackedDatasets(_0x33390a){const _0x3e7802=a50_0x4da8c1;return _0x33390a[_0x3e7802(0x1a1)](_0x4684de=>isDbBackedDataset(_0x4684de));}export function buildDbTableUpgradeMessage(_0x768a3d,_0x4d9b12=a50_0x4da8c1(0x19a)){const _0x2d54d7=a50_0x4da8c1,_0x1cb050=getDatasetSource(_0x768a3d)||_0x2d54d7(0x19c),_0x36674c=getDatasetName(_0x768a3d),_0x1bca46=getDatasetCode(_0x768a3d),_0x376408=_0x1bca46?'\x20('+_0x1bca46+')':'';return[_0x2d54d7(0x1ad)+_0x36674c+'\x22'+_0x376408+_0x2d54d7(0x1af)+_0x1cb050+_0x2d54d7(0x192)+_0x4d9b12+'\x20的数据源。','原因:该类研发态资产需要\x20DB\x20table、dbId、tableName\x20与数据库连接上下文,并深度依赖\x20SQL\x20执行链路。',_0x2d54d7(0x197),_0x2d54d7(0x1aa)+RUNTIME_DATA_ACCESS_COMMANDS[_0x2d54d7(0x1a1)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x2d54d7(0x1a0)]+'。']['join']('\x20');}export function assertDatasetSupportsLocalDevelopment(_0x35cf89,_0x54c891){if(!isDbBackedDataset(_0x35cf89))throw CliErrors['validation'](buildDbTableUpgradeMessage(_0x35cf89,_0x54c891));}
|