@lovrabet/rabetbase-cli 2.2.3-beta.2 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/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/list.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/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/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a32_0x4506e3=a32_0x21d4;(function(_0x1f3015,_0x114c9a){const _0x303513=a32_0x21d4,_0x417827=_0x1f3015();while(!![]){try{const _0xf586b3=-parseInt(_0x303513(0x1b6))/0x1+-parseInt(_0x303513(0x1de))/0x2+parseInt(_0x303513(0x1df))/0x3*(-parseInt(_0x303513(0x1a9))/0x4)+parseInt(_0x303513(0x1da))/0x5*(-parseInt(_0x303513(0x1f7))/0x6)+parseInt(_0x303513(0x1f3))/0x7*(-parseInt(_0x303513(0x1cb))/0x8)+parseInt(_0x303513(0x1dc))/0x9+-parseInt(_0x303513(0x1b5))/0xa*(-parseInt(_0x303513(0x1c9))/0xb);if(_0xf586b3===_0x114c9a)break;else _0x417827['push'](_0x417827['shift']());}catch(_0x26c2c9){_0x417827['push'](_0x417827['shift']());}}}(a32_0x2d2d,0x32726));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':'push','description':a32_0x4506e3(0x1b1),'risk':a32_0x4506e3(0x1ae),'flags':[{'name':a32_0x4506e3(0x1bb),'type':a32_0x4506e3(0x1d8),'description':a32_0x4506e3(0x1f2),'enum':[a32_0x4506e3(0x1d9),a32_0x4506e3(0x1ea),a32_0x4506e3(0x1ac)]},{'name':'name','type':a32_0x4506e3(0x1d8),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a32_0x4506e3(0x1c6),'type':'boolean','description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x456eb6){const _0x38fef5=a32_0x4506e3,_0x203288=loadBffProjectConfig(_0x456eb6[_0x38fef5(0x1b7)]),_0x544d14=await readBffLockFile(_0x203288[_0x38fef5(0x1b3)]),{appLock:_0x280679}=ensureLockScope(_0x544d14??createEmptyBffLock(),_0x456eb6[_0x38fef5(0x1b7)],_0x203288[_0x38fef5(0x1be)],_0x38fef5(0x1ba)),_0x92602b=await getTargetFunctions(_0x203288,_0x456eb6),_0x41db0f=_0x456eb6[_0x38fef5(0x1e7)](_0x38fef5(0x1c6)),_0x5c1f0f=[];for(const _0x28afd0 of _0x92602b){const _0x35df37=await computeFileHash(_0x28afd0['filePath']),_0x51e467=_0x280679[_0x38fef5(0x1ad)][_0x28afd0['lockKey']],_0x1cdcdf=!!_0x51e467&&_0x51e467['hash']===_0x35df37;_0x5c1f0f[_0x38fef5(0x1ba)]({'lockKey':_0x28afd0[_0x38fef5(0x1e1)],'filePath':_0x28afd0[_0x38fef5(0x1a8)],'remoteId':_0x51e467?.[_0x38fef5(0x1c0)]??null,'mode':_0x51e467?.[_0x38fef5(0x1c0)]?_0x38fef5(0x1c1):_0x38fef5(0x1e5),'status':!_0x41db0f&&_0x1cdcdf?_0x38fef5(0x1bf):_0x38fef5(0x1b8)});}return{'method':_0x38fef5(0x1fc),'url':_0x38fef5(0x1d3),'body':{'appCode':_0x456eb6[_0x38fef5(0x1b7)],'force':_0x41db0f,'files':_0x5c1f0f,'cacheClearAtRuntime':_0x5c1f0f['some'](_0x4ed3ef=>_0x4ed3ef[_0x38fef5(0x1b0)]===_0x38fef5(0x1b8)),'cacheClearAtRuntimeTimes':_0x5c1f0f[_0x38fef5(0x1af)](_0x3bdfb4=>_0x3bdfb4[_0x38fef5(0x1b0)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x38fef5(0x1c8)+_0x5c1f0f[_0x38fef5(0x1ec)]+_0x38fef5(0x1e8)};},async 'execute'(_0x427f75){const _0x161330=a32_0x4506e3,_0x1ced5a=loadBffProjectConfig(_0x427f75[_0x161330(0x1b7)]),_0x14c0ca=await readBffLockFile(_0x1ced5a[_0x161330(0x1b3)]),{lockData:_0x232e7c,appLock:_0x114ec5}=ensureLockScope(_0x14c0ca??createEmptyBffLock(),_0x427f75[_0x161330(0x1b7)],_0x1ced5a[_0x161330(0x1be)],_0x161330(0x1ba)),_0x4fae09=await getTargetFunctions(_0x1ced5a,_0x427f75);if(_0x4fae09[_0x161330(0x1ec)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x161330(0x1ca)};const _0x98daf4=_0x427f75[_0x161330(0x1e7)](_0x161330(0x1c6)),_0x224ef9=JSON[_0x161330(0x1f1)](JSON['stringify'](_0x232e7c)),_0x540ce2=_0x224ef9[_0x161330(0x1cd)][_0x427f75[_0x161330(0x1b7)]];if(!_0x540ce2)throw new Error(_0x161330(0x1e0)+_0x427f75[_0x161330(0x1b7)]+_0x161330(0x1f4));const _0x5a80e8=await buildHookMaps(_0x427f75['appCode'],_0x427f75[_0x161330(0x1fa)],_0x4fae09,_0x540ce2),_0xbaee47=[],_0x50d1d0=[],_0x4f5bc1=[];for(const _0x31614a of _0x4fae09){const _0x3334df=await computeFileHash(_0x31614a[_0x161330(0x1a8)]),_0x352c2e=_0x540ce2['functions'][_0x31614a[_0x161330(0x1e1)]];if(!_0x98daf4&&_0x352c2e&&_0x352c2e['hash']===_0x3334df){_0x50d1d0['push']({'lockKey':_0x31614a['lockKey'],'reason':_0x161330(0x1bf)});continue;}try{await uploadSingleFunction(_0x427f75[_0x161330(0x1b7)],_0x31614a,_0x540ce2,_0x5a80e8);const _0x260dc2=_0x540ce2[_0x161330(0x1ad)][_0x31614a[_0x161330(0x1e1)]];_0xbaee47[_0x161330(0x1ba)]({'lockKey':_0x31614a[_0x161330(0x1e1)],'remoteId':_0x260dc2?.[_0x161330(0x1c0)]??0x0});}catch(_0x4cac1b){_0x4f5bc1[_0x161330(0x1ba)]({'lockKey':_0x31614a[_0x161330(0x1e1)],'error':_0x4cac1b instanceof Error?_0x4cac1b[_0x161330(0x1b9)]:String(_0x4cac1b)});}}_0x540ce2[_0x161330(0x1d5)]=new Date()[_0x161330(0x1f8)](),await writeBffLockFile(_0x1ced5a[_0x161330(0x1b3)],_0x224ef9),await waitForUploadedLockEntries(_0x1ced5a[_0x161330(0x1b3)],_0x427f75[_0x161330(0x1b7)],_0xbaee47['map'](_0x1b98d8=>_0x1b98d8[_0x161330(0x1e1)]));let _0x57a6ef={'attempted':![],'cleared':![]};if(_0xbaee47[_0x161330(0x1ec)]>0x0)try{let _0x1ccb20='';for(let _0x184b30=0x0;_0x184b30<CACHE_CLEAR_ATTEMPTS;_0x184b30+=0x1){_0x1ccb20=await clearBffScriptCache(),_0x184b30<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x57a6ef={'attempted':!![],'cleared':!![],'message':_0x1ccb20||_0x161330(0x1d6)};}catch(_0x4972d6){_0x57a6ef={'attempted':!![],'cleared':![],'error':_0x4972d6 instanceof Error?_0x4972d6[_0x161330(0x1b9)]:String(_0x4972d6)};}const _0x40bd7d=_0x4f5bc1[_0x161330(0x1ec)]===0x0&&(_0x57a6ef[_0x161330(0x1d0)]?_0x57a6ef[_0x161330(0x1e2)]:!![]),_0x13bb1a=_0x57a6ef[_0x161330(0x1d0)]?_0x57a6ef['cleared']?_0x161330(0x1cc):_0x161330(0x1d4):_0x161330(0x1e4);return{'ok':_0x40bd7d,'data':{'uploaded':_0xbaee47,'skipped':_0x50d1d0,'failed':_0x4f5bc1,'cacheClear':_0x57a6ef},'message':'Push\x20complete:\x20'+_0xbaee47[_0x161330(0x1ec)]+_0x161330(0x1f6)+_0x50d1d0[_0x161330(0x1ec)]+_0x161330(0x1fe)+_0x4f5bc1[_0x161330(0x1ec)]+'\x20failed,\x20'+_0x13bb1a};}};function a32_0x2d2d(){const _0x55f29=['950424DFCRtv','runtime\x20cache\x20cleared','apps','Incomplete\x20HOOK\x20path:\x20','utf8','attempted','code','values','/api/management/library/scripts/save','runtime\x20cache\x20clear\x20failed','lastSync','Runtime\x20script\x20cache\x20cleared.','datasetCode','string','COMMON','239645gaHjwQ','aliasToDatasetCode','3101085gAEbZR','datasetCodeToDataset','178790sWqCbD','7149RFGmqm','Lock\x20scope\x20for\x20app\x20\x22','lockKey','cleared','every','runtime\x20cache\x20not\x20needed','create','Run\x20`','bool','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','ENDPOINT','functionNode','length','filter','join','datasetId','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','parse','Push\x20only\x20this\x20script\x20type','21fuyOfQ','\x22\x20not\x20found\x20after\x20ensureLockScope.','Local\x20function\x20not\x20found:\x20','\x20uploaded,\x20','18SnPqLH','toISOString','str','apiDir','\x22.\x20','POST','set','\x20skipped,\x20','filePath','356cNuWIE','name','get','HOOK','functions','high-risk-write','some','status','Push\x20local\x20BFF\x20scripts\x20to\x20remote','has','lockFilePath','version','8521390vDUldY','188396rOPXFP','appCode','would_push','message','push','type','map','Cannot\x20resolve\x20dataset\x20for\x20\x22','scriptsRoot','unchanged','remoteId','update','operationType','description','alias','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','force','validation','Would\x20inspect\x20','11DDecqc','No\x20local\x20BFF\x20functions\x20found.'];a32_0x2d2d=function(){return _0x55f29;};return a32_0x2d2d();}async function getTargetFunctions(_0x2a0a62,_0x4ab3b7){const _0x36d37e=a32_0x4506e3,_0xb1e1a1=_0x4ab3b7[_0x36d37e(0x1f9)](_0x36d37e(0x1bb)),_0x50e638=_0x4ab3b7[_0x36d37e(0x1f9)](_0x36d37e(0x1aa)),_0x49db59=normalizeBffType(_0xb1e1a1)??undefined;if(_0x50e638&&!_0x49db59)throw CliErrors[_0x36d37e(0x1c7)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x4507fb=await scanLocalBffFunctions(_0x2a0a62,_0x49db59);if(_0x50e638){const _0x1c424d=_0x4507fb[_0x36d37e(0x1ed)](_0x116190=>_0x116190[_0x36d37e(0x1aa)]===_0x50e638);if(_0x1c424d[_0x36d37e(0x1ec)]===0x0)throw CliErrors['validation'](_0x36d37e(0x1f5)+_0x49db59+'/'+_0x50e638);return _0x1c424d;}return _0x4507fb;}async function buildHookMaps(_0x2dc8a5,_0x4ea1bc,_0x455bbd,_0xd04200){const _0x3f4326=a32_0x4506e3,_0x145989=_0x455bbd[_0x3f4326(0x1af)](_0x18aba7=>_0x18aba7[_0x3f4326(0x1bb)]===_0x3f4326(0x1ac));if(!_0x145989)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x236d05=loadAliasMap(_0x4ea1bc,undefined,resolveApiFilePath(_0x4ea1bc,_0x2dc8a5)),_0x34836a=new Map(_0x236d05[_0x3f4326(0x1bc)](_0x10dd28=>[_0x10dd28[_0x3f4326(0x1c4)],_0x10dd28[_0x3f4326(0x1d7)]]));for(const _0x5c5f53 of Object[_0x3f4326(0x1d2)](_0xd04200[_0x3f4326(0x1ad)])){_0x5c5f53[_0x3f4326(0x1c4)]&&_0x5c5f53['datasetCode']&&!_0x34836a[_0x3f4326(0x1b2)](_0x5c5f53[_0x3f4326(0x1c4)])&&_0x34836a[_0x3f4326(0x1fd)](_0x5c5f53[_0x3f4326(0x1c4)],_0x5c5f53[_0x3f4326(0x1d7)]);}const _0x160551=await listDatasets(_0x2dc8a5),_0x3b3c25=new Map(_0x160551['map'](_0x2be0de=>[_0x2be0de[_0x3f4326(0x1d1)],_0x2be0de]));return{'aliasToDatasetCode':_0x34836a,'datasetCodeToDataset':_0x3b3c25};}async function uploadSingleFunction(_0xbfe1b3,_0xd88710,_0x2b06d7,_0x11d7e5){const _0x5e9edf=a32_0x4506e3,_0x30514a=await readFile(_0xd88710[_0x5e9edf(0x1a8)],_0x5e9edf(0x1cf)),_0x196007=await computeFileHash(_0xd88710['filePath']),_0x26eb8d=_0x2b06d7[_0x5e9edf(0x1ad)][_0xd88710[_0x5e9edf(0x1e1)]];if(_0x26eb8d?.[_0x5e9edf(0x1c0)]&&_0x26eb8d[_0x5e9edf(0x1b4)]==null)throw CliErrors['validation'](_0xd88710['lockKey']+_0x5e9edf(0x1e9));let _0x19f01d=extractScriptDescription(_0x30514a);if(!_0x19f01d&&_0x26eb8d?.[_0x5e9edf(0x1c0)]){const _0x14abd2=await getBffScriptInfo(_0x26eb8d['remoteId']);_0x19f01d=_0x14abd2[_0x5e9edf(0x1c3)]||undefined;}const _0x56b935={'appCode':_0xbfe1b3,'functionName':_0xd88710[_0x5e9edf(0x1aa)],'scriptType':_0xd88710[_0x5e9edf(0x1bb)],'scriptContent':_0x30514a};if(_0x26eb8d?.['remoteId'])_0x56b935['id']=_0x26eb8d[_0x5e9edf(0x1c0)];if(_0x26eb8d?.[_0x5e9edf(0x1b4)]!=null)_0x56b935['version']=_0x26eb8d[_0x5e9edf(0x1b4)];if(_0x19f01d)_0x56b935[_0x5e9edf(0x1c3)]=_0x19f01d;if(_0xd88710[_0x5e9edf(0x1bb)]==='HOOK'){const _0x477004=_0xd88710[_0x5e9edf(0x1c4)];if(!_0x477004||!_0xd88710[_0x5e9edf(0x1c2)]||!_0xd88710[_0x5e9edf(0x1eb)])throw CliErrors[_0x5e9edf(0x1c7)](_0x5e9edf(0x1ce)+_0xd88710[_0x5e9edf(0x1e1)]);const _0xa4ef21=_0x11d7e5['aliasToDatasetCode']['get'](_0x477004)??_0x26eb8d?.['datasetCode']??_0x477004,_0x2f636d=_0x11d7e5[_0x5e9edf(0x1dd)][_0x5e9edf(0x1ab)](_0xa4ef21);if(!_0x2f636d)throw CliErrors['validation'](_0x5e9edf(0x1bd)+_0x477004+_0x5e9edf(0x1fb)+(_0x5e9edf(0x1e6)+CLI_BIN_NAME+_0x5e9edf(0x1f0)));_0x56b935[_0x5e9edf(0x1ef)]=_0x2f636d['id'],_0x56b935[_0x5e9edf(0x1c2)]=_0xd88710[_0x5e9edf(0x1c2)],_0x56b935[_0x5e9edf(0x1eb)]=_0xd88710['functionNode'];}const _0x3bb04a=await saveBffScript(_0x56b935),_0x36ae34=_0x3bb04a['id'],_0x3935d8=_0x3bb04a['script']??await getBffScriptInfo(_0x36ae34),_0x298ad2={'hash':_0x196007,'remoteId':_0x36ae34,'version':_0x3935d8[_0x5e9edf(0x1b4)]};if(_0xd88710[_0x5e9edf(0x1bb)]==='HOOK'){const _0x354570=_0xd88710['alias'],_0x2bd041=_0x11d7e5[_0x5e9edf(0x1db)][_0x5e9edf(0x1ab)](_0x354570)??_0x26eb8d?.['datasetCode']??_0x354570;_0x11d7e5[_0x5e9edf(0x1db)]['has'](_0x354570)?_0x298ad2[_0x5e9edf(0x1c4)]=_0x354570:_0x298ad2[_0x5e9edf(0x1c4)]=_0x26eb8d?.['alias'],_0x298ad2[_0x5e9edf(0x1d7)]=_0x2bd041,_0x298ad2['operationType']=_0xd88710[_0x5e9edf(0x1c2)],_0x298ad2[_0x5e9edf(0x1eb)]=_0xd88710[_0x5e9edf(0x1eb)];}_0x2b06d7['functions'][_0xd88710[_0x5e9edf(0x1e1)]]=_0x298ad2;}function a32_0x21d4(_0x450796,_0x336db3){_0x450796=_0x450796-0x1a8;const _0x2d2d83=a32_0x2d2d();let _0x21d423=_0x2d2d83[_0x450796];return _0x21d423;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x769cdb,_0x4d40de,_0x2351eb){const _0x518e2f=a32_0x4506e3;if(_0x2351eb[_0x518e2f(0x1ec)]===0x0)return;for(let _0x299960=0x0;_0x299960<LOCK_SETTLE_RETRY_COUNT;_0x299960+=0x1){const _0xb4faa9=await readBffLockFile(_0x769cdb),_0x71cf47=_0xb4faa9?.[_0x518e2f(0x1cd)]?.[_0x4d40de]?.[_0x518e2f(0x1ad)]??{},_0x2f5146=_0x2351eb[_0x518e2f(0x1e3)](_0x1d0dda=>!!_0x71cf47[_0x1d0dda]?.['remoteId']);if(_0x2f5146)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x518e2f(0x1c5)+_0x2351eb[_0x518e2f(0x1ee)](',\x20')+'.');}
|
|
1
|
+
const a32_0x36b83f=a32_0x2786;(function(_0x9a9a5,_0x22e384){const _0x5fbd12=a32_0x2786,_0x485d91=_0x9a9a5();while(!![]){try{const _0x2e12df=parseInt(_0x5fbd12(0x1c9))/0x1+parseInt(_0x5fbd12(0x1c6))/0x2*(parseInt(_0x5fbd12(0x1d2))/0x3)+parseInt(_0x5fbd12(0x1a2))/0x4*(-parseInt(_0x5fbd12(0x1b9))/0x5)+parseInt(_0x5fbd12(0x1d5))/0x6*(-parseInt(_0x5fbd12(0x1bf))/0x7)+-parseInt(_0x5fbd12(0x1ca))/0x8*(-parseInt(_0x5fbd12(0x1e5))/0x9)+parseInt(_0x5fbd12(0x1c3))/0xa*(-parseInt(_0x5fbd12(0x1ce))/0xb)+parseInt(_0x5fbd12(0x1a4))/0xc*(parseInt(_0x5fbd12(0x1a1))/0xd);if(_0x2e12df===_0x22e384)break;else _0x485d91['push'](_0x485d91['shift']());}catch(_0x4856ba){_0x485d91['push'](_0x485d91['shift']());}}}(a32_0x1627,0x512a1));import{readFile}from'node:fs/promises';function a32_0x1627(){const _0x147103=['has','would_push','map','cleared','force','Runtime\x20script\x20cache\x20cleared.','Push\x20only\x20this\x20script\x20type','Run\x20`','Push\x20local\x20BFF\x20scripts\x20to\x20remote','status','some','\x22\x20not\x20found\x20after\x20ensureLockScope.','functions','Lock\x20scope\x20for\x20app\x20\x22','Push\x20complete:\x20','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','message','hash','95xgtcGb','\x20skipped,\x20','runtime\x20cache\x20clear\x20failed','datasetCodeToDataset','functionNode',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','1728027xAPYvg','unchanged','Local\x20function\x20not\x20found:\x20','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','3830oXvMjC','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','datasetCode','167062yzmmhd','\x22.\x20','Cannot\x20resolve\x20dataset\x20for\x20\x22','85475zJuEkI','55984KdeHiJ','scriptsRoot','set','code','77mwuJIl','lockFilePath','push','filePath','15HqzlVP','filter','every','12XDsjKJ','alias','\x20failed,\x20','attempted','boolean','lastSync','validation','version','lockKey','utf8','name','string','description','apiDir','operationType','datasetId','387wkLZRC','No\x20local\x20BFF\x20functions\x20found.','apps','runtime\x20cache\x20cleared','length','HOOK','values','ENDPOINT','type','\x20uploaded,\x20','bff','bool','appCode','stringify','script','remoteId','572FqfCba','138032eKPzaM','POST','185580fHKcZm','aliasToDatasetCode','get'];a32_0x1627=function(){return _0x147103;};return a32_0x1627();}import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';function a32_0x2786(_0x2890ba,_0x5e8d10){_0x2890ba=_0x2890ba-0x194;const _0x162702=a32_0x1627();let _0x278621=_0x162702[_0x2890ba];return _0x278621;}import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a32_0x36b83f(0x19b),'command':a32_0x36b83f(0x1d0),'description':a32_0x36b83f(0x1af),'risk':'high-risk-write','flags':[{'name':'type','type':a32_0x36b83f(0x1e0),'description':a32_0x36b83f(0x1ad),'enum':['COMMON',a32_0x36b83f(0x198),a32_0x36b83f(0x196)]},{'name':a32_0x36b83f(0x1df),'type':a32_0x36b83f(0x1e0),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':'force','type':a32_0x36b83f(0x1d9),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x3f7ee0){const _0x30d93c=a32_0x36b83f,_0x443ee2=loadBffProjectConfig(_0x3f7ee0[_0x30d93c(0x19d)]),_0x5b49ad=await readBffLockFile(_0x443ee2[_0x30d93c(0x1cf)]),{appLock:_0x4cfc3c}=ensureLockScope(_0x5b49ad??createEmptyBffLock(),_0x3f7ee0[_0x30d93c(0x19d)],_0x443ee2[_0x30d93c(0x1cb)],_0x30d93c(0x1d0)),_0x436f15=await getTargetFunctions(_0x443ee2,_0x3f7ee0),_0x3f4f44=_0x3f7ee0['bool'](_0x30d93c(0x1ab)),_0x242e58=[];for(const _0x3c2aa7 of _0x436f15){const _0x5647d4=await computeFileHash(_0x3c2aa7['filePath']),_0x2b2f49=_0x4cfc3c[_0x30d93c(0x1b3)][_0x3c2aa7['lockKey']],_0x18562d=!!_0x2b2f49&&_0x2b2f49[_0x30d93c(0x1b8)]===_0x5647d4;_0x242e58['push']({'lockKey':_0x3c2aa7['lockKey'],'filePath':_0x3c2aa7[_0x30d93c(0x1d1)],'remoteId':_0x2b2f49?.[_0x30d93c(0x1a0)]??null,'mode':_0x2b2f49?.[_0x30d93c(0x1a0)]?'update':'create','status':!_0x3f4f44&&_0x18562d?_0x30d93c(0x1c0):_0x30d93c(0x1a8)});}return{'method':_0x30d93c(0x1a3),'url':'/api/management/library/scripts/save','body':{'appCode':_0x3f7ee0[_0x30d93c(0x19d)],'force':_0x3f4f44,'files':_0x242e58,'cacheClearAtRuntime':_0x242e58[_0x30d93c(0x1b1)](_0x1da62f=>_0x1da62f[_0x30d93c(0x1b0)]==='would_push'),'cacheClearAtRuntimeTimes':_0x242e58[_0x30d93c(0x1b1)](_0x1f3e34=>_0x1f3e34[_0x30d93c(0x1b0)]===_0x30d93c(0x1a8))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x242e58[_0x30d93c(0x195)]+_0x30d93c(0x1b6)};},async 'execute'(_0x2e0a6b){const _0x563970=a32_0x36b83f,_0x48f4b7=loadBffProjectConfig(_0x2e0a6b['appCode']),_0xc419eb=await readBffLockFile(_0x48f4b7[_0x563970(0x1cf)]),{lockData:_0x185c99,appLock:_0x229c39}=ensureLockScope(_0xc419eb??createEmptyBffLock(),_0x2e0a6b[_0x563970(0x19d)],_0x48f4b7[_0x563970(0x1cb)],_0x563970(0x1d0)),_0x5971ba=await getTargetFunctions(_0x48f4b7,_0x2e0a6b);if(_0x5971ba[_0x563970(0x195)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x563970(0x1e6)};const _0x5621f9=_0x2e0a6b[_0x563970(0x19c)](_0x563970(0x1ab)),_0x223368=JSON['parse'](JSON[_0x563970(0x19e)](_0x185c99)),_0x2261d5=_0x223368['apps'][_0x2e0a6b[_0x563970(0x19d)]];if(!_0x2261d5)throw new Error(_0x563970(0x1b4)+_0x2e0a6b['appCode']+_0x563970(0x1b2));const _0x232c7d=await buildHookMaps(_0x2e0a6b['appCode'],_0x2e0a6b[_0x563970(0x1e2)],_0x5971ba,_0x2261d5),_0x2d3c35=[],_0x3bd96b=[],_0x526ac1=[];for(const _0x3010f7 of _0x5971ba){const _0x51fbb8=await computeFileHash(_0x3010f7[_0x563970(0x1d1)]),_0x4384d6=_0x2261d5[_0x563970(0x1b3)][_0x3010f7[_0x563970(0x1dd)]];if(!_0x5621f9&&_0x4384d6&&_0x4384d6['hash']===_0x51fbb8){_0x3bd96b[_0x563970(0x1d0)]({'lockKey':_0x3010f7[_0x563970(0x1dd)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x2e0a6b[_0x563970(0x19d)],_0x3010f7,_0x2261d5,_0x232c7d);const _0x56e69e=_0x2261d5[_0x563970(0x1b3)][_0x3010f7[_0x563970(0x1dd)]];_0x2d3c35[_0x563970(0x1d0)]({'lockKey':_0x3010f7['lockKey'],'remoteId':_0x56e69e?.[_0x563970(0x1a0)]??0x0});}catch(_0x783178){_0x526ac1[_0x563970(0x1d0)]({'lockKey':_0x3010f7['lockKey'],'error':_0x783178 instanceof Error?_0x783178['message']:String(_0x783178)});}}_0x2261d5[_0x563970(0x1da)]=new Date()['toISOString'](),await writeBffLockFile(_0x48f4b7['lockFilePath'],_0x223368),await waitForUploadedLockEntries(_0x48f4b7['lockFilePath'],_0x2e0a6b[_0x563970(0x19d)],_0x2d3c35['map'](_0x2becce=>_0x2becce['lockKey']));let _0x2914d4={'attempted':![],'cleared':![]};if(_0x2d3c35[_0x563970(0x195)]>0x0)try{let _0x5d27e4='';for(let _0x4b0b2f=0x0;_0x4b0b2f<CACHE_CLEAR_ATTEMPTS;_0x4b0b2f+=0x1){_0x5d27e4=await clearBffScriptCache(),_0x4b0b2f<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x2914d4={'attempted':!![],'cleared':!![],'message':_0x5d27e4||_0x563970(0x1ac)};}catch(_0x5bd6c4){_0x2914d4={'attempted':!![],'cleared':![],'error':_0x5bd6c4 instanceof Error?_0x5bd6c4[_0x563970(0x1b7)]:String(_0x5bd6c4)};}const _0x53f48f=_0x526ac1[_0x563970(0x195)]===0x0&&(_0x2914d4[_0x563970(0x1d8)]?_0x2914d4[_0x563970(0x1aa)]:!![]),_0x2ee2b4=_0x2914d4[_0x563970(0x1d8)]?_0x2914d4['cleared']?_0x563970(0x194):_0x563970(0x1bb):'runtime\x20cache\x20not\x20needed';return{'ok':_0x53f48f,'data':{'uploaded':_0x2d3c35,'skipped':_0x3bd96b,'failed':_0x526ac1,'cacheClear':_0x2914d4},'message':_0x563970(0x1b5)+_0x2d3c35['length']+_0x563970(0x19a)+_0x3bd96b[_0x563970(0x195)]+_0x563970(0x1ba)+_0x526ac1[_0x563970(0x195)]+_0x563970(0x1d7)+_0x2ee2b4};}};async function getTargetFunctions(_0x22e0de,_0x175939){const _0x355b25=a32_0x36b83f,_0x18a3f1=_0x175939['str'](_0x355b25(0x199)),_0x3effa2=_0x175939['str'](_0x355b25(0x1df)),_0x17aa70=normalizeBffType(_0x18a3f1)??undefined;if(_0x3effa2&&!_0x17aa70)throw CliErrors[_0x355b25(0x1db)](_0x355b25(0x1c4));const _0x451a90=await scanLocalBffFunctions(_0x22e0de,_0x17aa70);if(_0x3effa2){const _0xa5cb3b=_0x451a90[_0x355b25(0x1d3)](_0x4ecee1=>_0x4ecee1['name']===_0x3effa2);if(_0xa5cb3b['length']===0x0)throw CliErrors[_0x355b25(0x1db)](_0x355b25(0x1c1)+_0x17aa70+'/'+_0x3effa2);return _0xa5cb3b;}return _0x451a90;}async function buildHookMaps(_0x880112,_0x9c4a69,_0x3fa41e,_0x4235c){const _0x3bb1d9=a32_0x36b83f,_0x2a4cfa=_0x3fa41e['some'](_0x9d2d90=>_0x9d2d90['type']==='HOOK');if(!_0x2a4cfa)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x4a89bd=loadAliasMap(_0x9c4a69,undefined,resolveApiFilePath(_0x9c4a69,_0x880112)),_0x53ff0c=new Map(_0x4a89bd[_0x3bb1d9(0x1a9)](_0x5e0cc9=>[_0x5e0cc9[_0x3bb1d9(0x1d6)],_0x5e0cc9['datasetCode']]));for(const _0x2452ce of Object[_0x3bb1d9(0x197)](_0x4235c[_0x3bb1d9(0x1b3)])){_0x2452ce[_0x3bb1d9(0x1d6)]&&_0x2452ce[_0x3bb1d9(0x1c5)]&&!_0x53ff0c['has'](_0x2452ce[_0x3bb1d9(0x1d6)])&&_0x53ff0c[_0x3bb1d9(0x1cc)](_0x2452ce[_0x3bb1d9(0x1d6)],_0x2452ce['datasetCode']);}const _0x4e948e=await listDatasets(_0x880112),_0x1fac8a=new Map(_0x4e948e[_0x3bb1d9(0x1a9)](_0x237888=>[_0x237888[_0x3bb1d9(0x1cd)],_0x237888]));return{'aliasToDatasetCode':_0x53ff0c,'datasetCodeToDataset':_0x1fac8a};}async function uploadSingleFunction(_0xef03b8,_0xd41f84,_0x6b8f2,_0x20169a){const _0x5bd200=a32_0x36b83f,_0x4fdaae=await readFile(_0xd41f84[_0x5bd200(0x1d1)],_0x5bd200(0x1de)),_0x2af63f=await computeFileHash(_0xd41f84[_0x5bd200(0x1d1)]),_0x649ce9=_0x6b8f2[_0x5bd200(0x1b3)][_0xd41f84[_0x5bd200(0x1dd)]];if(_0x649ce9?.[_0x5bd200(0x1a0)]&&_0x649ce9[_0x5bd200(0x1dc)]==null)throw CliErrors[_0x5bd200(0x1db)](_0xd41f84[_0x5bd200(0x1dd)]+_0x5bd200(0x1be));let _0x2b5ff8=extractScriptDescription(_0x4fdaae);if(!_0x2b5ff8&&_0x649ce9?.['remoteId']){const _0x55faf9=await getBffScriptInfo(_0x649ce9['remoteId']);_0x2b5ff8=_0x55faf9[_0x5bd200(0x1e1)]||undefined;}const _0x55f2a0={'appCode':_0xef03b8,'functionName':_0xd41f84[_0x5bd200(0x1df)],'scriptType':_0xd41f84[_0x5bd200(0x199)],'scriptContent':_0x4fdaae};if(_0x649ce9?.[_0x5bd200(0x1a0)])_0x55f2a0['id']=_0x649ce9[_0x5bd200(0x1a0)];if(_0x649ce9?.[_0x5bd200(0x1dc)]!=null)_0x55f2a0[_0x5bd200(0x1dc)]=_0x649ce9[_0x5bd200(0x1dc)];if(_0x2b5ff8)_0x55f2a0[_0x5bd200(0x1e1)]=_0x2b5ff8;if(_0xd41f84['type']===_0x5bd200(0x196)){const _0x28b918=_0xd41f84['alias'];if(!_0x28b918||!_0xd41f84[_0x5bd200(0x1e3)]||!_0xd41f84[_0x5bd200(0x1bd)])throw CliErrors['validation']('Incomplete\x20HOOK\x20path:\x20'+_0xd41f84[_0x5bd200(0x1dd)]);const _0x35c4f7=_0x20169a[_0x5bd200(0x1a5)][_0x5bd200(0x1a6)](_0x28b918)??_0x649ce9?.['datasetCode']??_0x28b918,_0x5d5085=_0x20169a[_0x5bd200(0x1bc)]['get'](_0x35c4f7);if(!_0x5d5085)throw CliErrors['validation'](_0x5bd200(0x1c8)+_0x28b918+_0x5bd200(0x1c7)+(_0x5bd200(0x1ae)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x55f2a0[_0x5bd200(0x1e4)]=_0x5d5085['id'],_0x55f2a0[_0x5bd200(0x1e3)]=_0xd41f84[_0x5bd200(0x1e3)],_0x55f2a0[_0x5bd200(0x1bd)]=_0xd41f84['functionNode'];}const _0x1c83df=await saveBffScript(_0x55f2a0),_0x4ff531=_0x1c83df['id'],_0x1901a0=_0x1c83df[_0x5bd200(0x19f)]??await getBffScriptInfo(_0x4ff531),_0xb73dcd={'hash':_0x2af63f,'remoteId':_0x4ff531,'version':_0x1901a0['version']};if(_0xd41f84[_0x5bd200(0x199)]===_0x5bd200(0x196)){const _0x1efdc3=_0xd41f84[_0x5bd200(0x1d6)],_0x3ba075=_0x20169a[_0x5bd200(0x1a5)]['get'](_0x1efdc3)??_0x649ce9?.['datasetCode']??_0x1efdc3;_0x20169a[_0x5bd200(0x1a5)][_0x5bd200(0x1a7)](_0x1efdc3)?_0xb73dcd['alias']=_0x1efdc3:_0xb73dcd['alias']=_0x649ce9?.['alias'],_0xb73dcd['datasetCode']=_0x3ba075,_0xb73dcd[_0x5bd200(0x1e3)]=_0xd41f84['operationType'],_0xb73dcd[_0x5bd200(0x1bd)]=_0xd41f84[_0x5bd200(0x1bd)];}_0x6b8f2[_0x5bd200(0x1b3)][_0xd41f84['lockKey']]=_0xb73dcd;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x58603e,_0x4c6c55,_0x470d1f){const _0x1f96c8=a32_0x36b83f;if(_0x470d1f[_0x1f96c8(0x195)]===0x0)return;for(let _0x2ff0ac=0x0;_0x2ff0ac<LOCK_SETTLE_RETRY_COUNT;_0x2ff0ac+=0x1){const _0x5a2015=await readBffLockFile(_0x58603e),_0x3813c2=_0x5a2015?.[_0x1f96c8(0x1e7)]?.[_0x4c6c55]?.[_0x1f96c8(0x1b3)]??{},_0x4afe3b=_0x470d1f[_0x1f96c8(0x1d4)](_0x289ad3=>!!_0x3813c2[_0x289ad3]?.[_0x1f96c8(0x1a0)]);if(_0x4afe3b)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x1f96c8(0x1c2)+_0x470d1f['join'](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0xda0aee=a33_0x4bac;function a33_0x4bac(_0x131197,_0x317a49){_0x131197=_0x131197-0xa2;const _0xa82541=a33_0xa825();let _0x4bac45=_0xa82541[_0x131197];return _0x4bac45;}(function(_0x3b8c2e,_0x5c66dd){const _0x5c42a5=a33_0x4bac,_0xc1c85f=_0x3b8c2e();while(!![]){try{const _0x919c7a=-parseInt(_0x5c42a5(0xad))/0x1+-parseInt(_0x5c42a5(0xaf))/0x2+parseInt(_0x5c42a5(0xc1))/0x3+-parseInt(_0x5c42a5(0xb2))/0x4*(parseInt(_0x5c42a5(0xa9))/0x5)+parseInt(_0x5c42a5(0xa6))/0x6*(-parseInt(_0x5c42a5(0xb4))/0x7)+-parseInt(_0x5c42a5(0xb1))/0x8+parseInt(_0x5c42a5(0xb7))/0x9;if(_0x919c7a===_0x5c66dd)break;else _0xc1c85f['push'](_0xc1c85f['shift']());}catch(_0x3244d6){_0xc1c85f['push'](_0xc1c85f['shift']());}}}(a33_0xa825,0xe3690));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a33_0xa825(){const _0x71b8e5=['lockFilePath','filePath','All\x20BFF\x20scripts\x20are\x20in\x20sync.','appCode','2484846mkpDOP','functions','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','boolean','\x20added,\x20','30YRFnun','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','apiDir','130ZPawsQ','scriptsRoot','push','alias','726505RYQsFf','remote','997974rfTaYb','hash','13718272lreXzF','234148COqIvs','datasetCode','1778784pGeFdl','status','map','52523892IkBlxv','has','length','\x20modified,\x20','\x20remote-only','lockKey'];a33_0xa825=function(){return _0x71b8e5;};return a33_0xa825();}import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':'bff','command':'status','description':a33_0xda0aee(0xa3),'risk':'read','flags':[{'name':a33_0xda0aee(0xae),'type':a33_0xda0aee(0xa4),'description':a33_0xda0aee(0xa7)}],async 'execute'(_0x45266f){const _0x1e3a65=a33_0xda0aee,_0xb83f5b=loadBffProjectConfig(_0x45266f['appCode']),_0x2e643f=await readBffLockFile(_0xb83f5b[_0x1e3a65(0xbd)]),{appLock:_0x46a0cb}=ensureLockScope(_0x2e643f??createEmptyBffLock(),_0x45266f[_0x1e3a65(0xc0)],_0xb83f5b[_0x1e3a65(0xaa)],_0x1e3a65(0xb5)),_0x2de74f=await scanLocalBffFunctions(_0xb83f5b),_0x1e82bb=[],_0x36be28=[],_0x4b93d0=[];for(const _0x541f8c of _0x2de74f){const _0x3b3934=await computeFileHash(_0x541f8c[_0x1e3a65(0xbe)]),_0x324865=_0x46a0cb[_0x1e3a65(0xa2)][_0x541f8c[_0x1e3a65(0xbc)]];if(!_0x324865)_0x1e82bb['push'](_0x541f8c[_0x1e3a65(0xbc)]);else _0x324865[_0x1e3a65(0xb0)]!==_0x3b3934?_0x36be28[_0x1e3a65(0xab)](_0x541f8c[_0x1e3a65(0xbc)]):_0x4b93d0[_0x1e3a65(0xab)](_0x541f8c[_0x1e3a65(0xbc)]);}const _0x65c3a7=[];if(_0x45266f['bool']('remote')){const _0x533167=loadAliasMap(_0x45266f['apiDir'],undefined,resolveApiFilePath(_0x45266f[_0x1e3a65(0xa8)],_0x45266f['appCode'])),_0x1a16b5=new Map(_0x533167[_0x1e3a65(0xb6)](_0x4e1cd1=>[_0x4e1cd1[_0x1e3a65(0xb3)],_0x4e1cd1[_0x1e3a65(0xac)]])),[_0x3eafb0,_0x5b534f]=await Promise['all']([listBffScripts(_0x45266f[_0x1e3a65(0xc0)]),getBffScriptStatistics(_0x45266f[_0x1e3a65(0xc0)])]),_0x537e01=createHookLocationMap(_0x5b534f),_0x364fcd=new Set(_0x2de74f['map'](_0x520af6=>_0x520af6['lockKey']));for(const _0x5a6358 of _0x3eafb0){const _0x3fa36b=resolveRemoteScriptTarget(_0xb83f5b,_0x5a6358,_0x537e01,_0x46a0cb[_0x1e3a65(0xa2)],_0x1a16b5);_0x3fa36b&&!_0x364fcd[_0x1e3a65(0xb8)](_0x3fa36b[_0x1e3a65(0xbc)])&&_0x65c3a7['push'](_0x3fa36b[_0x1e3a65(0xbc)]);}}const _0x51bd83=_0x1e82bb['length']===0x0&&_0x36be28[_0x1e3a65(0xb9)]===0x0&&_0x65c3a7['length']===0x0;return{'ok':!![],'data':{'added':_0x1e82bb,'modified':_0x36be28,'unchanged':_0x4b93d0,'remoteOnly':_0x65c3a7},'message':_0x51bd83?_0x1e3a65(0xbf):_0x1e82bb[_0x1e3a65(0xb9)]+_0x1e3a65(0xa5)+_0x36be28[_0x1e3a65(0xb9)]+_0x1e3a65(0xba)+_0x4b93d0['length']+'\x20unchanged'+(_0x65c3a7[_0x1e3a65(0xb9)]>0x0?',\x20'+_0x65c3a7[_0x1e3a65(0xb9)]+_0x1e3a65(0xbb):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a34_0x20a5f5=a34_0x34f2;(function(_0x6ab0d4,_0x67b6a8){const _0x45d337=a34_0x34f2,_0x386d43=_0x6ab0d4();while(!![]){try{const _0x3a82e4=-parseInt(_0x45d337(0xd7))/0x1+-parseInt(_0x45d337(0xfe))/0x2*(-parseInt(_0x45d337(0x124))/0x3)+-parseInt(_0x45d337(0xd6))/0x4+parseInt(_0x45d337(0xfd))/0x5*(parseInt(_0x45d337(0xee))/0x6)+-parseInt(_0x45d337(0x108))/0x7*(parseInt(_0x45d337(0x118))/0x8)+-parseInt(_0x45d337(0x11f))/0x9*(parseInt(_0x45d337(0xdd))/0xa)+parseInt(_0x45d337(0x104))/0xb;if(_0x3a82e4===_0x67b6a8)break;else _0x386d43['push'](_0x386d43['shift']());}catch(_0x149def){_0x386d43['push'](_0x386d43['shift']());}}}(a34_0x4fe9,0xf3086));import a34_0x413f70 from'chalk';import a34_0x23baae from'ora';import a34_0x23caa8 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{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x2da9c4=a34_0x34f2;return GIT_COMMIT!==_0x2da9c4(0x11a)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x2da9c4(0x11b)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x487f=a34_0x34f2,_0x36d99d=process[_0x487f(0xec)][_0x487f(0xde)]();if(_0x36d99d[_0x487f(0x125)]('bun'))return'bun';return _0x487f(0xe8);}const updateFlags=[{'name':a34_0x20a5f5(0x128),'type':a34_0x20a5f5(0xe3),'description':a34_0x20a5f5(0xeb),'default':![]},{'name':a34_0x20a5f5(0x11e),'type':a34_0x20a5f5(0x101),'description':a34_0x20a5f5(0x10e)},{'name':a34_0x20a5f5(0xfc),'type':a34_0x20a5f5(0xe3),'description':a34_0x20a5f5(0xe6),'default':![]},{'name':a34_0x20a5f5(0x103),'type':a34_0x20a5f5(0xe3),'description':'Refresh\x20official\x20skill\x20package\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x50a333){const _0x1f6b61=a34_0x20a5f5;return _0x50a333['str'](_0x1f6b61(0x11e))[_0x1f6b61(0xf9)]();}function shouldSkipOfficialSkill(_0x34c7a6){const _0x596424=a34_0x20a5f5;return _0x34c7a6[_0x596424(0x121)](_0x596424(0xfc))||_0x34c7a6['flag'](_0x596424(0x103))===![];}async function validateUpdateFlags(_0x213696){const _0x5026d9=a34_0x20a5f5,_0x2f1562=_0x213696[_0x5026d9(0x121)](_0x5026d9(0x128)),_0x5ed95b=getRequestedVersion(_0x213696);if(_0x2f1562&&_0x5ed95b)throw CliErrors[_0x5026d9(0x106)](_0x5026d9(0x113),_0x5026d9(0xfa));if(_0x5ed95b&&!a34_0x23caa8[_0x5026d9(0xf2)](_0x5ed95b))throw CliErrors['validation'](_0x5026d9(0x126)+_0x5ed95b,_0x5026d9(0x116));}async function fetchNpmDistTags(){const _0x55560d=a34_0x20a5f5;try{const _0x5b5966=await fetch(_0x55560d(0xe7)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x55560d(0x110)](0x2710)});if(!_0x5b5966['ok'])return null;const _0x4d2575=await _0x5b5966['json']();if(!_0x4d2575||typeof _0x4d2575!==_0x55560d(0xf8))return null;return Object[_0x55560d(0x10d)](Object['entries'](_0x4d2575)[_0x55560d(0xf1)](([,_0x5063c0])=>typeof _0x5063c0===_0x55560d(0x101)&&_0x5063c0[_0x55560d(0xf9)]()[_0x55560d(0xdc)]>0x0)['map'](([_0x12c17f,_0x1d5bb1])=>[_0x12c17f,String(_0x1d5bb1)[_0x55560d(0xf9)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x5371e5){const _0x234c9b=await fetchNpmDistTags();return _0x234c9b?.[_0x5371e5]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x5b818f){const _0x3edf9d=a34_0x20a5f5,_0x4f955b=getRequestedVersion(_0x5b818f);if(_0x4f955b)return{'version':_0x4f955b,'source':_0x3edf9d(0x11e)};if(_0x5b818f['bool']('beta')){const _0x393d9f=await fetchNpmDistTagVersion('beta');if(!_0x393d9f)return null;return{'version':_0x393d9f,'source':_0x3edf9d(0x128)};}const _0x3d71eb=await fetchLatestVersion();if(!_0x3d71eb)return null;return{'version':_0x3d71eb,'source':'latest'};}function shouldInstallTarget(_0x3ce626,_0x5208df){const _0x18116b=a34_0x20a5f5;if(_0x5208df[_0x18116b(0xf3)]==='version'||_0x5208df['source']==='beta')return!a34_0x23caa8['eq'](_0x3ce626,_0x5208df[_0x18116b(0x11e)]);return a34_0x23caa8['lt'](_0x3ce626,_0x5208df['version']);}function a34_0x4fe9(){const _0x46e307=['npm','Update\x20available:\x20','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','execPath','succeed','42ZZoMYH','yellow','Updating\x20via\x20','filter','valid','source','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','Already\x20up\x20to\x20date\x20(v','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','\x20install\x20-g\x20','object','trim','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','no-skills','184645IHmOWM','4286biUvRz','latest','inherit','string','Checking\x20for\x20updates...','skills','34946208yBnafT','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','validation','...','231fyxbeA','gray','skipped','Checking\x20official\x20skill\x20package...','start','fromEntries','Install\x20a\x20specific\x20CLI\x20version','message','timeout','fail','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','run','\x20\x20Official\x20skill\x20update\x20failed:\x20','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','green','318424dolYFl','warn','unknown','slice','nonInteractive','Beta\x20version:\x20','version','81WjwNmx','info','bool','\x20→\x20','error','2670FGBKMk','includes','Invalid\x20version:\x20','red','beta','Update\x20failed','5583668FCZnCi','1430310FYMxtk','update','\x20\x20Run\x20manually:\x20','install','Updated\x20to\x20v','length','230570cwSTwK','toLowerCase','log','pipe','Skipping\x20official\x20skill\x20package\x20(--no-skills).','\x20\x20Try\x20manually:\x20','boolean','Already\x20on\x20requested\x20version\x20(v','write','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','https://registry.npmjs.org/-/package/'];a34_0x4fe9=function(){return _0x46e307;};return a34_0x4fe9();}function a34_0x34f2(_0x5cf732,_0x7c84d4){_0x5cf732=_0x5cf732-0xd5;const _0x4fe9d3=a34_0x4fe9();let _0x34f2d8=_0x4fe9d3[_0x5cf732];return _0x34f2d8;}function getInstallPlanLabel(_0x1bc66e,_0x253fc2){const _0x424d7c=a34_0x20a5f5;switch(_0x253fc2[_0x424d7c(0xf3)]){case _0x424d7c(0x128):return _0x424d7c(0x11d)+a34_0x413f70[_0x424d7c(0xef)](_0x1bc66e)+_0x424d7c(0x122)+a34_0x413f70['green'](_0x253fc2[_0x424d7c(0x11e)]);case'version':return'Requested\x20version:\x20'+a34_0x413f70[_0x424d7c(0xef)](_0x1bc66e)+'\x20→\x20'+a34_0x413f70[_0x424d7c(0x117)](_0x253fc2[_0x424d7c(0x11e)]);case _0x424d7c(0xff):default:return _0x424d7c(0xe9)+a34_0x413f70['yellow'](_0x1bc66e)+_0x424d7c(0x122)+a34_0x413f70[_0x424d7c(0x117)](_0x253fc2[_0x424d7c(0x11e)]);}}async function installOfficialSkill(_0x166187){const _0xbd2e2f=a34_0x20a5f5;console[_0xbd2e2f(0xdf)](a34_0x413f70['gray'](_0xbd2e2f(0x10b)));const _0x693000=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x166187?_0xbd2e2f(0xe0):_0xbd2e2f(0x100)});if(_0x693000[_0xbd2e2f(0x10a)]){console['log'](a34_0x413f70[_0xbd2e2f(0x109)](_0xbd2e2f(0xea)));return;}if(_0x693000['ok']){console[_0xbd2e2f(0xdf)](a34_0x413f70[_0xbd2e2f(0x109)](_0xbd2e2f(0xf4)));return;}console[_0xbd2e2f(0x119)](a34_0x413f70[_0xbd2e2f(0xef)](_0xbd2e2f(0x115)+(_0x693000[_0xbd2e2f(0x123)]||_0xbd2e2f(0x11a)))),console[_0xbd2e2f(0xdf)](a34_0x413f70[_0xbd2e2f(0x109)](_0xbd2e2f(0xd9)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x1ad02c){const _0x5d0e98=a34_0x20a5f5;await validateUpdateFlags(_0x1ad02c);const _0x387d5d=getCurrentVersion();console[_0x5d0e98(0xdf)]('Current\x20version:\x20'+_0x387d5d);const _0x2f3708=a34_0x23baae(_0x5d0e98(0x102))['start'](),_0x128597=await resolveTargetVersion(_0x1ad02c);if(!_0x128597){const _0x2bbce7=_0x1ad02c[_0x5d0e98(0x121)](_0x5d0e98(0x128))?_0x5d0e98(0xfb):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x2f3708[_0x5d0e98(0x111)](_0x2bbce7),console['log'](a34_0x413f70[_0x5d0e98(0x109)](_0x5d0e98(0x105)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x2bbce7};}const _0x1e1619=a34_0x23caa8['valid'](VERSION),_0x3d1e29=a34_0x23caa8['valid'](_0x128597[_0x5d0e98(0x11e)]);if(!_0x1e1619||!_0x3d1e29)return _0x2f3708[_0x5d0e98(0x111)]('Version\x20comparison\x20failed'),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x1e1619,_0x128597)){const _0xdeab80=_0x128597[_0x5d0e98(0xf3)]===_0x5d0e98(0x11e)?_0x5d0e98(0xe4)+_0x128597['version']+')':_0x5d0e98(0xf5)+_0x128597['version']+')';return _0x2f3708[_0x5d0e98(0xed)](_0xdeab80),shouldSkipOfficialSkill(_0x1ad02c)?console[_0x5d0e98(0xdf)](a34_0x413f70[_0x5d0e98(0x109)](_0x5d0e98(0xe1))):await installOfficialSkill(_0x1ad02c[_0x5d0e98(0x11c)]),{'ok':!![]};}_0x2f3708[_0x5d0e98(0x120)](getInstallPlanLabel(_0x387d5d,_0x128597));const _0x36f063=detectPackageManager(),_0x58df7a=_0x36f063===_0x5d0e98(0xe8)?resolveNpmBin(_0x5d0e98(0xe8)):_0x36f063,_0x2ecc66=a34_0x23baae(_0x5d0e98(0xf0)+_0x36f063+_0x5d0e98(0x107))[_0x5d0e98(0x10c)]();try{return await execa(_0x58df7a,[_0x5d0e98(0xda),'-g',NPM_PACKAGE_NAME+'@'+_0x128597[_0x5d0e98(0x11e)]],{'stdio':_0x5d0e98(0xe0)}),_0x2ecc66[_0x5d0e98(0xed)](_0x5d0e98(0xdb)+_0x128597[_0x5d0e98(0x11e)]),console['log'](a34_0x413f70[_0x5d0e98(0x109)](_0x5d0e98(0xf6))),shouldSkipOfficialSkill(_0x1ad02c)?console[_0x5d0e98(0xdf)](a34_0x413f70['gray'](_0x5d0e98(0xe1))):await installOfficialSkill(_0x1ad02c[_0x5d0e98(0x11c)]),{'ok':!![]};}catch(_0x5603b0){return _0x2ecc66[_0x5d0e98(0x111)](_0x5d0e98(0xd5)),console[_0x5d0e98(0x123)](a34_0x413f70[_0x5d0e98(0x127)]('\x20\x20'+_0x5603b0[_0x5d0e98(0x10f)])),console[_0x5d0e98(0xdf)](a34_0x413f70[_0x5d0e98(0x109)](_0x5d0e98(0xe2)+_0x36f063+_0x5d0e98(0xf7)+NPM_PACKAGE_NAME+'@'+_0x128597[_0x5d0e98(0x11e)])),{'ok':![],'message':_0x5603b0[_0x5d0e98(0x10f)]};}}export const updateDefinition={'service':a34_0x20a5f5(0xd8),'command':a34_0x20a5f5(0x114),'description':a34_0x20a5f5(0x112),'risk':a34_0x20a5f5(0xe5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a34_0x3e1fab=a34_0x4631;(function(_0x4a422a,_0x35c68a){const _0x16d9e9=a34_0x4631,_0x56eeff=_0x4a422a();while(!![]){try{const _0x328919=parseInt(_0x16d9e9(0x192))/0x1*(-parseInt(_0x16d9e9(0x191))/0x2)+-parseInt(_0x16d9e9(0x178))/0x3+parseInt(_0x16d9e9(0x184))/0x4+-parseInt(_0x16d9e9(0x188))/0x5*(-parseInt(_0x16d9e9(0x164))/0x6)+-parseInt(_0x16d9e9(0x16f))/0x7*(parseInt(_0x16d9e9(0x15b))/0x8)+parseInt(_0x16d9e9(0x149))/0x9+-parseInt(_0x16d9e9(0x190))/0xa*(parseInt(_0x16d9e9(0x173))/0xb);if(_0x328919===_0x35c68a)break;else _0x56eeff['push'](_0x56eeff['shift']());}catch(_0x108ff4){_0x56eeff['push'](_0x56eeff['shift']());}}}(a34_0x3c07,0xa7034));function a34_0x4631(_0x483416,_0x4de076){_0x483416=_0x483416-0x143;const _0x3c0726=a34_0x3c07();let _0x463124=_0x3c0726[_0x483416];return _0x463124;}import a34_0x1f1064 from'chalk';import a34_0x5532a4 from'ora';import a34_0xb703c4 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{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x4d1373=a34_0x4631;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x4d1373(0x14c)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x2af527=a34_0x4631,_0x48fa04=process['execPath'][_0x2af527(0x165)]();if(_0x48fa04['includes'](_0x2af527(0x17a)))return'bun';return'npm';}const updateFlags=[{'name':a34_0x3e1fab(0x154),'type':a34_0x3e1fab(0x175),'description':a34_0x3e1fab(0x171),'default':![]},{'name':a34_0x3e1fab(0x14d),'type':a34_0x3e1fab(0x15e),'description':a34_0x3e1fab(0x15a)},{'name':'no-skills','type':a34_0x3e1fab(0x175),'description':a34_0x3e1fab(0x15d),'default':![]},{'name':'skills','type':'boolean','description':a34_0x3e1fab(0x155),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x12ba80){const _0x202bc9=a34_0x3e1fab;return _0x12ba80[_0x202bc9(0x143)](_0x202bc9(0x14d))[_0x202bc9(0x187)]();}function shouldSkipOfficialSkill(_0x1646c1){const _0x5c5725=a34_0x3e1fab;return _0x1646c1[_0x5c5725(0x146)](_0x5c5725(0x18d))||_0x1646c1[_0x5c5725(0x18a)](_0x5c5725(0x17d))===![];}async function validateUpdateFlags(_0x148658){const _0x1e4f1d=a34_0x3e1fab,_0x112652=_0x148658[_0x1e4f1d(0x146)](_0x1e4f1d(0x154)),_0x23a586=getRequestedVersion(_0x148658);if(_0x112652&&_0x23a586)throw CliErrors[_0x1e4f1d(0x167)](_0x1e4f1d(0x16a),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x23a586&&!a34_0xb703c4[_0x1e4f1d(0x14f)](_0x23a586))throw CliErrors[_0x1e4f1d(0x167)](_0x1e4f1d(0x158)+_0x23a586,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x560184=a34_0x3e1fab;try{const _0x17feed=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x560184(0x147),{'signal':AbortSignal[_0x560184(0x17c)](0x2710)});if(!_0x17feed['ok'])return null;const _0x4dc1d4=await _0x17feed[_0x560184(0x145)]();if(!_0x4dc1d4||typeof _0x4dc1d4!==_0x560184(0x16e))return null;return Object[_0x560184(0x17f)](Object[_0x560184(0x162)](_0x4dc1d4)[_0x560184(0x160)](([,_0x81d297])=>typeof _0x81d297===_0x560184(0x15e)&&_0x81d297[_0x560184(0x187)]()['length']>0x0)[_0x560184(0x186)](([_0x515f88,_0x22d5d7])=>[_0x515f88,String(_0x22d5d7)[_0x560184(0x187)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x57de65){const _0x536b31=await fetchNpmDistTags();return _0x536b31?.[_0x57de65]??null;}function a34_0x3c07(){const _0x7ee4a1=['error','timeout','skills','start','fromEntries','Beta\x20version:\x20','red','npm','Already\x20up\x20to\x20date\x20(v','4797724CSgXgk','\x20\x20Try\x20manually:\x20','map','trim','90535orqfTU','nonInteractive','flag','Checking\x20official\x20skill\x20package...','gray','no-skills','run','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','1598390kJxaQg','779882JyyNnb','1qJDKKN','\x20\x20Run\x20manually:\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','str','Skipping\x20official\x20skill\x20package\x20(--no-skills).','json','bool','/dist-tags','\x20\x20Official\x20skill\x20update\x20failed:\x20','4750218aBChfz','Version\x20comparison\x20failed','warn','slice','version','pipe','valid','Already\x20on\x20requested\x20version\x20(v','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','succeed','log','beta','Refresh\x20official\x20skill\x20package\x20after\x20updating','source','latest','Invalid\x20version:\x20','@latest','Install\x20a\x20specific\x20CLI\x20version','8HjTLpJ','update','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','string','Updated\x20to\x20v','filter','Update\x20available:\x20','entries','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','168HUSplA','toLowerCase','install','validation','yellow','write','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','green','Checking\x20for\x20updates...','message','object','857542GIjAwh','Current\x20version:\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','...','55BZnKrW','fail','boolean','inherit','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','715509fqDkpy','Updating\x20via\x20','bun'];a34_0x3c07=function(){return _0x7ee4a1;};return a34_0x3c07();}async function fetchLatestVersion(){const _0x3a1e2e=a34_0x3e1fab;return fetchNpmDistTagVersion(_0x3a1e2e(0x157));}async function resolveTargetVersion(_0x171f08){const _0x40c5e1=a34_0x3e1fab,_0x5a72e6=getRequestedVersion(_0x171f08);if(_0x5a72e6)return{'version':_0x5a72e6,'source':_0x40c5e1(0x14d)};if(_0x171f08[_0x40c5e1(0x146)](_0x40c5e1(0x154))){const _0x45c43b=await fetchNpmDistTagVersion(_0x40c5e1(0x154));if(!_0x45c43b)return null;return{'version':_0x45c43b,'source':_0x40c5e1(0x154)};}const _0x504018=await fetchLatestVersion();if(!_0x504018)return null;return{'version':_0x504018,'source':_0x40c5e1(0x157)};}function shouldInstallTarget(_0x1d8311,_0x4aa10c){const _0x14015d=a34_0x3e1fab;if(_0x4aa10c[_0x14015d(0x156)]===_0x14015d(0x14d)||_0x4aa10c['source']===_0x14015d(0x154))return!a34_0xb703c4['eq'](_0x1d8311,_0x4aa10c[_0x14015d(0x14d)]);return a34_0xb703c4['lt'](_0x1d8311,_0x4aa10c[_0x14015d(0x14d)]);}function getInstallPlanLabel(_0x53b01c,_0x513ffc){const _0x3091fb=a34_0x3e1fab;switch(_0x513ffc[_0x3091fb(0x156)]){case _0x3091fb(0x154):return _0x3091fb(0x180)+a34_0x1f1064[_0x3091fb(0x168)](_0x53b01c)+'\x20→\x20'+a34_0x1f1064[_0x3091fb(0x16b)](_0x513ffc[_0x3091fb(0x14d)]);case _0x3091fb(0x14d):return'Requested\x20version:\x20'+a34_0x1f1064[_0x3091fb(0x168)](_0x53b01c)+'\x20→\x20'+a34_0x1f1064['green'](_0x513ffc[_0x3091fb(0x14d)]);case _0x3091fb(0x157):default:return _0x3091fb(0x161)+a34_0x1f1064['yellow'](_0x53b01c)+'\x20→\x20'+a34_0x1f1064[_0x3091fb(0x16b)](_0x513ffc[_0x3091fb(0x14d)]);}}async function installOfficialSkill(_0x23f8f7){const _0x44a03d=a34_0x3e1fab;console[_0x44a03d(0x153)](a34_0x1f1064[_0x44a03d(0x18c)](_0x44a03d(0x18b)));const _0x24e05a=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x23f8f7?_0x44a03d(0x14e):_0x44a03d(0x176)});if(_0x24e05a['skipped']){console[_0x44a03d(0x153)](a34_0x1f1064[_0x44a03d(0x18c)](_0x44a03d(0x177)));return;}if(_0x24e05a['ok']){console[_0x44a03d(0x153)](a34_0x1f1064[_0x44a03d(0x18c)]('\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.'));return;}console[_0x44a03d(0x14b)](a34_0x1f1064[_0x44a03d(0x168)](_0x44a03d(0x148)+(_0x24e05a[_0x44a03d(0x17b)]||'unknown'))),console['log'](a34_0x1f1064['gray'](_0x44a03d(0x193)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x5da16f){const _0x963a82=a34_0x3e1fab;await validateUpdateFlags(_0x5da16f);const _0x229688=getCurrentVersion();console['log'](_0x963a82(0x170)+_0x229688);const _0x8e657e=a34_0x5532a4(_0x963a82(0x16c))[_0x963a82(0x17e)](),_0x120a6a=await resolveTargetVersion(_0x5da16f);if(!_0x120a6a){const _0x58cde0=_0x5da16f['bool']('beta')?_0x963a82(0x194):_0x963a82(0x18f);return _0x8e657e['fail'](_0x58cde0),console['log'](a34_0x1f1064[_0x963a82(0x18c)](_0x963a82(0x163)+NPM_PACKAGE_NAME+_0x963a82(0x159))),{'ok':![],'message':_0x58cde0};}const _0x18ce4e=a34_0xb703c4[_0x963a82(0x14f)](VERSION),_0xa7b23a=a34_0xb703c4[_0x963a82(0x14f)](_0x120a6a[_0x963a82(0x14d)]);if(!_0x18ce4e||!_0xa7b23a)return _0x8e657e[_0x963a82(0x174)](_0x963a82(0x14a)),{'ok':![],'message':_0x963a82(0x14a)};if(!shouldInstallTarget(_0x18ce4e,_0x120a6a)){const _0x4abc32=_0x120a6a[_0x963a82(0x156)]===_0x963a82(0x14d)?_0x963a82(0x150)+_0x120a6a[_0x963a82(0x14d)]+')':_0x963a82(0x183)+_0x120a6a[_0x963a82(0x14d)]+')';return _0x8e657e[_0x963a82(0x152)](_0x4abc32),shouldSkipOfficialSkill(_0x5da16f)?console[_0x963a82(0x153)](a34_0x1f1064[_0x963a82(0x18c)](_0x963a82(0x144))):await installOfficialSkill(_0x5da16f[_0x963a82(0x189)]),{'ok':!![]};}_0x8e657e['info'](getInstallPlanLabel(_0x229688,_0x120a6a));const _0x3ea4c3=detectPackageManager(),_0x3b75a3=_0x3ea4c3===_0x963a82(0x182)?resolveNpmBin('npm'):_0x3ea4c3,_0x58ff67=a34_0x5532a4(_0x963a82(0x179)+_0x3ea4c3+_0x963a82(0x172))[_0x963a82(0x17e)]();try{return await execa(_0x3b75a3,[_0x963a82(0x166),'-g',NPM_PACKAGE_NAME+'@'+_0x120a6a[_0x963a82(0x14d)]],{'stdio':'pipe'}),_0x58ff67[_0x963a82(0x152)](_0x963a82(0x15f)+_0x120a6a[_0x963a82(0x14d)]),console[_0x963a82(0x153)](a34_0x1f1064[_0x963a82(0x18c)](_0x963a82(0x151))),shouldSkipOfficialSkill(_0x5da16f)?console['log'](a34_0x1f1064[_0x963a82(0x18c)](_0x963a82(0x144))):await installOfficialSkill(_0x5da16f['nonInteractive']),{'ok':!![]};}catch(_0x50ba7a){return _0x58ff67['fail']('Update\x20failed'),console[_0x963a82(0x17b)](a34_0x1f1064[_0x963a82(0x181)]('\x20\x20'+_0x50ba7a[_0x963a82(0x16d)])),console['log'](a34_0x1f1064['gray'](_0x963a82(0x185)+_0x3ea4c3+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x120a6a['version'])),{'ok':![],'message':_0x50ba7a[_0x963a82(0x16d)]};}}export const updateDefinition={'service':a34_0x3e1fab(0x15c),'command':a34_0x3e1fab(0x18e),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a34_0x3e1fab(0x169),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a35_0x1e3f(_0x2ad62c,_0x4bb1d5){_0x2ad62c=_0x2ad62c-0x1c8;const _0x223ba=a35_0x223b();let _0x1e3f50=_0x223ba[_0x2ad62c];return _0x1e3f50;}(function(_0x1709d6,_0xa2ed6b){const _0x423651=a35_0x1e3f,_0x55fb4b=_0x1709d6();while(!![]){try{const _0x1fd99d=-parseInt(_0x423651(0x1cc))/0x1+-parseInt(_0x423651(0x1c9))/0x2+-parseInt(_0x423651(0x1cd))/0x3+parseInt(_0x423651(0x1ca))/0x4*(parseInt(_0x423651(0x1cb))/0x5)+parseInt(_0x423651(0x1c8))/0x6*(-parseInt(_0x423651(0x1d0))/0x7)+-parseInt(_0x423651(0x1ce))/0x8+parseInt(_0x423651(0x1cf))/0x9;if(_0x1fd99d===_0xa2ed6b)break;else _0x55fb4b['push'](_0x55fb4b['shift']());}catch(_0x3d7024){_0x55fb4b['push'](_0x55fb4b['shift']());}}}(a35_0x223b,0xd0c78));import{codegenSdk}from'../../commands/codegen/sdk.js';function a35_0x223b(){const _0x453f82=['8734216Eelkqb','42343623tueNoq','7hRdmDg','8390760kVoptT','350080oLlbTS','4EuOibl','5382595RZgKdQ','1592600jwMHUh','2004987TgPArY'];a35_0x223b=function(){return _0x453f82;};return a35_0x223b();}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a36_0x2c4e6d=a36_0x3530;function a36_0x3530(_0x11785b,_0xa360c){_0x11785b=_0x11785b-0x140;const _0x5468ad=a36_0x5468();let _0x3530bf=_0x5468ad[_0x11785b];return _0x3530bf;}(function(_0x573577,_0x5c6c85){const _0x2835b3=a36_0x3530,_0x52ba3f=_0x573577();while(!![]){try{const _0x1e749f=parseInt(_0x2835b3(0x156))/0x1*(-parseInt(_0x2835b3(0x14f))/0x2)+parseInt(_0x2835b3(0x150))/0x3+-parseInt(_0x2835b3(0x14a))/0x4+parseInt(_0x2835b3(0x142))/0x5+-parseInt(_0x2835b3(0x14d))/0x6*(parseInt(_0x2835b3(0x14e))/0x7)+-parseInt(_0x2835b3(0x153))/0x8+-parseInt(_0x2835b3(0x146))/0x9*(-parseInt(_0x2835b3(0x154))/0xa);if(_0x1e749f===_0x5c6c85)break;else _0x52ba3f['push'](_0x52ba3f['shift']());}catch(_0x1802d4){_0x52ba3f['push'](_0x52ba3f['shift']());}}}(a36_0x5468,0x69035));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a36_0x5468(){const _0x4de6b3=['operation','read','567340DOaKcu','boolean','code','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','18133794adzbjd','codegen','alias','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','1296432TmqSOG','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','appCode','2838aZEEZh','21uNlqhP','1648730zyowaJ','304452LsrFhK','string','Omit\x20import\x20statements\x20from\x20generated\x20code','5198344ECxanK','10auyLjC','skip-imports','1MATdfT'];a36_0x5468=function(){return _0x4de6b3;};return a36_0x5468();}export const codegenSdk={'service':a36_0x2c4e6d(0x147),'command':'sdk','description':a36_0x2c4e6d(0x149),'risk':a36_0x2c4e6d(0x141),'flags':[CODE_FLAG_OPTIONAL,{'name':a36_0x2c4e6d(0x148),'type':a36_0x2c4e6d(0x151),'description':a36_0x2c4e6d(0x145)},{'name':a36_0x2c4e6d(0x140),'type':a36_0x2c4e6d(0x151),'required':!![],'description':a36_0x2c4e6d(0x14b)},{'name':a36_0x2c4e6d(0x155),'type':a36_0x2c4e6d(0x143),'description':a36_0x2c4e6d(0x152)}],async 'execute'(_0x53ec5c){const _0x5a1914=a36_0x2c4e6d,{dataset:_0x50b633,operation:_0x50ea2c}=await getOperationDetail(_0x53ec5c[_0x5a1914(0x14c)],_0x53ec5c['str'](_0x5a1914(0x144)),_0x53ec5c['str']('operation')),_0x6d9519=generateSdkCode(_0x50b633,_0x50ea2c,{'includeImports':!_0x53ec5c['bool'](_0x5a1914(0x155))});return{'ok':!![],'data':{'dataset':{'name':_0x50b633['name'],'code':_0x50b633[_0x5a1914(0x144)],'tableName':_0x50b633['tableName']},'operation':_0x53ec5c['str'](_0x5a1914(0x140)),'code':_0x6d9519}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a37_0x4ab4dd=a37_0x213c;function a37_0x213c(_0x160ac5,_0x247f94){_0x160ac5=_0x160ac5-0x186;const _0x19d7ea=a37_0x19d7();let _0x213c72=_0x19d7ea[_0x160ac5];return _0x213c72;}function a37_0x19d7(){const _0x993ee0=['no-imports','sqlcode','2Bmmhbn','str','sdk','24knvifW','1663194AloLJD','430664dNdiWC','codegen','5007815xayMau','target','bff','string','5469804sdoUFt','sqlCode','appCode','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','read','119PWALJp','10kVsuyB','4NkOPhm','7376501tWXSBM','431306FKYAXJ','boolean','7646283OgYHvi','Omit\x20import\x20statements\x20from\x20generated\x20code'];a37_0x19d7=function(){return _0x993ee0;};return a37_0x19d7();}(function(_0x3c0aab,_0x33d0a6){const _0x417fd4=a37_0x213c,_0xa7f947=_0x3c0aab();while(!![]){try{const _0x8516f5=parseInt(_0x417fd4(0x193))/0x1*(-parseInt(_0x417fd4(0x199))/0x2)+-parseInt(_0x417fd4(0x19d))/0x3+parseInt(_0x417fd4(0x191))/0x4*(parseInt(_0x417fd4(0x186))/0x5)+-parseInt(_0x417fd4(0x18a))/0x6+-parseInt(_0x417fd4(0x18f))/0x7*(-parseInt(_0x417fd4(0x19e))/0x8)+parseInt(_0x417fd4(0x195))/0x9*(-parseInt(_0x417fd4(0x190))/0xa)+parseInt(_0x417fd4(0x192))/0xb*(parseInt(_0x417fd4(0x19c))/0xc);if(_0x8516f5===_0x33d0a6)break;else _0xa7f947['push'](_0xa7f947['shift']());}catch(_0xac187c){_0xa7f947['push'](_0xa7f947['shift']());}}}(a37_0x19d7,0x7cc05));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a37_0x4ab4dd(0x19f),'command':'sql','description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a37_0x4ab4dd(0x18e),'flags':[SQLCODE_FLAG,{'name':a37_0x4ab4dd(0x187),'type':a37_0x4ab4dd(0x189),'description':a37_0x4ab4dd(0x18d),'default':a37_0x4ab4dd(0x19b),'enum':[a37_0x4ab4dd(0x19b),a37_0x4ab4dd(0x188)]},{'name':a37_0x4ab4dd(0x197),'type':a37_0x4ab4dd(0x194),'description':a37_0x4ab4dd(0x196)}],async 'execute'(_0x158217){const _0x34b1c6=a37_0x4ab4dd,_0x4d2c22=await getSqlQueryInfo(_0x158217[_0x34b1c6(0x18c)],_0x158217['str'](_0x34b1c6(0x198))),_0x25583d=_0x158217[_0x34b1c6(0x19a)](_0x34b1c6(0x187))||_0x34b1c6(0x19b),_0x1c1317=generateSqlCodeTemplate(_0x4d2c22,{'target':_0x25583d,'includeImports':!_0x158217['bool'](_0x34b1c6(0x197))});return{'ok':!![],'data':{'sqlCode':_0x4d2c22[_0x34b1c6(0x18b)],'sqlName':_0x4d2c22['sqlName'],'target':_0x25583d,'code':_0x1c1317}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x456503,_0x5cd8bf){const _0x46f4bb=a38_0x4d70,_0x49387e=_0x456503();while(!![]){try{const _0x104c43=-parseInt(_0x46f4bb(0x1e7))/0x1*(-parseInt(_0x46f4bb(0x208))/0x2)+parseInt(_0x46f4bb(0x1f8))/0x3+-parseInt(_0x46f4bb(0x201))/0x4+parseInt(_0x46f4bb(0x1f9))/0x5*(-parseInt(_0x46f4bb(0x1e3))/0x6)+-parseInt(_0x46f4bb(0x206))/0x7*(-parseInt(_0x46f4bb(0x1e9))/0x8)+-parseInt(_0x46f4bb(0x1ec))/0x9*(parseInt(_0x46f4bb(0x1fb))/0xa)+parseInt(_0x46f4bb(0x1e2))/0xb*(parseInt(_0x46f4bb(0x1e5))/0xc);if(_0x104c43===_0x5cd8bf)break;else _0x49387e['push'](_0x49387e['shift']());}catch(_0x1ad1c9){_0x49387e['push'](_0x49387e['shift']());}}}(a38_0xf36d,0xab002));import{input,checkbox,select}from'@inquirer/prompts';import a38_0x1469e3 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';function a38_0xf36d(){const _0x3d4488=['cyan','yellow','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','gray','appCode','2227716QlIxQV','1595845DxiTzS','获取到\x20','10GHbxBr','✎\x20手动输入','find','includes','App\x20Code:','trim','3234160wflSAR','custom','valid','(跳过,稍后配置)','message','9121qrYody','length','39590eKuOvu','\x0a无法获取远程应用列表,请手动输入。','未找到可用应用。','请选择要绑定的应用:','✎\x20自定义输入\x20appcode','55KLXDQe','24IcNpoM','map','1744620fcWOcs','请输入\x20App\x20Code:','5BJsHmC','skip','7496CwVOLw','正在获取可用应用列表...','无法获取远程应用列表,请手动输入。','33741hMreZF','\x20\x20(','Invalid\x20App\x20Code','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','\x0a未找到可用应用。','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','appName'];a38_0xf36d=function(){return _0x3d4488;};return a38_0xf36d();}import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x5e0344=a38_0x4d70,_0x2f2fc0=await input({'message':_0x5e0344(0x1e6),'validate':_0x300f63=>{const _0x17b521=_0x5e0344,_0xbf24ba=validateAppcode(_0x300f63[_0x17b521(0x200)]());return _0xbf24ba[_0x17b521(0x203)]||_0xbf24ba[_0x17b521(0x205)]||_0x17b521(0x1ee);}});return _0x2f2fc0['trim']();}export async function promptAppSelection(_0x5923f0){const _0x174fd6=a38_0x4d70,_0x5d214c=[{'name':a38_0x1469e3[_0x174fd6(0x1f4)]('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0x5923f0[_0x174fd6(0x1e4)]((_0x3a0635,_0x407b9f)=>({'name':_0x3a0635[_0x174fd6(0x1f2)]+'\x20\x20'+a38_0x1469e3[_0x174fd6(0x1f6)]('('+_0x3a0635[_0x174fd6(0x1f7)]+')'),'value':_0x407b9f}))],_0x58193a=await checkbox({'message':_0x174fd6(0x1fa)+a38_0x1469e3[_0x174fd6(0x1f3)](_0x5923f0[_0x174fd6(0x207)])+_0x174fd6(0x1f1),'choices':_0x5d214c,'loop':![]});if(_0x58193a[_0x174fd6(0x1fe)](-0x1))return _0x174fd6(0x202);if(_0x58193a[_0x174fd6(0x207)]===0x0)return _0x174fd6(0x202);return _0x58193a[_0x174fd6(0x1e4)](_0x432243=>_0x5923f0[_0x432243]);}function a38_0x4d70(_0x186889,_0x1c263c){_0x186889=_0x186889-0x1de;const _0xf36d85=a38_0xf36d();let _0x4d7088=_0xf36d85[_0x186889];return _0x4d7088;}export async function promptSingleAppSelection(_0x424be5){const _0x39352f=a38_0x4d70,_0x3ea291=[{'name':a38_0x1469e3[_0x39352f(0x1f6)](_0x39352f(0x1ef)),'value':_0x39352f(0x1e8)},{'name':a38_0x1469e3[_0x39352f(0x1f4)](_0x39352f(0x1e1)),'value':_0x39352f(0x202)},..._0x424be5['map'](_0x4169a3=>({'name':_0x4169a3[_0x39352f(0x1f2)]+'\x20\x20'+a38_0x1469e3[_0x39352f(0x1f6)]('('+_0x4169a3[_0x39352f(0x1f7)]+')'),'value':_0x4169a3[_0x39352f(0x1f7)]}))],_0x52c2a8=await select({'message':_0x39352f(0x1e0),'choices':_0x3ea291});if(_0x52c2a8==='skip')return'skip';if(_0x52c2a8===_0x39352f(0x202))return _0x39352f(0x202);return _0x424be5[_0x39352f(0x1fd)](_0xe298c=>_0xe298c[_0x39352f(0x1f7)]===_0x52c2a8);}export async function selectSingleAppcode(_0xe89ef2){const _0x491026=a38_0x4d70;if(!_0xe89ef2)return writeCliSideChannelLine(a38_0x1469e3[_0x491026(0x1f6)](_0x491026(0x1f5))),_fallbackOrSkip();writeCliSideChannelLine(_0x491026(0x1ea));let _0x591439;try{_0x591439=await withActiveCookie(_0xe89ef2,()=>listRemoteApps());}catch(_0x57f8b7){writeCliSideChannelLine(a38_0x1469e3[_0x491026(0x1f4)](_0x491026(0x1eb)));if(_0x57f8b7 instanceof Error)writeCliSideChannelLine(a38_0x1469e3[_0x491026(0x1f6)](_0x491026(0x1ed)+_0x57f8b7[_0x491026(0x205)]+')'));return _fallbackOrSkip();}if(_0x591439[_0x491026(0x207)]===0x0)return writeCliSideChannelLine(a38_0x1469e3[_0x491026(0x1f4)](_0x491026(0x1df))),_fallbackOrSkip();const _0x1f7fce=await promptSingleAppSelection(_0x591439);if(_0x1f7fce===_0x491026(0x1e8))return'';if(_0x1f7fce===_0x491026(0x202))return promptCustomAppcode();return _0x1f7fce['appCode'];}export async function selectMultipleApps(_0x192ba8){const _0x299d35=a38_0x4d70;writeCliSideChannelLine(_0x299d35(0x1ea));let _0x33b971;try{_0x33b971=await withActiveCookie(_0x192ba8,()=>listRemoteApps());}catch(_0x508f96){writeCliSideChannelLine(_0x299d35(0x1de));if(_0x508f96 instanceof Error)writeCliSideChannelLine(_0x299d35(0x1ed)+_0x508f96[_0x299d35(0x205)]+')');return'custom';}if(_0x33b971[_0x299d35(0x207)]===0x0)return writeCliSideChannelLine(_0x299d35(0x1f0)),_0x299d35(0x202);return promptAppSelection(_0x33b971);}async function _fallbackOrSkip(){const _0x12fc53=a38_0x4d70,_0x5b4f0b=await select({'message':_0x12fc53(0x1ff),'choices':[{'name':a38_0x1469e3[_0x12fc53(0x1f6)](_0x12fc53(0x204)),'value':_0x12fc53(0x1e8)},{'name':a38_0x1469e3[_0x12fc53(0x1f4)](_0x12fc53(0x1fc)),'value':'manual'}]});if(_0x5b4f0b===_0x12fc53(0x1e8))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a39_0x4f9a44=a39_0x4350;(function(_0x191310,_0xf7c2cc){const _0x2f38da=a39_0x4350,_0x346fa9=_0x191310();while(!![]){try{const _0x4c30ad=-parseInt(_0x2f38da(0x10f))/0x1*(parseInt(_0x2f38da(0x106))/0x2)+-parseInt(_0x2f38da(0x107))/0x3*(parseInt(_0x2f38da(0x100))/0x4)+parseInt(_0x2f38da(0xfe))/0x5+parseInt(_0x2f38da(0x10e))/0x6+parseInt(_0x2f38da(0x101))/0x7+-parseInt(_0x2f38da(0x10b))/0x8+-parseInt(_0x2f38da(0x102))/0x9*(parseInt(_0x2f38da(0x109))/0xa);if(_0x4c30ad===_0xf7c2cc)break;else _0x346fa9['push'](_0x346fa9['shift']());}catch(_0x4bef73){_0x346fa9['push'](_0x346fa9['shift']());}}}(a39_0x5085,0x37f8f));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'};export const CODE_FLAG={'name':'code','type':a39_0x4f9a44(0xfc),'required':!![],'description':a39_0x4f9a44(0xfd),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a39_0x4f9a44(0xfd)};function a39_0x4350(_0x54e074,_0x168e1c){_0x54e074=_0x54e074-0xfb;const _0x508524=a39_0x5085();let _0x435097=_0x508524[_0x54e074];return _0x435097;}function a39_0x5085(){const _0x168df1=['Dataset\x20code\x20(32-char\x20hex\x20UUID)','1408570kfxsQc','sqlcode','212uVbrWu','2456398WaibVE','9soYeXj','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','6632VUTpJD','8871VCZeqH','dbtype','3597770wvopNr','number','228600nAQzAi','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','appcode','1904736DHqbGI','53dfGfEa','POSTGRESQL','Database\x20product\x20type','string'];a39_0x5085=function(){return _0x168df1;};return a39_0x5085();}export const SQLCODE_FLAG={'name':a39_0x4f9a44(0xff),'type':a39_0x4f9a44(0xfc),'required':!![],'description':a39_0x4f9a44(0x10c),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a39_0x4f9a44(0x104)}};export const APPCODE_FLAG_OPTIONAL={'name':a39_0x4f9a44(0x10d),'type':a39_0x4f9a44(0xfc),'required':![],'description':a39_0x4f9a44(0x105)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a39_0x4f9a44(0x10a),'required':!![],'description':a39_0x4f9a44(0x103)};export const DB_TYPE_FLAG={'name':a39_0x4f9a44(0x108),'type':a39_0x4f9a44(0xfc),'required':!![],'description':a39_0x4f9a44(0xfb),'enum':['MYSQL',a39_0x4f9a44(0x110)]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x195da2,_0x47a076){const _0x50802c=a40_0x42ce,_0x2d51dc=_0x195da2();while(!![]){try{const _0x358093=-parseInt(_0x50802c(0x1a4))/0x1*(parseInt(_0x50802c(0x19c))/0x2)+-parseInt(_0x50802c(0x1a2))/0x3+parseInt(_0x50802c(0x1a6))/0x4+-parseInt(_0x50802c(0x1a3))/0x5*(parseInt(_0x50802c(0x1a0))/0x6)+parseInt(_0x50802c(0x19b))/0x7*(parseInt(_0x50802c(0x198))/0x8)+parseInt(_0x50802c(0x1a5))/0x9*(parseInt(_0x50802c(0x199))/0xa)+-parseInt(_0x50802c(0x19a))/0xb;if(_0x358093===_0x47a076)break;else _0x2d51dc['push'](_0x2d51dc['shift']());}catch(_0x29493e){_0x2d51dc['push'](_0x2d51dc['shift']());}}}(a40_0x1799,0x41577));function a40_0x42ce(_0x25ffeb,_0x4f1fdc){_0x25ffeb=_0x25ffeb-0x198;const _0x1799bd=a40_0x1799();let _0x42ceae=_0x1799bd[_0x25ffeb];return _0x42ceae;}function a40_0x1799(){const _0x51e9d8=['10jLhNbC','495110nFmwWh','3101AQEVeM','2sGtjnw','App\x20Code\x20cannot\x20be\x20empty','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','App\x20Code\x20cannot\x20exceed\x20100\x20characters','54ngMNQv','length','163377ScbwBC','36085LulrVw','325506iglSkK','245907NDGrlD','2065100EgDqae','3864VslNpX'];a40_0x1799=function(){return _0x51e9d8;};return a40_0x1799();}export function validateAppcode(_0x32aac7){const _0x399c69=a40_0x42ce,_0x21ff59=_0x32aac7['trim']();if(!_0x21ff59)return{'valid':![],'message':_0x399c69(0x19d)};if(_0x21ff59[_0x399c69(0x1a1)]>0x64)return{'valid':![],'message':_0x399c69(0x19f)};if(!/^[A-Za-z0-9_-]+$/['test'](_0x21ff59))return{'valid':![],'message':_0x399c69(0x19e)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a41_0x29592e=a41_0x4238;(function(_0x1d06e1,_0x53c377){const _0x3e13b4=a41_0x4238,_0x219f6f=_0x1d06e1();while(!![]){try{const _0xe62ba3=parseInt(_0x3e13b4(0x7d))/0x1+parseInt(_0x3e13b4(0x7f))/0x2+-parseInt(_0x3e13b4(0x73))/0x3+-parseInt(_0x3e13b4(0x79))/0x4+parseInt(_0x3e13b4(0x82))/0x5+parseInt(_0x3e13b4(0x81))/0x6+parseInt(_0x3e13b4(0x7a))/0x7*(-parseInt(_0x3e13b4(0x80))/0x8);if(_0xe62ba3===_0x53c377)break;else _0x219f6f['push'](_0x219f6f['shift']());}catch(_0x9ae557){_0x219f6f['push'](_0x219f6f['shift']());}}}(a41_0x3a2c,0x6fa44));function a41_0x3a2c(){const _0x5204a5=['1409763QvgewH','appcode','config','Missing\x20key.','key','str','792832PKicCO','8484ZweXHG','\x20config\x20get\x20--key\x20<key>','read','313247oTjrXB','validation','167714aUfOPk','224dsfIUY','3823578oPYMtv','624910uyhxLC','get','app','Usage:\x20','object','Key\x20not\x20found:\x20'];a41_0x3a2c=function(){return _0x5204a5;};return a41_0x3a2c();}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';function a41_0x4238(_0x32c1dd,_0x550227){_0x32c1dd=_0x32c1dd-0x71;const _0x3a2cc9=a41_0x3a2c();let _0x423860=_0x3a2cc9[_0x32c1dd];return _0x423860;}async function execute(_0x24f6e5){const _0x5422ae=a41_0x4238,_0x3b2b76=_0x24f6e5[_0x5422ae(0x78)](_0x5422ae(0x77));if(!_0x3b2b76)throw CliErrors['validation'](_0x5422ae(0x76),_0x5422ae(0x85)+CLI_BIN_NAME+_0x5422ae(0x7b));const _0x456846=readConfig(),_0x23825d=_0x3b2b76===_0x5422ae(0x84)?_0x5422ae(0x74):_0x3b2b76,_0x46ea4f=_0x456846[_0x23825d];if(_0x46ea4f===undefined)throw CliErrors[_0x5422ae(0x7e)](_0x5422ae(0x72)+_0x3b2b76);return{'ok':!![],'data':typeof _0x46ea4f===_0x5422ae(0x71)?_0x46ea4f:{[_0x23825d]:_0x46ea4f},'message':typeof _0x46ea4f==='object'?undefined:String(_0x46ea4f)};}export const configGetDefinition={'service':a41_0x29592e(0x75),'command':a41_0x29592e(0x83),'description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a41_0x29592e(0x7c),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a41_0x29592e(0x77),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x498404,_0x426d12){const _0x1791ec=a42_0x2bee,_0x7da3b2=_0x498404();while(!![]){try{const _0x44efc6=-parseInt(_0x1791ec(0x12d))/0x1*(-parseInt(_0x1791ec(0x130))/0x2)+parseInt(_0x1791ec(0x136))/0x3+parseInt(_0x1791ec(0x133))/0x4*(-parseInt(_0x1791ec(0x131))/0x5)+parseInt(_0x1791ec(0x12f))/0x6+-parseInt(_0x1791ec(0x132))/0x7*(parseInt(_0x1791ec(0x135))/0x8)+-parseInt(_0x1791ec(0x12e))/0x9+parseInt(_0x1791ec(0x134))/0xa;if(_0x44efc6===_0x426d12)break;else _0x7da3b2['push'](_0x7da3b2['shift']());}catch(_0x3f554f){_0x7da3b2['push'](_0x7da3b2['shift']());}}}(a42_0x1d2a,0x96cca));import{configListDefinition}from'../../commands/config/list.js';function a42_0x1d2a(){const _0x5c10cd=['8LdflRX','2770410FtdmwX','1eaBnlo','158175aLIKpg','3729780FQrIdA','187324zxRGIL','1170JMdPUp','1820343tzVJAA','19128phUIfJ','3755240TMiglT'];a42_0x1d2a=function(){return _0x5c10cd;};return a42_0x1d2a();}import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a42_0x2bee(_0x43cc26,_0x3381c8){_0x43cc26=_0x43cc26-0x12d;const _0x1d2abd=a42_0x1d2a();let _0x2beef3=_0x1d2abd[_0x43cc26];return _0x2beef3;}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x5ca61e=a43_0x167e;function a43_0x167e(_0xe2a51e,_0x24b551){_0xe2a51e=_0xe2a51e-0x1e0;const _0x569a27=a43_0x569a();let _0x167e1d=_0x569a27[_0xe2a51e];return _0x167e1d;}(function(_0x3e1e84,_0x481642){const _0x1882e6=a43_0x167e,_0x4aa04f=_0x3e1e84();while(!![]){try{const _0x5c9d0c=-parseInt(_0x1882e6(0x1e1))/0x1*(-parseInt(_0x1882e6(0x1e6))/0x2)+-parseInt(_0x1882e6(0x1ec))/0x3*(parseInt(_0x1882e6(0x1e3))/0x4)+-parseInt(_0x1882e6(0x1ed))/0x5*(-parseInt(_0x1882e6(0x1e4))/0x6)+-parseInt(_0x1882e6(0x1eb))/0x7+-parseInt(_0x1882e6(0x1e5))/0x8+-parseInt(_0x1882e6(0x1ee))/0x9+parseInt(_0x1882e6(0x1e9))/0xa;if(_0x5c9d0c===_0x481642)break;else _0x4aa04f['push'](_0x4aa04f['shift']());}catch(_0x4f7afb){_0x4aa04f['push'](_0x4aa04f['shift']());}}}(a43_0x569a,0xe766b));import{readScopedConfig}from'../../commands/config/shared.js';function a43_0x569a(){const _0x3bd64d=['36438cOowaX','409360PkoHtz','2JpRvJz','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','list','22535160GmahER','List\x20all\x20config\x20values','8152158ZwIMDr','3GlXKIS','825EJqYxw','11927313lqLvip','global','1140877bjGwKu','config','3630392RfnxLd'];a43_0x569a=function(){return _0x3bd64d;};return a43_0x569a();}import{readConfig}from'../../utils/config.js';async function execute(_0x418558){const _0x4ad1e2=a43_0x167e,_0x2961a5=_0x418558['bool'](_0x4ad1e2(0x1e0))?readScopedConfig(_0x4ad1e2(0x1e0)):readConfig();return{'ok':!![],'data':_0x2961a5};}export const configListDefinition={'service':a43_0x5ca61e(0x1e2),'command':a43_0x5ca61e(0x1e8),'description':a43_0x5ca61e(0x1ea),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a43_0x5ca61e(0x1e0),'type':'boolean','description':a43_0x5ca61e(0x1e7),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a44_0x2bca37=a44_0x28b2;(function(_0x4faf4a,_0xde0073){const _0x351477=a44_0x28b2,_0x71eac9=_0x4faf4a();while(!![]){try{const _0x43b240=-parseInt(_0x351477(0x14c))/0x1+-parseInt(_0x351477(0x132))/0x2*(parseInt(_0x351477(0x13c))/0x3)+-parseInt(_0x351477(0x134))/0x4+-parseInt(_0x351477(0x12a))/0x5+-parseInt(_0x351477(0x139))/0x6*(-parseInt(_0x351477(0x153))/0x7)+-parseInt(_0x351477(0x12b))/0x8*(parseInt(_0x351477(0x125))/0x9)+parseInt(_0x351477(0x14e))/0xa;if(_0x43b240===_0xde0073)break;else _0x71eac9['push'](_0x71eac9['shift']());}catch(_0x4ba8f7){_0x71eac9['push'](_0x71eac9['shift']());}}}(a44_0x5b66,0xd7bd6));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a44_0x5b66(){const _0x212a93=['\x20set\x20to:\x20','2913744tboKwd','Settable\x20top-level\x20keys:\x20','key','\x20appcode\x20set\x20to:\x20','\x20app\x20add\x20<name>\x20--appcode\x20','18GEsExG','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Missing\x20value.','168LNsUjE','Top-level\x20key\x20\x22','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','app','str','length','env','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','value','locale','Set\x20a\x20config\x20value','Global','boolean','bool','object','Use\x20`','323305NsQKer','set','35943710ijDdib','\x22\x20is\x20not\x20settable.','Invalid\x20locale\x20value.','appcode','keys','3003602zuIRHM','apps','write','join','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','`,\x20`','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','54qQCfGp','validation','Project','Invalid\x20value\x20for\x20\x22','\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','2197210EEMUyM','1377440fcrvFH','global','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','string','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','\x22.\x20Allowed:\x20','Usage:\x20','52632VmOmxi'];a44_0x5b66=function(){return _0x212a93;};return a44_0x5b66();}function a44_0x28b2(_0x4693a1,_0x173cdf){_0x4693a1=_0x4693a1-0x121;const _0x5b669c=a44_0x5b66();let _0x28b278=_0x5b669c[_0x4693a1];return _0x28b278;}import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x23485e){const _0x2aba9d=a44_0x28b2,_0x155b22=_0x23485e['str']('key'),_0x7a5eb9=_0x23485e[_0x2aba9d(0x140)](_0x2aba9d(0x144));if(!_0x155b22)throw CliErrors[_0x2aba9d(0x126)]('Missing\x20key.',_0x2aba9d(0x131)+CLI_BIN_NAME+_0x2aba9d(0x12f));if(_0x7a5eb9===undefined||_0x7a5eb9==='')throw CliErrors[_0x2aba9d(0x126)](_0x2aba9d(0x13b),_0x2aba9d(0x131)+CLI_BIN_NAME+_0x2aba9d(0x12f));if(_0x7a5eb9[_0x2aba9d(0x141)]>0x1f4)throw CliErrors[_0x2aba9d(0x126)]('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(!isTopLevelConfigKey(_0x155b22))throw CliErrors['validation'](_0x2aba9d(0x13d)+_0x155b22+_0x2aba9d(0x14f),_0x2aba9d(0x135)+getTopLevelConfigKeySummary());if(_0x155b22==='riskLevel')throw CliErrors['validation'](_0x2aba9d(0x12d));if(CONFIG_ENUM_VALUES[_0x155b22]&&!CONFIG_ENUM_VALUES[_0x155b22]['includes'](_0x7a5eb9))throw CliErrors['validation'](_0x2aba9d(0x128)+_0x155b22+_0x2aba9d(0x130)+CONFIG_ENUM_VALUES[_0x155b22][_0x2aba9d(0x121)](',\x20'));if(_0x155b22===_0x2aba9d(0x145)&&!normalizeLocale(_0x7a5eb9))throw CliErrors[_0x2aba9d(0x126)](_0x2aba9d(0x150),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');const _0x433724={'global':_0x23485e[_0x2aba9d(0x149)](_0x2aba9d(0x12c))},_0x30d626=resolveWriteScope(_0x433724),_0x3b43fa=readScopedConfig(_0x30d626);let _0x20727a=_0x155b22,_0x318664=_0x7a5eb9;_0x155b22===_0x2aba9d(0x13f)&&(_0x20727a=_0x2aba9d(0x151),delete _0x3b43fa[_0x2aba9d(0x13f)]);_0x155b22===_0x2aba9d(0x145)&&(_0x318664=normalizeLocale(_0x7a5eb9));if(_0x155b22===_0x2aba9d(0x142)){_0x318664=normalizeEnv(_0x7a5eb9);if(!isProduction(_0x318664)&&!isDaily(_0x318664))throw CliErrors[_0x2aba9d(0x126)](_0x2aba9d(0x13e),_0x2aba9d(0x122));}if(_0x155b22==='appcode'){const _0x246b20=_0x3b43fa[_0x2aba9d(0x154)]&&typeof _0x3b43fa[_0x2aba9d(0x154)]===_0x2aba9d(0x14a)?Object[_0x2aba9d(0x152)](_0x3b43fa[_0x2aba9d(0x154)]):[];if(_0x246b20[_0x2aba9d(0x141)]>0x0)throw CliErrors[_0x2aba9d(0x126)](_0x2aba9d(0x143),_0x2aba9d(0x14b)+CLI_BIN_NAME+_0x2aba9d(0x138)+_0x318664+_0x2aba9d(0x123)+CLI_BIN_NAME+_0x2aba9d(0x129));const _0x2ad8f6=buildCanonicalProjectConfig({..._0x3b43fa},{'appCodes':[_0x318664],'env':typeof _0x3b43fa[_0x2aba9d(0x142)]==='string'?_0x3b43fa[_0x2aba9d(0x142)]:undefined});writeScopedConfig(_0x2ad8f6,_0x30d626);const _0x457e9f=_0x30d626===_0x2aba9d(0x12c)?'Global':'Project';return{'ok':!![],'message':'✓\x20'+_0x457e9f+_0x2aba9d(0x137)+_0x318664+_0x2aba9d(0x124)};}_0x3b43fa[_0x20727a]=_0x318664,writeScopedConfig(_0x3b43fa,_0x30d626);const _0x5672f8=_0x30d626===_0x2aba9d(0x12c)?_0x2aba9d(0x147):_0x2aba9d(0x127);return{'ok':!![],'message':'✓\x20'+_0x5672f8+'\x20'+_0x20727a+_0x2aba9d(0x133)+_0x318664};}export const configSetDefinition={'service':'config','command':a44_0x2bca37(0x14d),'description':a44_0x2bca37(0x146),'risk':a44_0x2bca37(0x155),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a44_0x2bca37(0x136),'type':a44_0x2bca37(0x12e),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a44_0x2bca37(0x144),'type':a44_0x2bca37(0x12e),'description':'Config\x20value','required':!![]},{'name':'global','type':a44_0x2bca37(0x148),'description':a44_0x2bca37(0x13a),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xbb1248,_0x5e5564){var _0x3a255e=a45_0x2bb8,_0x4b61aa=_0xbb1248();while(!![]){try{var _0x404bc8=-parseInt(_0x3a255e(0x192))/0x1*(-parseInt(_0x3a255e(0x190))/0x2)+parseInt(_0x3a255e(0x197))/0x3*(parseInt(_0x3a255e(0x198))/0x4)+-parseInt(_0x3a255e(0x195))/0x5+parseInt(_0x3a255e(0x18c))/0x6+-parseInt(_0x3a255e(0x194))/0x7+-parseInt(_0x3a255e(0x196))/0x8+-parseInt(_0x3a255e(0x18f))/0x9;if(_0x404bc8===_0x5e5564)break;else _0x4b61aa['push'](_0x4b61aa['shift']());}catch(_0x47f289){_0x4b61aa['push'](_0x4b61aa['shift']());}}}(a45_0xcadf,0xc7787));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};function a45_0x2bb8(_0x23e626,_0x49d296){_0x23e626=_0x23e626-0x18c;var _0xcadfe3=a45_0xcadf();var _0x2bb8a5=_0xcadfe3[_0x23e626];return _0x2bb8a5;}export function resolveWriteScope(_0x1975c6){var _0x2aeeb9=a45_0x2bb8;if(_0x1975c6[_0x2aeeb9(0x18d)])return _0x2aeeb9(0x18d);if(!isInProject())throw CliErrors[_0x2aeeb9(0x191)]('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).',_0x2aeeb9(0x18e)+CLI_BIN_NAME+_0x2aeeb9(0x199));return _0x2aeeb9(0x193);}function a45_0xcadf(){var _0x195e12=['validation','1TRuPQS','project','5557776WNPflC','850135NInJjz','12824904Bccpnd','35157ekrnLI','132wzaxuS','\x20init`\x20first.','9410124enoXSG','global','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','1488105aTrUUa','3188806jvnGoR'];a45_0xcadf=function(){return _0x195e12;};return a45_0xcadf();}export function readScopedConfig(_0x9b9303){return readConfigFile(resolveWriteConfigPath(_0x9b9303));}export function writeScopedConfig(_0x393cdd,_0x5e29e8){writeConfigFile(resolveWriteConfigPath(_0x5e29e8),_0x393cdd);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a46_0x4473(_0x1f0c0a,_0x2b1ac6){_0x1f0c0a=_0x1f0c0a-0x15a;const _0xe6ae78=a46_0xe6ae();let _0x447385=_0xe6ae78[_0x1f0c0a];return _0x447385;}const a46_0x413150=a46_0x4473;(function(_0x55d848,_0x17e633){const _0x2d19d6=a46_0x4473,_0x3b045a=_0x55d848();while(!![]){try{const _0x4e4270=-parseInt(_0x2d19d6(0x16a))/0x1*(-parseInt(_0x2d19d6(0x15e))/0x2)+-parseInt(_0x2d19d6(0x15b))/0x3*(-parseInt(_0x2d19d6(0x166))/0x4)+parseInt(_0x2d19d6(0x16f))/0x5+-parseInt(_0x2d19d6(0x16e))/0x6*(parseInt(_0x2d19d6(0x16b))/0x7)+parseInt(_0x2d19d6(0x15f))/0x8+-parseInt(_0x2d19d6(0x15d))/0x9*(parseInt(_0x2d19d6(0x165))/0xa)+-parseInt(_0x2d19d6(0x162))/0xb*(-parseInt(_0x2d19d6(0x16c))/0xc);if(_0x4e4270===_0x17e633)break;else _0x3b045a['push'](_0x3b045a['shift']());}catch(_0x30708f){_0x3b045a['push'](_0x3b045a['shift']());}}}(a46_0xe6ae,0x6b335));function a46_0xe6ae(){const _0x3ffd7c=['\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\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}]','Filter\x20dataset\x20records\x20with\x20query\x20conditions','100741vnRraa','32459VawWRj','5892NOUblp','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','774owqgxw','2022405XexBiE','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','67893agPcbd','filter','10143ZSwimn','4oEvYTJ','5090304RRNHwF','\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]','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','5731xiUOOU','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','join','6900tyAZMr','56AnbKDq'];a46_0xe6ae=function(){return _0x3ffd7c;};return a46_0xe6ae();}import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a46_0x413150(0x15c),'operation':a46_0x413150(0x15c),'description':a46_0x413150(0x169),'paramsRequired':![],'paramsHint':a46_0x413150(0x15a),'helpExtra':[a46_0x413150(0x167),a46_0x413150(0x161),a46_0x413150(0x160),a46_0x413150(0x168),a46_0x413150(0x16d),a46_0x413150(0x163)][a46_0x413150(0x164)]('\x0a')});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a47_0x1c2a3c=a47_0x2d36;(function(_0x258033,_0x459a2a){const _0x215bb7=a47_0x2d36,_0x233c4c=_0x258033();while(!![]){try{const _0x4b39f8=-parseInt(_0x215bb7(0x101))/0x1*(parseInt(_0x215bb7(0x106))/0x2)+parseInt(_0x215bb7(0x10e))/0x3*(parseInt(_0x215bb7(0x103))/0x4)+parseInt(_0x215bb7(0x100))/0x5*(parseInt(_0x215bb7(0x10a))/0x6)+-parseInt(_0x215bb7(0x108))/0x7*(parseInt(_0x215bb7(0x10b))/0x8)+-parseInt(_0x215bb7(0x107))/0x9+-parseInt(_0x215bb7(0x104))/0xa+-parseInt(_0x215bb7(0x109))/0xb*(-parseInt(_0x215bb7(0x10c))/0xc);if(_0x4b39f8===_0x459a2a)break;else _0x233c4c['push'](_0x233c4c['shift']());}catch(_0x2583ce){_0x233c4c['push'](_0x233c4c['shift']());}}}(a47_0x82ac,0x59171));import{buildDataCommand}from'../../commands/data/shared.js';function a47_0x2d36(_0x25599c,_0x32488d){_0x25599c=_0x25599c-0x100;const _0x82ac13=a47_0x82ac();let _0x2d363b=_0x82ac13[_0x25599c];return _0x2d363b;}function a47_0x82ac(){const _0x14bf0b=['164sEIRzf','669650NfehjZ','Get\x20a\x20single\x20record\x20by\x20ID','2baEzlf','4980114VMecqQ','2208549KYFGDe','65978xgNHWh','6WBMDiz','8rIUSsQ','1428RLWAdO','getOne','32283YCqqhJ','1115835mWdMWS','77399EsLyva','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'];a47_0x82ac=function(){return _0x14bf0b;};return a47_0x82ac();}export const dataGetOne=buildDataCommand({'command':a47_0x1c2a3c(0x10d),'operation':a47_0x1c2a3c(0x10d),'description':a47_0x1c2a3c(0x105),'paramsRequired':!![],'paramsHint':a47_0x1c2a3c(0x102)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5cc301,_0x38fb15){const _0x2839c3=a48_0x4265,_0x3fedcb=_0x5cc301();while(!![]){try{const _0x26fc9a=parseInt(_0x2839c3(0x12e))/0x1+-parseInt(_0x2839c3(0x129))/0x2*(-parseInt(_0x2839c3(0x12c))/0x3)+-parseInt(_0x2839c3(0x125))/0x4*(parseInt(_0x2839c3(0x128))/0x5)+-parseInt(_0x2839c3(0x12a))/0x6*(parseInt(_0x2839c3(0x127))/0x7)+-parseInt(_0x2839c3(0x126))/0x8+-parseInt(_0x2839c3(0x12d))/0x9*(parseInt(_0x2839c3(0x124))/0xa)+parseInt(_0x2839c3(0x12b))/0xb;if(_0x26fc9a===_0x38fb15)break;else _0x3fedcb['push'](_0x3fedcb['shift']());}catch(_0xbc5dbd){_0x3fedcb['push'](_0x3fedcb['shift']());}}}(a48_0x51c4,0xcf643));import{dataFilter}from'../../commands/data/filter.js';function a48_0x51c4(){const _0x7cb74e=['9mVwXVz','639069TRRvcD','286270Btgfgq','5981432fiYWPr','2633656NXgiho','25879vuDXTJ','5FMIxmb','1514ISPPSA','1290lavXvj','13365066ACTkld','6513yANCwi'];a48_0x51c4=function(){return _0x7cb74e;};return a48_0x51c4();}function a48_0x4265(_0x2fd808,_0x418c23){_0x2fd808=_0x2fd808-0x124;const _0x51c425=a48_0x51c4();let _0x42653=_0x51c425[_0x2fd808];return _0x42653;}import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a54db,_0x41e611){const _0x234b2a=a49_0x2289,_0x1c9f48=_0x5a54db();while(!![]){try{const _0x96582c=parseInt(_0x234b2a(0x18d))/0x1*(parseInt(_0x234b2a(0x199))/0x2)+-parseInt(_0x234b2a(0x196))/0x3+parseInt(_0x234b2a(0x185))/0x4*(-parseInt(_0x234b2a(0x182))/0x5)+parseInt(_0x234b2a(0x183))/0x6+-parseInt(_0x234b2a(0x188))/0x7+parseInt(_0x234b2a(0x190))/0x8+parseInt(_0x234b2a(0x197))/0x9;if(_0x96582c===_0x41e611)break;else _0x1c9f48['push'](_0x1c9f48['shift']());}catch(_0x73f4c0){_0x1c9f48['push'](_0x1c9f48['shift']());}}}(a49_0x39ec,0xde8c5));import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a49_0x39ec(){const _0x127f3d=['1378464ZmJPrq','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','3601732WDpzUX','validation','operation','9412921mBYCdb','params','string','description','compress','151ldFyZz','flagMissing','appCode','13583208EjzFUA','now','alias','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','\x20completed\x20in\x20','paramsRequired','2472attIIg','7223058rrhIYL','paramsHint','17586TwdQBK','read','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','code','helpExtra','command','str','data','getOne','data\x20','10NFLwss'];a49_0x39ec=function(){return _0x127f3d;};return a49_0x39ec();}import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function a49_0x2289(_0x31b33d,_0x115589){_0x31b33d=_0x31b33d-0x17d;const _0x39ec23=a49_0x39ec();let _0x228915=_0x39ec23[_0x31b33d];return _0x228915;}function assertGetOneId(_0x5aea4a){const _0x4ad3a1=a49_0x2289;if(!_0x5aea4a)throw CliErrors[_0x4ad3a1(0x18e)]('params',_0x4ad3a1(0x184));const _0x34493f=_0x5aea4a['id'];if(_0x34493f===undefined||_0x34493f===null||_0x34493f==='')throw CliErrors[_0x4ad3a1(0x186)](_0x4ad3a1(0x193),'Example:\x20--params\x20\x27{\x22id\x22:123}\x27');}function parseCommandParams(_0x2c5848){return parseJsonParams(_0x2c5848)??{};}export function buildDataCommand(_0x241e6d){const _0x1b8ca6=a49_0x2289,_0x28d9d0=_0x1b8ca6(0x19b);return{'service':_0x1b8ca6(0x17f),'command':_0x241e6d[_0x1b8ca6(0x17d)],'description':_0x241e6d[_0x1b8ca6(0x18b)],'risk':_0x1b8ca6(0x19a),'defaultOutputFormat':_0x1b8ca6(0x18c),'helpExtra':_0x241e6d[_0x1b8ca6(0x19d)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x1b8ca6(0x192),'type':_0x1b8ca6(0x18a),'description':_0x28d9d0},{'name':_0x1b8ca6(0x189),'type':_0x1b8ca6(0x18a),'description':_0x241e6d['paramsHint']}],async 'validate'(_0x4dffe2){const _0x6bf742=_0x1b8ca6,_0x2fbd4d=_0x4dffe2[_0x6bf742(0x17e)](_0x6bf742(0x189));if(_0x241e6d[_0x6bf742(0x195)]&&!_0x2fbd4d)throw CliErrors[_0x6bf742(0x18e)](_0x6bf742(0x189),_0x241e6d[_0x6bf742(0x198)]);const _0x3cf962=parseJsonParams(_0x2fbd4d);_0x241e6d[_0x6bf742(0x187)]===_0x6bf742(0x180)&&assertGetOneId(_0x3cf962);},async 'execute'(_0x29e682){const _0x34ba74=_0x1b8ca6,_0x10b40c=parseCommandParams(_0x29e682[_0x34ba74(0x17e)](_0x34ba74(0x189))),_0x3b25ea=Date[_0x34ba74(0x191)](),_0x57e420=await executeDatasetDataOperation(_0x29e682[_0x34ba74(0x18f)],_0x29e682[_0x34ba74(0x17e)](_0x34ba74(0x19c)),_0x241e6d['operation'],_0x10b40c),_0x269336=Date['now']()-_0x3b25ea;return{'ok':!![],'data':{'result':_0x57e420,'elapsed':_0x269336},'message':_0x34ba74(0x181)+_0x241e6d[_0x34ba74(0x17d)]+_0x34ba74(0x194)+_0x269336+'ms'};}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a50_0x8852d2=a50_0x32dc;(function(_0x501331,_0x1bb9a8){const _0x5c824b=a50_0x32dc,_0x1a22ad=_0x501331();while(!![]){try{const _0x1152e2=parseInt(_0x5c824b(0x104))/0x1*(parseInt(_0x5c824b(0x103))/0x2)+parseInt(_0x5c824b(0xff))/0x3+parseInt(_0x5c824b(0xe9))/0x4*(parseInt(_0x5c824b(0x108))/0x5)+-parseInt(_0x5c824b(0xec))/0x6*(-parseInt(_0x5c824b(0x101))/0x7)+-parseInt(_0x5c824b(0xfd))/0x8+parseInt(_0x5c824b(0xf2))/0x9+-parseInt(_0x5c824b(0x10b))/0xa*(parseInt(_0x5c824b(0xee))/0xb);if(_0x1152e2===_0x1bb9a8)break;else _0x1a22ad['push'](_0x1a22ad['shift']());}catch(_0x3975ee){_0x1a22ad['push'](_0x1a22ad['shift']());}}}(a50_0x1497,0xce003));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':'lovrabet','filter':a50_0x8852d2(0x10a),'getOne':a50_0x8852d2(0x106)};export const RUNTIME_DATA_ACCESS_SUMMARY=a50_0x8852d2(0xfa);function valueToString(_0x1a9b7b){return _0x1a9b7b==null?'':String(_0x1a9b7b)['trim']();}function getDatasetCode(_0x443104){const _0x6126da=a50_0x8852d2;return valueToString(_0x443104[_0x6126da(0xf7)]??_0x443104[_0x6126da(0xfb)]??_0x443104[_0x6126da(0x107)]?.[_0x6126da(0x102)]);}function getDatasetName(_0x5bf46a){const _0x4ec1ee=a50_0x8852d2;return valueToString(_0x5bf46a[_0x4ec1ee(0xea)]??_0x5bf46a[_0x4ec1ee(0x107)]?.[_0x4ec1ee(0xfe)])||_0x4ec1ee(0xf8);}function getDatasetSource(_0x3ee16d){const _0x4d9507=a50_0x8852d2;return valueToString(_0x3ee16d[_0x4d9507(0xed)]??_0x3ee16d[_0x4d9507(0x107)]?.['sourceType'])[_0x4d9507(0x10f)]();}function getDbtableConfig(_0x1bdb89){const _0x224ad8=a50_0x8852d2,_0x4d80f7=_0x1bdb89[_0x224ad8(0xf4)]??_0x1bdb89['dbtable'];return _0x4d80f7&&typeof _0x4d80f7===_0x224ad8(0x105)?_0x4d80f7:{};}export function isDbTableBackedDataset(_0x4a62b8){const _0x24bf74=a50_0x8852d2,_0x5ec44d=getDatasetSource(_0x4a62b8);if(_0x5ec44d===_0x24bf74(0xf5))return![];const _0x55a11c=getDbtableConfig(_0x4a62b8),_0xd85871=_0x55a11c[_0x24bf74(0xef)]??_0x55a11c['id'],_0x27e5df=valueToString(_0x55a11c['tableName']??_0x4a62b8[_0x24bf74(0xf3)]??_0x4a62b8[_0x24bf74(0x107)]?.[_0x24bf74(0xf3)]);return _0xd85871!==undefined&&_0xd85871!==null&&_0x27e5df[_0x24bf74(0xf6)]>0x0;}function a50_0x1497(){const _0x3267ba=['\x20的\x20DB_TABLE\x20数据源上下文。','toUpperCase','1756DzuoCz','name','SQL\x20schema\x20validation','1566102VHyFmP','source','9173769RZnXpp','dbId','UNKNOWN','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','11733831KmubvQ','tableName','dbtableConfig','METADATA','length','code','unknown','validation','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','modelCode','filter','12089760MxOcYQ','datasetName','4373772ZRhORo','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','28LNQlJN','datasetCode','1522slHjjJ','651tErQiq','object','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','dataset','6330SeJkye','getOne','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','30VLDnVt','join','\x20是\x20'];a50_0x1497=function(){return _0x3267ba;};return a50_0x1497();}function a50_0x32dc(_0x132949,_0x351264){_0x132949=_0x132949-0xe9;const _0x1497ae=a50_0x1497();let _0x32dc4d=_0x1497ae[_0x132949];return _0x32dc4d;}export function filterDbTableBackedDatasets(_0x3e114e){const _0x3d0550=a50_0x8852d2;return _0x3e114e[_0x3d0550(0xfc)](_0x5209ad=>isDbTableBackedDataset(_0x5209ad));}export function buildDbTableBackedRequirementMessage(_0x3f9036,_0x6788a5=a50_0x8852d2(0xeb)){const _0x32a6fb=a50_0x8852d2,_0x278dd4=getDatasetSource(_0x3f9036)||_0x32a6fb(0xf0),_0x21a9fc=getDatasetName(_0x3f9036),_0x1892c6=getDatasetCode(_0x3f9036),_0xd36f99=_0x1892c6?'\x20('+_0x1892c6+')':'';return['当前数据集\x20\x22'+_0x21a9fc+'\x22'+_0xd36f99+_0x32a6fb(0x10d)+_0x278dd4+'\x20类型,没有可用于\x20'+_0x6788a5+_0x32a6fb(0x10e),'原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。',_0x32a6fb(0xf1),_0x32a6fb(0x100)+RUNTIME_DATA_ACCESS_COMMANDS[_0x32a6fb(0xfc)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x32a6fb(0x109)]+'。'][_0x32a6fb(0x10c)]('\x20');}export function assertDatasetIsDbTableBacked(_0xbb277,_0x3d6273){const _0x4578d4=a50_0x8852d2;if(!isDbTableBackedDataset(_0xbb277))throw CliErrors[_0x4578d4(0xf9)](buildDbTableBackedRequirementMessage(_0xbb277,_0x3d6273));}
|