@lovrabet/rabetbase-cli 2.1.14-beta.3 → 2.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -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 -0
- package/lib/commands/dataset/relation-delete.js +1 -0
- package/lib/commands/dataset/relation-shared.js +1 -0
- package/lib/commands/dataset/relation-update.js +1 -0
- package/lib/commands/dataset/relations.js +1 -0
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -0
- 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 -0
- 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/dataset/link-create.js +0 -1
- package/lib/commands/dataset/link-delete.js +0 -1
- package/lib/commands/dataset/link-shared.js +0 -1
- package/lib/commands/dataset/link-update.js +0 -1
- package/lib/commands/dataset/links.js +0 -1
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a32_0x4d84a8=a32_0x291e;(function(_0x28ee63,_0x44ee2a){const _0x396064=a32_0x291e,_0x2a6ef9=_0x28ee63();while(!![]){try{const _0x4d2497=parseInt(_0x396064(0x236))/0x1+parseInt(_0x396064(0x220))/0x2*(parseInt(_0x396064(0x1f5))/0x3)+-parseInt(_0x396064(0x22f))/0x4*(parseInt(_0x396064(0x22c))/0x5)+parseInt(_0x396064(0x1e9))/0x6*(-parseInt(_0x396064(0x1ff))/0x7)+-parseInt(_0x396064(0x227))/0x8+parseInt(_0x396064(0x21d))/0x9*(-parseInt(_0x396064(0x1f4))/0xa)+parseInt(_0x396064(0x1ed))/0xb;if(_0x4d2497===_0x44ee2a)break;else _0x2a6ef9['push'](_0x2a6ef9['shift']());}catch(_0x49cfce){_0x2a6ef9['push'](_0x2a6ef9['shift']());}}}(a32_0x1a1d,0xc1ec1));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';import{assertDatasetSupportsLocalDevelopment}from'../../commands/dataset/capability.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':'push','description':a32_0x4d84a8(0x204),'risk':'high-risk-write','flags':[{'name':a32_0x4d84a8(0x210),'type':'string','description':a32_0x4d84a8(0x20d),'enum':[a32_0x4d84a8(0x1f7),a32_0x4d84a8(0x201),a32_0x4d84a8(0x23a)]},{'name':a32_0x4d84a8(0x226),'type':a32_0x4d84a8(0x232),'description':a32_0x4d84a8(0x21a)},{'name':a32_0x4d84a8(0x225),'type':a32_0x4d84a8(0x238),'description':a32_0x4d84a8(0x21e)}],async 'dryRun'(_0x52fe0d){const _0x58a651=a32_0x4d84a8,_0x183c5e=loadBffProjectConfig(_0x52fe0d[_0x58a651(0x1f0)]),_0x1e708d=await readBffLockFile(_0x183c5e['lockFilePath']),{appLock:_0x184104}=ensureLockScope(_0x1e708d??createEmptyBffLock(),_0x52fe0d[_0x58a651(0x1f0)],_0x183c5e[_0x58a651(0x221)],'push'),_0xf4f81c=await getTargetFunctions(_0x183c5e,_0x52fe0d),_0x15cde5=_0x52fe0d[_0x58a651(0x209)]('force'),_0x24dbf5=[];for(const _0x21301e of _0xf4f81c){const _0x599306=await computeFileHash(_0x21301e[_0x58a651(0x235)]),_0x3ca119=_0x184104[_0x58a651(0x233)][_0x21301e[_0x58a651(0x208)]],_0x5c63a5=!!_0x3ca119&&_0x3ca119['hash']===_0x599306;_0x24dbf5[_0x58a651(0x222)]({'lockKey':_0x21301e[_0x58a651(0x208)],'filePath':_0x21301e['filePath'],'remoteId':_0x3ca119?.['remoteId']??null,'mode':_0x3ca119?.[_0x58a651(0x239)]?_0x58a651(0x218):_0x58a651(0x1e8),'status':!_0x15cde5&&_0x5c63a5?_0x58a651(0x1f1):'would_push'});}return{'method':_0x58a651(0x215),'url':_0x58a651(0x207),'body':{'appCode':_0x52fe0d['appCode'],'force':_0x15cde5,'files':_0x24dbf5,'cacheClearAtRuntime':_0x24dbf5[_0x58a651(0x20f)](_0x3d6ec0=>_0x3d6ec0[_0x58a651(0x1ec)]===_0x58a651(0x22e)),'cacheClearAtRuntimeTimes':_0x24dbf5['some'](_0x434955=>_0x434955[_0x58a651(0x1ec)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x58a651(0x22d)+_0x24dbf5[_0x58a651(0x21f)]+_0x58a651(0x202)};},async 'execute'(_0x58275a){const _0x2cf02f=a32_0x4d84a8,_0x3aa8e1=loadBffProjectConfig(_0x58275a[_0x2cf02f(0x1f0)]),_0xa9a987=await readBffLockFile(_0x3aa8e1[_0x2cf02f(0x203)]),{lockData:_0x44d9f4,appLock:_0x11455c}=ensureLockScope(_0xa9a987??createEmptyBffLock(),_0x58275a['appCode'],_0x3aa8e1[_0x2cf02f(0x221)],_0x2cf02f(0x222)),_0x4f08b7=await getTargetFunctions(_0x3aa8e1,_0x58275a);if(_0x4f08b7[_0x2cf02f(0x21f)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x2cf02f(0x234)};const _0x35a20d=_0x58275a['bool'](_0x2cf02f(0x225)),_0x4ebbf0=JSON['parse'](JSON['stringify'](_0x44d9f4)),_0x207610=_0x4ebbf0[_0x2cf02f(0x1fe)][_0x58275a[_0x2cf02f(0x1f0)]];if(!_0x207610)throw new Error(_0x2cf02f(0x1ee)+_0x58275a['appCode']+_0x2cf02f(0x23b));const _0x5b42b1=await buildHookMaps(_0x58275a[_0x2cf02f(0x1f0)],_0x58275a[_0x2cf02f(0x205)],_0x4f08b7,_0x207610),_0x251714=[],_0x22c3e9=[],_0xacb03=[];for(const _0x5052f3 of _0x4f08b7){const _0x23a5a2=await computeFileHash(_0x5052f3[_0x2cf02f(0x235)]),_0x432e40=_0x207610['functions'][_0x5052f3[_0x2cf02f(0x208)]];if(!_0x35a20d&&_0x432e40&&_0x432e40[_0x2cf02f(0x20b)]===_0x23a5a2){_0x22c3e9[_0x2cf02f(0x222)]({'lockKey':_0x5052f3['lockKey'],'reason':_0x2cf02f(0x1f1)});continue;}try{await uploadSingleFunction(_0x58275a[_0x2cf02f(0x1f0)],_0x5052f3,_0x207610,_0x5b42b1);const _0x1f4d3b=_0x207610[_0x2cf02f(0x233)][_0x5052f3[_0x2cf02f(0x208)]];_0x251714[_0x2cf02f(0x222)]({'lockKey':_0x5052f3[_0x2cf02f(0x208)],'remoteId':_0x1f4d3b?.[_0x2cf02f(0x239)]??0x0});}catch(_0x39d7d6){_0xacb03[_0x2cf02f(0x222)]({'lockKey':_0x5052f3[_0x2cf02f(0x208)],'error':_0x39d7d6 instanceof Error?_0x39d7d6['message']:String(_0x39d7d6)});}}_0x207610[_0x2cf02f(0x22a)]=new Date()[_0x2cf02f(0x1fb)](),await writeBffLockFile(_0x3aa8e1['lockFilePath'],_0x4ebbf0),await waitForUploadedLockEntries(_0x3aa8e1[_0x2cf02f(0x203)],_0x58275a[_0x2cf02f(0x1f0)],_0x251714['map'](_0x45f57c=>_0x45f57c[_0x2cf02f(0x208)]));let _0x488eea={'attempted':![],'cleared':![]};if(_0x251714[_0x2cf02f(0x21f)]>0x0)try{let _0x1d604b='';for(let _0x52aa12=0x0;_0x52aa12<CACHE_CLEAR_ATTEMPTS;_0x52aa12+=0x1){_0x1d604b=await clearBffScriptCache(),_0x52aa12<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x488eea={'attempted':!![],'cleared':!![],'message':_0x1d604b||_0x2cf02f(0x228)};}catch(_0x1a9fd2){_0x488eea={'attempted':!![],'cleared':![],'error':_0x1a9fd2 instanceof Error?_0x1a9fd2[_0x2cf02f(0x22b)]:String(_0x1a9fd2)};}const _0x543f69=_0xacb03['length']===0x0&&(_0x488eea['attempted']?_0x488eea[_0x2cf02f(0x1f8)]:!![]),_0x5b7fa0=_0x488eea[_0x2cf02f(0x23c)]?_0x488eea[_0x2cf02f(0x1f8)]?'runtime\x20cache\x20cleared':_0x2cf02f(0x1ea):_0x2cf02f(0x23d);return{'ok':_0x543f69,'data':{'uploaded':_0x251714,'skipped':_0x22c3e9,'failed':_0xacb03,'cacheClear':_0x488eea},'message':_0x2cf02f(0x20c)+_0x251714['length']+_0x2cf02f(0x1f9)+_0x22c3e9[_0x2cf02f(0x21f)]+_0x2cf02f(0x230)+_0xacb03[_0x2cf02f(0x21f)]+'\x20failed,\x20'+_0x5b7fa0};}};async function getTargetFunctions(_0x4d6b61,_0xec0051){const _0xcddacd=a32_0x4d84a8,_0xb4db22=_0xec0051[_0xcddacd(0x214)](_0xcddacd(0x210)),_0x1d329b=_0xec0051[_0xcddacd(0x214)](_0xcddacd(0x226)),_0x1e9604=normalizeBffType(_0xb4db22)??undefined;if(_0x1d329b&&!_0x1e9604)throw CliErrors[_0xcddacd(0x231)](_0xcddacd(0x21c));const _0x536739=await scanLocalBffFunctions(_0x4d6b61,_0x1e9604);if(_0x1d329b){const _0xe6e96a=_0x536739[_0xcddacd(0x1f2)](_0x11f638=>_0x11f638[_0xcddacd(0x226)]===_0x1d329b);if(_0xe6e96a[_0xcddacd(0x21f)]===0x0)throw CliErrors[_0xcddacd(0x231)](_0xcddacd(0x229)+_0x1e9604+'/'+_0x1d329b);return _0xe6e96a;}return _0x536739;}function a32_0x291e(_0x3645a0,_0xbc9687){_0x3645a0=_0x3645a0-0x1e6;const _0x1a1d42=a32_0x1a1d();let _0x291ee8=_0x1a1d42[_0x3645a0];return _0x291ee8;}async function buildHookMaps(_0x154bec,_0x162cf8,_0x5876ee,_0x38f726){const _0x4f4bc8=a32_0x4d84a8,_0x4a1fec=_0x5876ee[_0x4f4bc8(0x20f)](_0x1a0f25=>_0x1a0f25[_0x4f4bc8(0x210)]==='HOOK');if(!_0x4a1fec)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x39b595=loadAliasMap(_0x162cf8,undefined,resolveApiFilePath(_0x162cf8,_0x154bec)),_0x2a2b3b=new Map(_0x39b595['map'](_0x4d8e99=>[_0x4d8e99['alias'],_0x4d8e99[_0x4f4bc8(0x216)]]));for(const _0x1d9415 of Object[_0x4f4bc8(0x20a)](_0x38f726[_0x4f4bc8(0x233)])){_0x1d9415[_0x4f4bc8(0x1fc)]&&_0x1d9415[_0x4f4bc8(0x216)]&&!_0x2a2b3b[_0x4f4bc8(0x212)](_0x1d9415[_0x4f4bc8(0x1fc)])&&_0x2a2b3b[_0x4f4bc8(0x1f6)](_0x1d9415[_0x4f4bc8(0x1fc)],_0x1d9415[_0x4f4bc8(0x216)]);}const _0x29dc48=await listDatasets(_0x154bec),_0x227652=new Map(_0x29dc48[_0x4f4bc8(0x21b)](_0x1c09c4=>[_0x1c09c4[_0x4f4bc8(0x1fd)],_0x1c09c4]));return{'aliasToDatasetCode':_0x2a2b3b,'datasetCodeToDataset':_0x227652};}async function uploadSingleFunction(_0x57121a,_0x4fcc7f,_0x39b240,_0x44eaa8){const _0x313c1c=a32_0x4d84a8,_0x4553d9=await readFile(_0x4fcc7f[_0x313c1c(0x235)],_0x313c1c(0x1fa)),_0x1af722=await computeFileHash(_0x4fcc7f[_0x313c1c(0x235)]),_0x4969ff=_0x39b240[_0x313c1c(0x233)][_0x4fcc7f['lockKey']];if(_0x4969ff?.[_0x313c1c(0x239)]&&_0x4969ff[_0x313c1c(0x20e)]==null)throw CliErrors[_0x313c1c(0x231)](_0x4fcc7f[_0x313c1c(0x208)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x1ae1f8=extractScriptDescription(_0x4553d9);if(!_0x1ae1f8&&_0x4969ff?.[_0x313c1c(0x239)]){const _0x8bbbf=await getBffScriptInfo(_0x4969ff[_0x313c1c(0x239)]);_0x1ae1f8=_0x8bbbf[_0x313c1c(0x213)]||undefined;}const _0x4cf9ae={'appCode':_0x57121a,'functionName':_0x4fcc7f[_0x313c1c(0x226)],'scriptType':_0x4fcc7f[_0x313c1c(0x210)],'scriptContent':_0x4553d9};if(_0x4969ff?.[_0x313c1c(0x239)])_0x4cf9ae['id']=_0x4969ff[_0x313c1c(0x239)];if(_0x4969ff?.[_0x313c1c(0x20e)]!=null)_0x4cf9ae[_0x313c1c(0x20e)]=_0x4969ff[_0x313c1c(0x20e)];if(_0x1ae1f8)_0x4cf9ae['description']=_0x1ae1f8;if(_0x4fcc7f[_0x313c1c(0x210)]==='HOOK'){const _0x39f806=_0x4fcc7f['alias'];if(!_0x39f806||!_0x4fcc7f[_0x313c1c(0x217)]||!_0x4fcc7f['functionNode'])throw CliErrors[_0x313c1c(0x231)](_0x313c1c(0x237)+_0x4fcc7f[_0x313c1c(0x208)]);const _0x21631e=_0x44eaa8['aliasToDatasetCode'][_0x313c1c(0x1e7)](_0x39f806)??_0x4969ff?.['datasetCode']??_0x39f806,_0x46c875=_0x44eaa8['datasetCodeToDataset'][_0x313c1c(0x1e7)](_0x21631e);if(!_0x46c875)throw CliErrors[_0x313c1c(0x231)](_0x313c1c(0x1ef)+_0x39f806+_0x313c1c(0x219)+(_0x313c1c(0x200)+CLI_BIN_NAME+_0x313c1c(0x1eb)));assertDatasetSupportsLocalDevelopment(_0x46c875,'BFF\x20HOOK\x20'+_0x4fcc7f[_0x313c1c(0x208)]),_0x4cf9ae['datasetId']=_0x46c875['id'],_0x4cf9ae[_0x313c1c(0x217)]=_0x4fcc7f[_0x313c1c(0x217)],_0x4cf9ae['functionNode']=_0x4fcc7f[_0x313c1c(0x206)];}const _0x1f66d5=await saveBffScript(_0x4cf9ae),_0x2ff31f=_0x1f66d5['id'],_0x33eeeb=_0x1f66d5[_0x313c1c(0x223)]??await getBffScriptInfo(_0x2ff31f),_0x4d5c9f={'hash':_0x1af722,'remoteId':_0x2ff31f,'version':_0x33eeeb[_0x313c1c(0x20e)]};if(_0x4fcc7f['type']===_0x313c1c(0x23a)){const _0xfbf79=_0x4fcc7f[_0x313c1c(0x1fc)],_0x2545c7=_0x44eaa8['aliasToDatasetCode']['get'](_0xfbf79)??_0x4969ff?.[_0x313c1c(0x216)]??_0xfbf79;_0x44eaa8[_0x313c1c(0x211)][_0x313c1c(0x212)](_0xfbf79)?_0x4d5c9f[_0x313c1c(0x1fc)]=_0xfbf79:_0x4d5c9f[_0x313c1c(0x1fc)]=_0x4969ff?.[_0x313c1c(0x1fc)],_0x4d5c9f[_0x313c1c(0x216)]=_0x2545c7,_0x4d5c9f[_0x313c1c(0x217)]=_0x4fcc7f[_0x313c1c(0x217)],_0x4d5c9f['functionNode']=_0x4fcc7f[_0x313c1c(0x206)];}_0x39b240[_0x313c1c(0x233)][_0x4fcc7f[_0x313c1c(0x208)]]=_0x4d5c9f;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;function a32_0x1a1d(){const _0x49db5e=['\x22\x20not\x20found\x20after\x20ensureLockScope.','attempted','runtime\x20cache\x20not\x20needed','every','get','create','6FOytna','runtime\x20cache\x20clear\x20failed','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','status','2125871wuiUAl','Lock\x20scope\x20for\x20app\x20\x22','Cannot\x20resolve\x20dataset\x20for\x20\x22','appCode','unchanged','filter','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','30hBApEh','2307543sBWzVE','set','COMMON','cleared','\x20uploaded,\x20','utf8','toISOString','alias','code','apps','1385363nDqQer','Run\x20`','ENDPOINT','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','lockFilePath','Push\x20local\x20BFF\x20scripts\x20to\x20remote','apiDir','functionNode','/api/management/library/scripts/save','lockKey','bool','values','hash','Push\x20complete:\x20','Push\x20only\x20this\x20script\x20type','version','some','type','aliasToDatasetCode','has','description','str','POST','datasetCode','operationType','update','\x22.\x20','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','map','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','370134tfyxTL','Force\x20push\x20ignoring\x20hash\x20protection','length','2Wtqwsv','scriptsRoot','push','script','join','force','name','589656AdnifP','Runtime\x20script\x20cache\x20cleared.','Local\x20function\x20not\x20found:\x20','lastSync','message','10585mCObXe','Would\x20inspect\x20','would_push','636ClBfrC','\x20skipped,\x20','validation','string','functions','No\x20local\x20BFF\x20functions\x20found.','filePath','563460hwNVRk','Incomplete\x20HOOK\x20path:\x20','boolean','remoteId','HOOK'];a32_0x1a1d=function(){return _0x49db5e;};return a32_0x1a1d();}async function waitForUploadedLockEntries(_0x1ee791,_0x1a9d1d,_0x2035ca){const _0x120daf=a32_0x4d84a8;if(_0x2035ca[_0x120daf(0x21f)]===0x0)return;for(let _0x23b092=0x0;_0x23b092<LOCK_SETTLE_RETRY_COUNT;_0x23b092+=0x1){const _0x101a59=await readBffLockFile(_0x1ee791),_0x2b309a=_0x101a59?.[_0x120daf(0x1fe)]?.[_0x1a9d1d]?.[_0x120daf(0x233)]??{},_0x4320c5=_0x2035ca[_0x120daf(0x1e6)](_0x507c06=>!!_0x2b309a[_0x507c06]?.[_0x120daf(0x239)]);if(_0x4320c5)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x120daf(0x1f3)+_0x2035ca[_0x120daf(0x224)](',\x20')+'.');}
|
|
1
|
+
const a32_0x371642=a32_0x1199;(function(_0x99e2c8,_0x23d8ea){const _0x3655d0=a32_0x1199,_0x381e1a=_0x99e2c8();while(!![]){try{const _0xa4afd9=-parseInt(_0x3655d0(0xe1))/0x1+-parseInt(_0x3655d0(0x107))/0x2*(parseInt(_0x3655d0(0xfe))/0x3)+-parseInt(_0x3655d0(0xcf))/0x4*(parseInt(_0x3655d0(0x116))/0x5)+parseInt(_0x3655d0(0xde))/0x6+-parseInt(_0x3655d0(0xd8))/0x7*(-parseInt(_0x3655d0(0x11a))/0x8)+parseInt(_0x3655d0(0xda))/0x9*(parseInt(_0x3655d0(0x109))/0xa)+parseInt(_0x3655d0(0xf5))/0xb;if(_0xa4afd9===_0x23d8ea)break;else _0x381e1a['push'](_0x381e1a['shift']());}catch(_0x501502){_0x381e1a['push'](_0x381e1a['shift']());}}}(a32_0x1965,0xc9dd1));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';function a32_0x1199(_0x3b8faa,_0x25bc33){_0x3b8faa=_0x3b8faa-0xce;const _0x196521=a32_0x1965();let _0x1199fd=_0x196521[_0x3b8faa];return _0x1199fd;}import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{assertDatasetSupportsLocalDevelopment}from'../../commands/dataset/capability.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a32_0x371642(0xe6),'command':a32_0x371642(0xe2),'description':a32_0x371642(0x117),'risk':a32_0x371642(0xe9),'flags':[{'name':a32_0x371642(0xeb),'type':'string','description':'Push\x20only\x20this\x20script\x20type','enum':[a32_0x371642(0x11d),'ENDPOINT','HOOK']},{'name':a32_0x371642(0xec),'type':a32_0x371642(0x114),'description':a32_0x371642(0xe4)},{'name':a32_0x371642(0x106),'type':a32_0x371642(0x115),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x2b6775){const _0x5c95be=a32_0x371642,_0x84fa1e=loadBffProjectConfig(_0x2b6775[_0x5c95be(0xe5)]),_0x1c4575=await readBffLockFile(_0x84fa1e[_0x5c95be(0xf1)]),{appLock:_0x1ffc48}=ensureLockScope(_0x1c4575??createEmptyBffLock(),_0x2b6775[_0x5c95be(0xe5)],_0x84fa1e['scriptsRoot'],_0x5c95be(0xe2)),_0x42d389=await getTargetFunctions(_0x84fa1e,_0x2b6775),_0x5133c1=_0x2b6775[_0x5c95be(0xff)](_0x5c95be(0x106)),_0x4b4809=[];for(const _0x114d55 of _0x42d389){const _0x5d7cbb=await computeFileHash(_0x114d55[_0x5c95be(0x100)]),_0x460a77=_0x1ffc48['functions'][_0x114d55['lockKey']],_0x28028a=!!_0x460a77&&_0x460a77['hash']===_0x5d7cbb;_0x4b4809[_0x5c95be(0xe2)]({'lockKey':_0x114d55[_0x5c95be(0x121)],'filePath':_0x114d55[_0x5c95be(0x100)],'remoteId':_0x460a77?.[_0x5c95be(0x118)]??null,'mode':_0x460a77?.['remoteId']?_0x5c95be(0xd7):_0x5c95be(0xf2),'status':!_0x5133c1&&_0x28028a?_0x5c95be(0xfd):'would_push'});}return{'method':_0x5c95be(0xee),'url':_0x5c95be(0xdd),'body':{'appCode':_0x2b6775['appCode'],'force':_0x5133c1,'files':_0x4b4809,'cacheClearAtRuntime':_0x4b4809['some'](_0x21d6e5=>_0x21d6e5[_0x5c95be(0xd5)]===_0x5c95be(0xfc)),'cacheClearAtRuntimeTimes':_0x4b4809['some'](_0x6d303=>_0x6d303[_0x5c95be(0xd5)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x5c95be(0x122)+_0x4b4809[_0x5c95be(0xd1)]+_0x5c95be(0x10f)};},async 'execute'(_0x26152a){const _0x30de71=a32_0x371642,_0x2c7b64=loadBffProjectConfig(_0x26152a['appCode']),_0x3c66e6=await readBffLockFile(_0x2c7b64[_0x30de71(0xf1)]),{lockData:_0x44f378,appLock:_0x1ac4fa}=ensureLockScope(_0x3c66e6??createEmptyBffLock(),_0x26152a[_0x30de71(0xe5)],_0x2c7b64[_0x30de71(0x11b)],_0x30de71(0xe2)),_0x5eccd=await getTargetFunctions(_0x2c7b64,_0x26152a);if(_0x5eccd['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x30de71(0x110)};const _0x4a01c9=_0x26152a[_0x30de71(0xff)]('force'),_0x23e7be=JSON[_0x30de71(0xf6)](JSON['stringify'](_0x44f378)),_0x405669=_0x23e7be['apps'][_0x26152a[_0x30de71(0xe5)]];if(!_0x405669)throw new Error(_0x30de71(0x120)+_0x26152a['appCode']+_0x30de71(0xf9));const _0x4a7f05=await buildHookMaps(_0x26152a['appCode'],_0x26152a[_0x30de71(0xd6)],_0x5eccd,_0x405669),_0x9442ed=[],_0x501278=[],_0x2f79fa=[];for(const _0x519a70 of _0x5eccd){const _0x4fe2b4=await computeFileHash(_0x519a70[_0x30de71(0x100)]),_0x505269=_0x405669['functions'][_0x519a70['lockKey']];if(!_0x4a01c9&&_0x505269&&_0x505269[_0x30de71(0xd2)]===_0x4fe2b4){_0x501278[_0x30de71(0xe2)]({'lockKey':_0x519a70[_0x30de71(0x121)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x26152a[_0x30de71(0xe5)],_0x519a70,_0x405669,_0x4a7f05);const _0x2b58a4=_0x405669['functions'][_0x519a70[_0x30de71(0x121)]];_0x9442ed[_0x30de71(0xe2)]({'lockKey':_0x519a70[_0x30de71(0x121)],'remoteId':_0x2b58a4?.[_0x30de71(0x118)]??0x0});}catch(_0x3793b5){_0x2f79fa['push']({'lockKey':_0x519a70[_0x30de71(0x121)],'error':_0x3793b5 instanceof Error?_0x3793b5['message']:String(_0x3793b5)});}}_0x405669[_0x30de71(0xed)]=new Date()[_0x30de71(0xf3)](),await writeBffLockFile(_0x2c7b64['lockFilePath'],_0x23e7be),await waitForUploadedLockEntries(_0x2c7b64[_0x30de71(0xf1)],_0x26152a[_0x30de71(0xe5)],_0x9442ed[_0x30de71(0xfb)](_0xf2a87c=>_0xf2a87c[_0x30de71(0x121)]));let _0x2c3299={'attempted':![],'cleared':![]};if(_0x9442ed[_0x30de71(0xd1)]>0x0)try{let _0x2ada13='';for(let _0x435221=0x0;_0x435221<CACHE_CLEAR_ATTEMPTS;_0x435221+=0x1){_0x2ada13=await clearBffScriptCache(),_0x435221<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x2c3299={'attempted':!![],'cleared':!![],'message':_0x2ada13||_0x30de71(0x113)};}catch(_0x2ea9cc){_0x2c3299={'attempted':!![],'cleared':![],'error':_0x2ea9cc instanceof Error?_0x2ea9cc[_0x30de71(0xd3)]:String(_0x2ea9cc)};}const _0xdb939e=_0x2f79fa[_0x30de71(0xd1)]===0x0&&(_0x2c3299[_0x30de71(0xef)]?_0x2c3299['cleared']:!![]),_0x2b2ec4=_0x2c3299[_0x30de71(0xef)]?_0x2c3299[_0x30de71(0xdc)]?_0x30de71(0xce):_0x30de71(0xd0):_0x30de71(0xdf);return{'ok':_0xdb939e,'data':{'uploaded':_0x9442ed,'skipped':_0x501278,'failed':_0x2f79fa,'cacheClear':_0x2c3299},'message':_0x30de71(0x102)+_0x9442ed[_0x30de71(0xd1)]+_0x30de71(0x112)+_0x501278[_0x30de71(0xd1)]+_0x30de71(0xf0)+_0x2f79fa[_0x30de71(0xd1)]+'\x20failed,\x20'+_0x2b2ec4};}};function a32_0x1965(){const _0x25258a=['hash','message','alias','status','apiDir','update','14XHBqcm','get','10783926qfnQsD','str','cleared','/api/management/library/scripts/save','5210850QJXKSH','runtime\x20cache\x20not\x20needed','description','823702fSXpes','push','has','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','appCode','bff','every','functionNode','high-risk-write','script','type','name','lastSync','POST','attempted','\x20skipped,\x20','lockFilePath','create','toISOString','validation','6007155BXRVaQ','parse','HOOK','Run\x20`','\x22\x20not\x20found\x20after\x20ensureLockScope.','apps','map','would_push','unchanged','2223KTLcGI','bool','filePath','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','Push\x20complete:\x20','code','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','operationType','force','2668RLraQr','Local\x20function\x20not\x20found:\x20','10RfucmO','join','datasetCode','version','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','values','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','No\x20local\x20BFF\x20functions\x20found.','\x22.\x20','\x20uploaded,\x20','Runtime\x20script\x20cache\x20cleared.','string','boolean','1635895YctrQV','Push\x20local\x20BFF\x20scripts\x20to\x20remote','remoteId',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','1413656slzmmg','scriptsRoot','aliasToDatasetCode','COMMON','BFF\x20HOOK\x20','functions','Lock\x20scope\x20for\x20app\x20\x22','lockKey','Would\x20inspect\x20','runtime\x20cache\x20cleared','4eARPNA','runtime\x20cache\x20clear\x20failed','length'];a32_0x1965=function(){return _0x25258a;};return a32_0x1965();}async function getTargetFunctions(_0x20e3ec,_0x3177d3){const _0x33c299=a32_0x371642,_0x19b830=_0x3177d3[_0x33c299(0xdb)]('type'),_0x532e28=_0x3177d3[_0x33c299(0xdb)](_0x33c299(0xec)),_0x3acc8a=normalizeBffType(_0x19b830)??undefined;if(_0x532e28&&!_0x3acc8a)throw CliErrors[_0x33c299(0xf4)](_0x33c299(0x10d));const _0xb00551=await scanLocalBffFunctions(_0x20e3ec,_0x3acc8a);if(_0x532e28){const _0x1a85b1=_0xb00551['filter'](_0xed65d2=>_0xed65d2[_0x33c299(0xec)]===_0x532e28);if(_0x1a85b1[_0x33c299(0xd1)]===0x0)throw CliErrors[_0x33c299(0xf4)](_0x33c299(0x108)+_0x3acc8a+'/'+_0x532e28);return _0x1a85b1;}return _0xb00551;}async function buildHookMaps(_0x4fe2ce,_0x4bcd7f,_0x1a4eb7,_0x34809c){const _0x3b2941=a32_0x371642,_0x1c10b9=_0x1a4eb7['some'](_0x38fd5e=>_0x38fd5e[_0x3b2941(0xeb)]===_0x3b2941(0xf7));if(!_0x1c10b9)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x33702b=loadAliasMap(_0x4bcd7f,undefined,resolveApiFilePath(_0x4bcd7f,_0x4fe2ce)),_0x4b6452=new Map(_0x33702b[_0x3b2941(0xfb)](_0xcaf857=>[_0xcaf857[_0x3b2941(0xd4)],_0xcaf857['datasetCode']]));for(const _0x3aa95f of Object[_0x3b2941(0x10e)](_0x34809c[_0x3b2941(0x11f)])){_0x3aa95f[_0x3b2941(0xd4)]&&_0x3aa95f['datasetCode']&&!_0x4b6452[_0x3b2941(0xe3)](_0x3aa95f['alias'])&&_0x4b6452['set'](_0x3aa95f[_0x3b2941(0xd4)],_0x3aa95f[_0x3b2941(0x10b)]);}const _0x43b526=await listDatasets(_0x4fe2ce),_0x5e8ba7=new Map(_0x43b526[_0x3b2941(0xfb)](_0xec513e=>[_0xec513e[_0x3b2941(0x103)],_0xec513e]));return{'aliasToDatasetCode':_0x4b6452,'datasetCodeToDataset':_0x5e8ba7};}async function uploadSingleFunction(_0x54e20e,_0x231248,_0x48e807,_0x56e171){const _0x2a176c=a32_0x371642,_0x20c833=await readFile(_0x231248[_0x2a176c(0x100)],'utf8'),_0x31494a=await computeFileHash(_0x231248[_0x2a176c(0x100)]),_0x1a8a84=_0x48e807[_0x2a176c(0x11f)][_0x231248['lockKey']];if(_0x1a8a84?.[_0x2a176c(0x118)]&&_0x1a8a84[_0x2a176c(0x10c)]==null)throw CliErrors[_0x2a176c(0xf4)](_0x231248[_0x2a176c(0x121)]+_0x2a176c(0x119));let _0x38489f=extractScriptDescription(_0x20c833);if(!_0x38489f&&_0x1a8a84?.[_0x2a176c(0x118)]){const _0x31a404=await getBffScriptInfo(_0x1a8a84['remoteId']);_0x38489f=_0x31a404[_0x2a176c(0xe0)]||undefined;}const _0x51b09c={'appCode':_0x54e20e,'functionName':_0x231248['name'],'scriptType':_0x231248[_0x2a176c(0xeb)],'scriptContent':_0x20c833};if(_0x1a8a84?.[_0x2a176c(0x118)])_0x51b09c['id']=_0x1a8a84[_0x2a176c(0x118)];if(_0x1a8a84?.['version']!=null)_0x51b09c[_0x2a176c(0x10c)]=_0x1a8a84[_0x2a176c(0x10c)];if(_0x38489f)_0x51b09c[_0x2a176c(0xe0)]=_0x38489f;if(_0x231248['type']===_0x2a176c(0xf7)){const _0x5a3dc1=_0x231248[_0x2a176c(0xd4)];if(!_0x5a3dc1||!_0x231248[_0x2a176c(0x105)]||!_0x231248['functionNode'])throw CliErrors['validation']('Incomplete\x20HOOK\x20path:\x20'+_0x231248[_0x2a176c(0x121)]);const _0x48eb5d=_0x56e171[_0x2a176c(0x11c)]['get'](_0x5a3dc1)??_0x1a8a84?.[_0x2a176c(0x10b)]??_0x5a3dc1,_0x464348=_0x56e171['datasetCodeToDataset']['get'](_0x48eb5d);if(!_0x464348)throw CliErrors[_0x2a176c(0xf4)]('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x5a3dc1+_0x2a176c(0x111)+(_0x2a176c(0xf8)+CLI_BIN_NAME+_0x2a176c(0x104)));assertDatasetSupportsLocalDevelopment(_0x464348,_0x2a176c(0x11e)+_0x231248['lockKey']),_0x51b09c['datasetId']=_0x464348['id'],_0x51b09c[_0x2a176c(0x105)]=_0x231248[_0x2a176c(0x105)],_0x51b09c['functionNode']=_0x231248[_0x2a176c(0xe8)];}const _0x190314=await saveBffScript(_0x51b09c),_0x4fbc3c=_0x190314['id'],_0x163e61=_0x190314[_0x2a176c(0xea)]??await getBffScriptInfo(_0x4fbc3c),_0xca468={'hash':_0x31494a,'remoteId':_0x4fbc3c,'version':_0x163e61[_0x2a176c(0x10c)]};if(_0x231248['type']==='HOOK'){const _0x3c3e60=_0x231248[_0x2a176c(0xd4)],_0x291ff3=_0x56e171[_0x2a176c(0x11c)][_0x2a176c(0xd9)](_0x3c3e60)??_0x1a8a84?.[_0x2a176c(0x10b)]??_0x3c3e60;_0x56e171[_0x2a176c(0x11c)][_0x2a176c(0xe3)](_0x3c3e60)?_0xca468[_0x2a176c(0xd4)]=_0x3c3e60:_0xca468['alias']=_0x1a8a84?.[_0x2a176c(0xd4)],_0xca468['datasetCode']=_0x291ff3,_0xca468[_0x2a176c(0x105)]=_0x231248[_0x2a176c(0x105)],_0xca468[_0x2a176c(0xe8)]=_0x231248['functionNode'];}_0x48e807['functions'][_0x231248[_0x2a176c(0x121)]]=_0xca468;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x47983b,_0x3ee396,_0x256bec){const _0x2649cc=a32_0x371642;if(_0x256bec[_0x2649cc(0xd1)]===0x0)return;for(let _0x1238c2=0x0;_0x1238c2<LOCK_SETTLE_RETRY_COUNT;_0x1238c2+=0x1){const _0x108b77=await readBffLockFile(_0x47983b),_0x1c79bc=_0x108b77?.[_0x2649cc(0xfa)]?.[_0x3ee396]?.[_0x2649cc(0x11f)]??{},_0x270d6b=_0x256bec[_0x2649cc(0xe7)](_0x158157=>!!_0x1c79bc[_0x158157]?.[_0x2649cc(0x118)]);if(_0x270d6b)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x2649cc(0x101)+_0x256bec[_0x2649cc(0x10a)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x1cb0d5=a33_0x2c01;(function(_0x51fa6f,_0x265259){const _0x43db03=a33_0x2c01,_0x6844f6=_0x51fa6f();while(!![]){try{const _0x2035fd=-parseInt(_0x43db03(0xef))/0x1+parseInt(_0x43db03(0xe8))/0x2*(-parseInt(_0x43db03(0xec))/0x3)+-parseInt(_0x43db03(0xe4))/0x4+parseInt(_0x43db03(0xe9))/0x5*(-parseInt(_0x43db03(0xeb))/0x6)+parseInt(_0x43db03(0xf1))/0x7*(parseInt(_0x43db03(0xf9))/0x8)+-parseInt(_0x43db03(0xf5))/0x9+parseInt(_0x43db03(0xfa))/0xa;if(_0x2035fd===_0x265259)break;else _0x6844f6['push'](_0x6844f6['shift']());}catch(_0xdcafa1){_0x6844f6['push'](_0x6844f6['shift']());}}}(a33_0x4333,0xa7527));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a33_0x2c01(_0x52f226,_0x43bb1f){_0x52f226=_0x52f226-0xe4;const _0x433388=a33_0x4333();let _0x2c01fc=_0x433388[_0x52f226];return _0x2c01fc;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a33_0x4333(){const _0x5be99c=['status','182097bjHWVL','bool','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','filePath','1529504ifeVOX','31830220ULiZKX','datasetCode','functions','length','4035884UACPKB','remote','push','map','1137090rEzerw','990065YYpHYJ','has','6iQyytm','6HtqUsv','lockKey','\x20unchanged','1280492yJVqlc','apiDir','42zKLzpS','hash','appCode'];a33_0x4333=function(){return _0x5be99c;};return a33_0x4333();}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':a33_0x1cb0d5(0xf4),'description':'Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','risk':'read','flags':[{'name':'remote','type':'boolean','description':a33_0x1cb0d5(0xf7)}],async 'execute'(_0x57e28f){const _0x34764f=a33_0x1cb0d5,_0xbec48d=loadBffProjectConfig(_0x57e28f['appCode']),_0x2d8716=await readBffLockFile(_0xbec48d['lockFilePath']),{appLock:_0x4d7d01}=ensureLockScope(_0x2d8716??createEmptyBffLock(),_0x57e28f[_0x34764f(0xf3)],_0xbec48d['scriptsRoot'],_0x34764f(0xf4)),_0x111b07=await scanLocalBffFunctions(_0xbec48d),_0x11c06d=[],_0x10d9aa=[],_0x1b0de5=[];for(const _0x3580f6 of _0x111b07){const _0xcc7791=await computeFileHash(_0x3580f6[_0x34764f(0xf8)]),_0x296c49=_0x4d7d01[_0x34764f(0xfc)][_0x3580f6[_0x34764f(0xed)]];if(!_0x296c49)_0x11c06d[_0x34764f(0xe6)](_0x3580f6['lockKey']);else _0x296c49[_0x34764f(0xf2)]!==_0xcc7791?_0x10d9aa[_0x34764f(0xe6)](_0x3580f6[_0x34764f(0xed)]):_0x1b0de5[_0x34764f(0xe6)](_0x3580f6['lockKey']);}const _0x2d418c=[];if(_0x57e28f[_0x34764f(0xf6)](_0x34764f(0xe5))){const _0x402b75=loadAliasMap(_0x57e28f[_0x34764f(0xf0)],undefined,resolveApiFilePath(_0x57e28f[_0x34764f(0xf0)],_0x57e28f[_0x34764f(0xf3)])),_0x4fcbea=new Map(_0x402b75[_0x34764f(0xe7)](_0x34cef5=>[_0x34cef5[_0x34764f(0xfb)],_0x34cef5['alias']])),[_0x12e679,_0x12a467]=await Promise['all']([listBffScripts(_0x57e28f[_0x34764f(0xf3)]),getBffScriptStatistics(_0x57e28f['appCode'])]),_0x1d83fa=createHookLocationMap(_0x12a467),_0x18db93=new Set(_0x111b07[_0x34764f(0xe7)](_0x98c4cf=>_0x98c4cf[_0x34764f(0xed)]));for(const _0xa7390b of _0x12e679){const _0x1e887=resolveRemoteScriptTarget(_0xbec48d,_0xa7390b,_0x1d83fa,_0x4d7d01[_0x34764f(0xfc)],_0x4fcbea);_0x1e887&&!_0x18db93[_0x34764f(0xea)](_0x1e887[_0x34764f(0xed)])&&_0x2d418c[_0x34764f(0xe6)](_0x1e887[_0x34764f(0xed)]);}}const _0x55989c=_0x11c06d['length']===0x0&&_0x10d9aa[_0x34764f(0xfd)]===0x0&&_0x2d418c[_0x34764f(0xfd)]===0x0;return{'ok':!![],'data':{'added':_0x11c06d,'modified':_0x10d9aa,'unchanged':_0x1b0de5,'remoteOnly':_0x2d418c},'message':_0x55989c?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x11c06d[_0x34764f(0xfd)]+'\x20added,\x20'+_0x10d9aa['length']+'\x20modified,\x20'+_0x1b0de5[_0x34764f(0xfd)]+_0x34764f(0xee)+(_0x2d418c['length']>0x0?',\x20'+_0x2d418c['length']+'\x20remote-only':'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a34_0x23e48d=a34_0x11b2;(function(_0x40b645,_0x49ca55){const _0x26a812=a34_0x11b2,_0x5a57a3=_0x40b645();while(!![]){try{const _0x415432=parseInt(_0x26a812(0xb1))/0x1*(-parseInt(_0x26a812(0x89))/0x2)+-parseInt(_0x26a812(0xc6))/0x3*(parseInt(_0x26a812(0xaf))/0x4)+-parseInt(_0x26a812(0x90))/0x5+-parseInt(_0x26a812(0x84))/0x6+parseInt(_0x26a812(0xa1))/0x7*(parseInt(_0x26a812(0xca))/0x8)+-parseInt(_0x26a812(0xbd))/0x9+parseInt(_0x26a812(0xb8))/0xa*(parseInt(_0x26a812(0x9c))/0xb);if(_0x415432===_0x49ca55)break;else _0x5a57a3['push'](_0x5a57a3['shift']());}catch(_0x424b27){_0x5a57a3['push'](_0x5a57a3['shift']());}}}(a34_0x5153,0xefa5c));import a34_0x154dcc from'chalk';import a34_0x5a8f21 from'ora';import a34_0x2abcd8 from'semver';import{execa}from'execa';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{getCdnConfig}from'../utils/cdn-config.js';function a34_0x5153(){const _0x2c7ad2=['230383uxGLxp','entries','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','beta','fromEntries','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','Already\x20up\x20to\x20date\x20(v','80sZgJYX','unknown','skills','gray','pipe','17132688QMyIdz','inherit','no-skills','object','execPath','\x20→\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','run','cwd','2178yeYVLM','Skipping\x20official\x20skill\x20package\x20(--no-skills).','version','Beta\x20version:\x20','5812600lxmsYp','Invalid\x20version:\x20','toLowerCase','write','source','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','nonInteractive','trim','message','/dist-tags','Update\x20available:\x20','3175194tQfCTF','stableVersion','slice','boolean','install','4FMhTqf','flag','Update\x20failed','filter','validation','Install\x20a\x20specific\x20CLI\x20version','Current\x20version:\x20','6789495aoJyXj','green','Refresh\x20official\x20skill\x20package\x20after\x20updating','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','start','timeout','latest','log','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Checking\x20for\x20updates...','valid','\x20\x20Run\x20manually:\x20','7528334vvbBpf','bool','bun','fail','error','14SprHmt','warn','Updating\x20via\x20','info','Checking\x20official\x20skill\x20package...','yellow','\x20\x20Official\x20skill\x20update\x20failed:\x20','Already\x20on\x20requested\x20version\x20(v','npm','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','Updated\x20to\x20v','Version\x20comparison\x20failed','string','str','9340BzvFgb','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'];a34_0x5153=function(){return _0x2c7ad2;};return a34_0x5153();}import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x51573a=a34_0x11b2;return GIT_COMMIT!==_0x51573a(0xb9)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x51573a(0x86)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x10f4ff=a34_0x11b2,_0x3958ff=process[_0x10f4ff(0xc1)][_0x10f4ff(0xcc)]();if(_0x3958ff['includes'](_0x10f4ff(0x9e)))return _0x10f4ff(0x9e);return'npm';}const updateFlags=[{'name':'beta','type':a34_0x23e48d(0x87),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a34_0x23e48d(0xc8),'type':a34_0x23e48d(0xad),'description':a34_0x23e48d(0x8e)},{'name':a34_0x23e48d(0xbf),'type':a34_0x23e48d(0x87),'description':a34_0x23e48d(0xaa),'default':![]},{'name':a34_0x23e48d(0xba),'type':'boolean','description':a34_0x23e48d(0x92),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x554268){const _0x380ff7=a34_0x23e48d;return _0x554268[_0x380ff7(0xae)]('version')[_0x380ff7(0xd1)]();}function shouldSkipOfficialSkill(_0x439ae7){const _0x414929=a34_0x23e48d;return _0x439ae7['bool'](_0x414929(0xbf))||_0x439ae7[_0x414929(0x8a)](_0x414929(0xba))===![];}async function validateUpdateFlags(_0x2fea43){const _0x59b161=a34_0x23e48d,_0x433345=_0x2fea43['bool'](_0x59b161(0xb4)),_0x4a9b6e=getRequestedVersion(_0x2fea43);if(_0x433345&&_0x4a9b6e)throw CliErrors[_0x59b161(0x8d)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x4a9b6e&&!a34_0x2abcd8[_0x59b161(0x9a)](_0x4a9b6e))throw CliErrors[_0x59b161(0x8d)](_0x59b161(0xcb)+_0x4a9b6e,_0x59b161(0xcf));}async function fetchNpmDistTags(){const _0x4795ff=a34_0x23e48d;try{const _0x1c7fb9=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x4795ff(0xd3),{'signal':AbortSignal[_0x4795ff(0x95)](0x2710)});if(!_0x1c7fb9['ok'])return null;const _0x4f1f94=await _0x1c7fb9['json']();if(!_0x4f1f94||typeof _0x4f1f94!==_0x4795ff(0xc0))return null;return Object[_0x4795ff(0xb5)](Object[_0x4795ff(0xb2)](_0x4f1f94)[_0x4795ff(0x8c)](([,_0x2ea940])=>typeof _0x2ea940==='string'&&_0x2ea940[_0x4795ff(0xd1)]()['length']>0x0)['map'](([_0x4bc233,_0x4d7e0e])=>[_0x4bc233,String(_0x4d7e0e)[_0x4795ff(0xd1)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x57a55e){const _0x110088=await fetchNpmDistTags();return _0x110088?.[_0x57a55e]??null;}async function fetchLatestVersion(){const _0x3f189c=a34_0x23e48d,_0x1d5ca4=await fetchNpmDistTagVersion(_0x3f189c(0x96));if(_0x1d5ca4)return _0x1d5ca4;const _0x42489d=await getCdnConfig();return _0x42489d?.['cli']?.[_0x3f189c(0x85)]??null;}async function resolveTargetVersion(_0xb8ea95){const _0x74103c=a34_0x23e48d,_0x2d3a90=getRequestedVersion(_0xb8ea95);if(_0x2d3a90)return{'version':_0x2d3a90,'source':_0x74103c(0xc8)};if(_0xb8ea95['bool']('beta')){const _0x2ee189=await fetchNpmDistTagVersion(_0x74103c(0xb4));if(!_0x2ee189)return null;return{'version':_0x2ee189,'source':_0x74103c(0xb4)};}const _0x21eafa=await fetchLatestVersion();if(!_0x21eafa)return null;return{'version':_0x21eafa,'source':'latest'};}function shouldInstallTarget(_0x469e03,_0xd1ea81){const _0x1c4d5e=a34_0x23e48d;if(_0xd1ea81[_0x1c4d5e(0xce)]==='version'||_0xd1ea81['source']==='beta')return!a34_0x2abcd8['eq'](_0x469e03,_0xd1ea81[_0x1c4d5e(0xc8)]);return a34_0x2abcd8['lt'](_0x469e03,_0xd1ea81[_0x1c4d5e(0xc8)]);}function a34_0x11b2(_0x39eaa0,_0x1adfcb){_0x39eaa0=_0x39eaa0-0x84;const _0x515393=a34_0x5153();let _0x11b26b=_0x515393[_0x39eaa0];return _0x11b26b;}function getInstallPlanLabel(_0x199a59,_0x195609){const _0x3da09f=a34_0x23e48d;switch(_0x195609[_0x3da09f(0xce)]){case _0x3da09f(0xb4):return _0x3da09f(0xc9)+a34_0x154dcc[_0x3da09f(0xa6)](_0x199a59)+'\x20→\x20'+a34_0x154dcc[_0x3da09f(0x91)](_0x195609[_0x3da09f(0xc8)]);case _0x3da09f(0xc8):return'Requested\x20version:\x20'+a34_0x154dcc[_0x3da09f(0xa6)](_0x199a59)+_0x3da09f(0xc2)+a34_0x154dcc[_0x3da09f(0x91)](_0x195609[_0x3da09f(0xc8)]);case _0x3da09f(0x96):default:return _0x3da09f(0xd4)+a34_0x154dcc['yellow'](_0x199a59)+_0x3da09f(0xc2)+a34_0x154dcc[_0x3da09f(0x91)](_0x195609[_0x3da09f(0xc8)]);}}async function installOfficialSkill(_0x589d4c){const _0x1f0d1d=a34_0x23e48d;console['log'](a34_0x154dcc[_0x1f0d1d(0xbb)](_0x1f0d1d(0xa5)));const _0x14a8e2=runNpxSkillsAddGlobal(process[_0x1f0d1d(0xc5)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x589d4c?_0x1f0d1d(0xbc):_0x1f0d1d(0xbe)});if(_0x14a8e2['skipped']){console[_0x1f0d1d(0x97)](a34_0x154dcc[_0x1f0d1d(0xbb)](_0x1f0d1d(0xb0)));return;}if(_0x14a8e2['ok']){console['log'](a34_0x154dcc[_0x1f0d1d(0xbb)]('\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.'));return;}console[_0x1f0d1d(0xa2)](a34_0x154dcc[_0x1f0d1d(0xa6)](_0x1f0d1d(0xa7)+(_0x14a8e2[_0x1f0d1d(0xa0)]||_0x1f0d1d(0xb9)))),console[_0x1f0d1d(0x97)](a34_0x154dcc[_0x1f0d1d(0xbb)](_0x1f0d1d(0x9b)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x3505e9){const _0x38c5bf=a34_0x23e48d;await validateUpdateFlags(_0x3505e9);const _0x392729=getCurrentVersion();console['log'](_0x38c5bf(0x8f)+_0x392729);const _0x373210=a34_0x5a8f21(_0x38c5bf(0x99))[_0x38c5bf(0x94)](),_0x14d377=await resolveTargetVersion(_0x3505e9);if(!_0x14d377){const _0xdfd60c=_0x3505e9[_0x38c5bf(0x9d)]('beta')?_0x38c5bf(0xb6):_0x38c5bf(0xc3);return _0x373210[_0x38c5bf(0x9f)](_0xdfd60c),console[_0x38c5bf(0x97)](a34_0x154dcc[_0x38c5bf(0xbb)](_0x38c5bf(0x98)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0xdfd60c};}const _0x3a29c2=a34_0x2abcd8[_0x38c5bf(0x9a)](VERSION),_0x365610=a34_0x2abcd8[_0x38c5bf(0x9a)](_0x14d377[_0x38c5bf(0xc8)]);if(!_0x3a29c2||!_0x365610)return _0x373210[_0x38c5bf(0x9f)](_0x38c5bf(0xac)),{'ok':![],'message':_0x38c5bf(0xac)};if(!shouldInstallTarget(_0x3a29c2,_0x14d377)){const _0x3b4cae=_0x14d377['source']===_0x38c5bf(0xc8)?_0x38c5bf(0xa8)+_0x14d377[_0x38c5bf(0xc8)]+')':_0x38c5bf(0xb7)+_0x14d377['version']+')';return _0x373210['succeed'](_0x3b4cae),shouldSkipOfficialSkill(_0x3505e9)?console[_0x38c5bf(0x97)](a34_0x154dcc[_0x38c5bf(0xbb)](_0x38c5bf(0xc7))):await installOfficialSkill(_0x3505e9['nonInteractive']),{'ok':!![]};}_0x373210[_0x38c5bf(0xa4)](getInstallPlanLabel(_0x392729,_0x14d377));const _0x597ea5=detectPackageManager(),_0x3e7032=_0x597ea5===_0x38c5bf(0xa9)?resolveNpmBin(_0x38c5bf(0xa9)):_0x597ea5,_0x5d9087=a34_0x5a8f21(_0x38c5bf(0xa3)+_0x597ea5+'...')[_0x38c5bf(0x94)]();try{return await execa(_0x3e7032,[_0x38c5bf(0x88),'-g',NPM_PACKAGE_NAME+'@'+_0x14d377[_0x38c5bf(0xc8)]],{'stdio':'pipe'}),_0x5d9087['succeed'](_0x38c5bf(0xab)+_0x14d377[_0x38c5bf(0xc8)]),console[_0x38c5bf(0x97)](a34_0x154dcc['gray'](_0x38c5bf(0xb3))),shouldSkipOfficialSkill(_0x3505e9)?console[_0x38c5bf(0x97)](a34_0x154dcc[_0x38c5bf(0xbb)](_0x38c5bf(0xc7))):await installOfficialSkill(_0x3505e9[_0x38c5bf(0xd0)]),{'ok':!![]};}catch(_0x413887){return _0x5d9087[_0x38c5bf(0x9f)](_0x38c5bf(0x8b)),console[_0x38c5bf(0xa0)](a34_0x154dcc['red']('\x20\x20'+_0x413887['message'])),console[_0x38c5bf(0x97)](a34_0x154dcc['gray']('\x20\x20Try\x20manually:\x20'+_0x597ea5+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x14d377[_0x38c5bf(0xc8)])),{'ok':![],'message':_0x413887[_0x38c5bf(0xd2)]};}}export const updateDefinition={'service':'update','command':a34_0x23e48d(0xc4),'description':a34_0x23e48d(0x93),'risk':a34_0x23e48d(0xcd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a34_0x19c5dd=a34_0x2f1b;(function(_0x520e64,_0x4176b6){const _0x509dbc=a34_0x2f1b,_0x5996c7=_0x520e64();while(!![]){try{const _0x3fd4ac=-parseInt(_0x509dbc(0x1a5))/0x1+-parseInt(_0x509dbc(0x161))/0x2+parseInt(_0x509dbc(0x18d))/0x3*(-parseInt(_0x509dbc(0x18e))/0x4)+-parseInt(_0x509dbc(0x15b))/0x5*(-parseInt(_0x509dbc(0x171))/0x6)+parseInt(_0x509dbc(0x19d))/0x7*(parseInt(_0x509dbc(0x174))/0x8)+parseInt(_0x509dbc(0x15e))/0x9+-parseInt(_0x509dbc(0x194))/0xa*(-parseInt(_0x509dbc(0x1a3))/0xb);if(_0x3fd4ac===_0x4176b6)break;else _0x5996c7['push'](_0x5996c7['shift']());}catch(_0xfd1877){_0x5996c7['push'](_0x5996c7['shift']());}}}(a34_0x1176,0xe82e8));import a34_0xab00b9 from'chalk';import a34_0x5979a7 from'ora';import a34_0x41cdb2 from'semver';import{execa}from'execa';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';function a34_0x2f1b(_0x5de91a,_0x24bf97){_0x5de91a=_0x5de91a-0x15b;const _0x11768b=a34_0x1176();let _0x2f1b2b=_0x11768b[_0x5de91a];return _0x2f1b2b;}function a34_0x1176(){const _0x20dde9=['\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','beta','npm','Skipping\x20official\x20skill\x20package\x20(--no-skills).','\x20\x20Try\x20manually:\x20','entries','info','gray','pipe','boolean','Update\x20failed','Update\x20available:\x20','Already\x20up\x20to\x20date\x20(v','timeout','log','str','slice','run','6RaWqFq','2088364oumhhb','\x20\x20Official\x20skill\x20update\x20failed:\x20','version','toLowerCase','unknown','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','2950QjktbW','json','object','fail','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','red','\x20→\x20','bool','8762677rvQXhG','yellow','Version\x20comparison\x20failed','stableVersion','includes','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','21912ubThEi','no-skills','1389142EAXluv','https://registry.npmjs.org/-/package/','error','skills','bun','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','length','cli','...','green','2245pjsUzI','warn','string','10230822dkFOpO','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Updated\x20to\x20v','1813980SHPiKg','latest','start','Requested\x20version:\x20','validation','trim','\x20\x20Run\x20manually:\x20','valid','Beta\x20version:\x20','\x20install\x20-g\x20','message','Checking\x20official\x20skill\x20package...','Already\x20on\x20requested\x20version\x20(v','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','update','install','17574vcqSDy','source','Current\x20version:\x20','8KNlISq','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','filter','nonInteractive','@latest','succeed','/dist-tags'];a34_0x1176=function(){return _0x20dde9;};return a34_0x1176();}import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{getCdnConfig}from'../utils/cdn-config.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0xb798de=a34_0x2f1b;return GIT_COMMIT!==_0xb798de(0x192)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0xb798de(0x18b)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x5214b9=a34_0x2f1b,_0x292e7d=process['execPath'][_0x5214b9(0x191)]();if(_0x292e7d[_0x5214b9(0x1a1)]('bun'))return _0x5214b9(0x1a9);return'npm';}const updateFlags=[{'name':a34_0x19c5dd(0x17c),'type':a34_0x19c5dd(0x184),'description':a34_0x19c5dd(0x16e),'default':![]},{'name':'version','type':a34_0x19c5dd(0x15d),'description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':'no-skills','type':a34_0x19c5dd(0x184),'description':a34_0x19c5dd(0x175),'default':![]},{'name':a34_0x19c5dd(0x1a8),'type':'boolean','description':'Refresh\x20official\x20skill\x20package\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x2741a8){const _0x593ae6=a34_0x19c5dd;return _0x2741a8[_0x593ae6(0x18a)](_0x593ae6(0x190))[_0x593ae6(0x166)]();}function shouldSkipOfficialSkill(_0x57ac33){const _0x291d02=a34_0x19c5dd;return _0x57ac33[_0x291d02(0x19c)](_0x291d02(0x1a4))||_0x57ac33['flag'](_0x291d02(0x1a8))===![];}async function validateUpdateFlags(_0x164657){const _0x52cf97=a34_0x19c5dd,_0x1efebf=_0x164657['bool']('beta'),_0x19d72c=getRequestedVersion(_0x164657);if(_0x1efebf&&_0x19d72c)throw CliErrors['validation']('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x52cf97(0x193));if(_0x19d72c&&!a34_0x41cdb2[_0x52cf97(0x168)](_0x19d72c))throw CliErrors[_0x52cf97(0x165)]('Invalid\x20version:\x20'+_0x19d72c,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x22ffec=a34_0x19c5dd;try{const _0x40d935=await fetch(_0x22ffec(0x1a6)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x22ffec(0x17a),{'signal':AbortSignal[_0x22ffec(0x188)](0x2710)});if(!_0x40d935['ok'])return null;const _0x4829d4=await _0x40d935[_0x22ffec(0x195)]();if(!_0x4829d4||typeof _0x4829d4!==_0x22ffec(0x196))return null;return Object['fromEntries'](Object[_0x22ffec(0x180)](_0x4829d4)[_0x22ffec(0x176)](([,_0x23db55])=>typeof _0x23db55==='string'&&_0x23db55[_0x22ffec(0x166)]()[_0x22ffec(0x1ab)]>0x0)['map'](([_0x3d907a,_0x2880d9])=>[_0x3d907a,String(_0x2880d9)[_0x22ffec(0x166)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x425aec){const _0x1f2925=await fetchNpmDistTags();return _0x1f2925?.[_0x425aec]??null;}async function fetchLatestVersion(){const _0x3c77f6=a34_0x19c5dd,_0x1e2e0e=await fetchNpmDistTagVersion(_0x3c77f6(0x162));if(_0x1e2e0e)return _0x1e2e0e;const _0x39baba=await getCdnConfig();return _0x39baba?.[_0x3c77f6(0x1ac)]?.[_0x3c77f6(0x1a0)]??null;}async function resolveTargetVersion(_0x35d8c2){const _0x5f3bb9=a34_0x19c5dd,_0x1ee18d=getRequestedVersion(_0x35d8c2);if(_0x1ee18d)return{'version':_0x1ee18d,'source':_0x5f3bb9(0x190)};if(_0x35d8c2['bool'](_0x5f3bb9(0x17c))){const _0x1a55f1=await fetchNpmDistTagVersion(_0x5f3bb9(0x17c));if(!_0x1a55f1)return null;return{'version':_0x1a55f1,'source':_0x5f3bb9(0x17c)};}const _0x870306=await fetchLatestVersion();if(!_0x870306)return null;return{'version':_0x870306,'source':'latest'};}function shouldInstallTarget(_0x323b80,_0xf52c07){const _0x40b6fb=a34_0x19c5dd;if(_0xf52c07['source']==='version'||_0xf52c07[_0x40b6fb(0x172)]==='beta')return!a34_0x41cdb2['eq'](_0x323b80,_0xf52c07['version']);return a34_0x41cdb2['lt'](_0x323b80,_0xf52c07[_0x40b6fb(0x190)]);}function getInstallPlanLabel(_0x47483b,_0x51c06f){const _0x13417c=a34_0x19c5dd;switch(_0x51c06f[_0x13417c(0x172)]){case _0x13417c(0x17c):return _0x13417c(0x169)+a34_0xab00b9['yellow'](_0x47483b)+_0x13417c(0x19b)+a34_0xab00b9['green'](_0x51c06f[_0x13417c(0x190)]);case _0x13417c(0x190):return _0x13417c(0x164)+a34_0xab00b9['yellow'](_0x47483b)+'\x20→\x20'+a34_0xab00b9[_0x13417c(0x1ae)](_0x51c06f[_0x13417c(0x190)]);case _0x13417c(0x162):default:return _0x13417c(0x186)+a34_0xab00b9[_0x13417c(0x19e)](_0x47483b)+_0x13417c(0x19b)+a34_0xab00b9[_0x13417c(0x1ae)](_0x51c06f[_0x13417c(0x190)]);}}async function installOfficialSkill(_0x131f90){const _0x45634e=a34_0x19c5dd;console[_0x45634e(0x189)](a34_0xab00b9[_0x45634e(0x182)](_0x45634e(0x16c)));const _0x52706f=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x131f90?'pipe':'inherit'});if(_0x52706f['skipped']){console['log'](a34_0xab00b9[_0x45634e(0x182)]('\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x52706f['ok']){console['log'](a34_0xab00b9[_0x45634e(0x182)](_0x45634e(0x17b)));return;}console[_0x45634e(0x15c)](a34_0xab00b9[_0x45634e(0x19e)](_0x45634e(0x18f)+(_0x52706f[_0x45634e(0x1a7)]||_0x45634e(0x192)))),console['log'](a34_0xab00b9['gray'](_0x45634e(0x167)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x2b5b28){const _0x5ab3bf=a34_0x19c5dd;await validateUpdateFlags(_0x2b5b28);const _0x573238=getCurrentVersion();console[_0x5ab3bf(0x189)](_0x5ab3bf(0x173)+_0x573238);const _0x2f05df=a34_0x5979a7('Checking\x20for\x20updates...')[_0x5ab3bf(0x163)](),_0xa64c8=await resolveTargetVersion(_0x2b5b28);if(!_0xa64c8){const _0x31c7b6=_0x2b5b28[_0x5ab3bf(0x19c)](_0x5ab3bf(0x17c))?_0x5ab3bf(0x1a2):_0x5ab3bf(0x198);return _0x2f05df[_0x5ab3bf(0x197)](_0x31c7b6),console['log'](a34_0xab00b9[_0x5ab3bf(0x182)](_0x5ab3bf(0x15f)+NPM_PACKAGE_NAME+_0x5ab3bf(0x178))),{'ok':![],'message':_0x31c7b6};}const _0x11e5c2=a34_0x41cdb2[_0x5ab3bf(0x168)](VERSION),_0x3088b1=a34_0x41cdb2['valid'](_0xa64c8[_0x5ab3bf(0x190)]);if(!_0x11e5c2||!_0x3088b1)return _0x2f05df[_0x5ab3bf(0x197)](_0x5ab3bf(0x19f)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x11e5c2,_0xa64c8)){const _0x177988=_0xa64c8[_0x5ab3bf(0x172)]===_0x5ab3bf(0x190)?_0x5ab3bf(0x16d)+_0xa64c8[_0x5ab3bf(0x190)]+')':_0x5ab3bf(0x187)+_0xa64c8[_0x5ab3bf(0x190)]+')';return _0x2f05df[_0x5ab3bf(0x179)](_0x177988),shouldSkipOfficialSkill(_0x2b5b28)?console['log'](a34_0xab00b9[_0x5ab3bf(0x182)](_0x5ab3bf(0x17e))):await installOfficialSkill(_0x2b5b28[_0x5ab3bf(0x177)]),{'ok':!![]};}_0x2f05df[_0x5ab3bf(0x181)](getInstallPlanLabel(_0x573238,_0xa64c8));const _0x25b0a7=detectPackageManager(),_0x52de50=_0x25b0a7===_0x5ab3bf(0x17d)?resolveNpmBin(_0x5ab3bf(0x17d)):_0x25b0a7,_0x39bb66=a34_0x5979a7('Updating\x20via\x20'+_0x25b0a7+_0x5ab3bf(0x1ad))['start']();try{return await execa(_0x52de50,[_0x5ab3bf(0x170),'-g',NPM_PACKAGE_NAME+'@'+_0xa64c8[_0x5ab3bf(0x190)]],{'stdio':_0x5ab3bf(0x183)}),_0x39bb66[_0x5ab3bf(0x179)](_0x5ab3bf(0x160)+_0xa64c8[_0x5ab3bf(0x190)]),console[_0x5ab3bf(0x189)](a34_0xab00b9[_0x5ab3bf(0x182)](_0x5ab3bf(0x199))),shouldSkipOfficialSkill(_0x2b5b28)?console[_0x5ab3bf(0x189)](a34_0xab00b9['gray'](_0x5ab3bf(0x17e))):await installOfficialSkill(_0x2b5b28[_0x5ab3bf(0x177)]),{'ok':!![]};}catch(_0xfb9f83){return _0x39bb66[_0x5ab3bf(0x197)](_0x5ab3bf(0x185)),console[_0x5ab3bf(0x1a7)](a34_0xab00b9[_0x5ab3bf(0x19a)]('\x20\x20'+_0xfb9f83[_0x5ab3bf(0x16b)])),console[_0x5ab3bf(0x189)](a34_0xab00b9['gray'](_0x5ab3bf(0x17f)+_0x25b0a7+_0x5ab3bf(0x16a)+NPM_PACKAGE_NAME+'@'+_0xa64c8[_0x5ab3bf(0x190)])),{'ok':![],'message':_0xfb9f83[_0x5ab3bf(0x16b)]};}}export const updateDefinition={'service':a34_0x19c5dd(0x16f),'command':a34_0x19c5dd(0x18c),'description':a34_0x19c5dd(0x1aa),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a719a,_0x21dad1){const _0x133c87=a35_0x164e,_0x4e01da=_0x5a719a();while(!![]){try{const _0x3dc258=parseInt(_0x133c87(0xa4))/0x1+parseInt(_0x133c87(0xa9))/0x2+-parseInt(_0x133c87(0xa7))/0x3*(-parseInt(_0x133c87(0xa6))/0x4)+-parseInt(_0x133c87(0xa8))/0x5*(parseInt(_0x133c87(0xad))/0x6)+parseInt(_0x133c87(0xa5))/0x7+-parseInt(_0x133c87(0xab))/0x8*(parseInt(_0x133c87(0xac))/0x9)+-parseInt(_0x133c87(0xaa))/0xa;if(_0x3dc258===_0x21dad1)break;else _0x4e01da['push'](_0x4e01da['shift']());}catch(_0x268fad){_0x4e01da['push'](_0x4e01da['shift']());}}}(a35_0x57d0,0xb7ebf));function a35_0x57d0(){const _0x436cac=['57JKqGsd','580eoDpwv','1888698zemygN','10061120fzcIwN','72YIsRxu','261639YmJDOL','35484Kpluvj','497985rhoKOE','6705139tfnVDW','64612leWHlQ'];a35_0x57d0=function(){return _0x436cac;};return a35_0x57d0();}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a35_0x164e(_0x50f7dc,_0x46d95e){_0x50f7dc=_0x50f7dc-0xa4;const _0x57d0b5=a35_0x57d0();let _0x164e3c=_0x57d0b5[_0x50f7dc];return _0x164e3c;}export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a36_0x586f(_0x348ae1,_0x5975be){_0x348ae1=_0x348ae1-0x129;const _0x4dc1ab=a36_0x4dc1();let _0x586f02=_0x4dc1ab[_0x348ae1];return _0x586f02;}function a36_0x4dc1(){const _0x37d341=['Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','43670VEfuTY','7UzSYjm','624RTcdAj','5285848qadgrL','120164TNiaAN','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','13468410ZDnYxy','55126460DgsHUh','str','codegen','11FvIigd','2644575HtjpfT','appCode','skip-imports','alias','bool','tableName','name','22TClgcD','4069352pGxwAi','operation','code','Omit\x20import\x20statements\x20from\x20generated\x20code','string','boolean'];a36_0x4dc1=function(){return _0x37d341;};return a36_0x4dc1();}const a36_0x5e1b79=a36_0x586f;(function(_0x10236b,_0x31e61d){const _0x3eaa3d=a36_0x586f,_0x120af8=_0x10236b();while(!![]){try{const _0x1ac0bb=parseInt(_0x3eaa3d(0x130))/0x1*(parseInt(_0x3eaa3d(0x13e))/0x2)+parseInt(_0x3eaa3d(0x137))/0x3+parseInt(_0x3eaa3d(0x13f))/0x4+-parseInt(_0x3eaa3d(0x12c))/0x5*(-parseInt(_0x3eaa3d(0x12e))/0x6)+-parseInt(_0x3eaa3d(0x12d))/0x7*(-parseInt(_0x3eaa3d(0x12f))/0x8)+parseInt(_0x3eaa3d(0x132))/0x9+parseInt(_0x3eaa3d(0x133))/0xa*(-parseInt(_0x3eaa3d(0x136))/0xb);if(_0x1ac0bb===_0x31e61d)break;else _0x120af8['push'](_0x120af8['shift']());}catch(_0x422d45){_0x120af8['push'](_0x120af8['shift']());}}}(a36_0x4dc1,0xbcdca));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a36_0x5e1b79(0x135),'command':'sdk','description':a36_0x5e1b79(0x12b),'risk':'read','flags':[CODE_FLAG_OPTIONAL,{'name':a36_0x5e1b79(0x13a),'type':a36_0x5e1b79(0x129),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a36_0x5e1b79(0x140),'type':'string','required':!![],'description':a36_0x5e1b79(0x131)},{'name':a36_0x5e1b79(0x139),'type':a36_0x5e1b79(0x12a),'description':a36_0x5e1b79(0x142)}],async 'execute'(_0x5a6d7d){const _0x49549f=a36_0x5e1b79,{dataset:_0x507a50,operation:_0x58bffd}=await getOperationDetail(_0x5a6d7d[_0x49549f(0x138)],_0x5a6d7d[_0x49549f(0x134)](_0x49549f(0x141)),_0x5a6d7d['str'](_0x49549f(0x140))),_0x33b943=generateSdkCode(_0x507a50,_0x58bffd,{'includeImports':!_0x5a6d7d[_0x49549f(0x13b)](_0x49549f(0x139))});return{'ok':!![],'data':{'dataset':{'name':_0x507a50[_0x49549f(0x13d)],'code':_0x507a50[_0x49549f(0x141)],'tableName':_0x507a50[_0x49549f(0x13c)]},'operation':_0x5a6d7d[_0x49549f(0x134)](_0x49549f(0x140)),'code':_0x33b943}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a37_0x117a04=a37_0x52f6;(function(_0x28560f,_0x59f908){const _0x130110=a37_0x52f6,_0x4a8b85=_0x28560f();while(!![]){try{const _0x31bab4=parseInt(_0x130110(0xfc))/0x1*(parseInt(_0x130110(0x10d))/0x2)+parseInt(_0x130110(0x100))/0x3*(-parseInt(_0x130110(0x10f))/0x4)+-parseInt(_0x130110(0x102))/0x5*(parseInt(_0x130110(0x108))/0x6)+-parseInt(_0x130110(0x110))/0x7*(parseInt(_0x130110(0xfe))/0x8)+parseInt(_0x130110(0x105))/0x9+parseInt(_0x130110(0x106))/0xa+-parseInt(_0x130110(0x112))/0xb*(-parseInt(_0x130110(0xfb))/0xc);if(_0x31bab4===_0x59f908)break;else _0x4a8b85['push'](_0x4a8b85['shift']());}catch(_0x5694db){_0x4a8b85['push'](_0x4a8b85['shift']());}}}(a37_0x1ba6,0x7ed97));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a37_0x1ba6(){const _0x1713d5=['sqlcode','read','target','string','34702FvrQNe','boolean','16HPsQjE','7QalGMB','bool','823801HIqVxM','str','no-imports','120Ddpxjy','3dwwLvN','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','5345736oYWITi','codegen','197019KbeFwV','appCode','3208310ysbfIL','sqlName','Omit\x20import\x20statements\x20from\x20generated\x20code','6208803EFngYY','6013160pkaIoh','sdk','6aGOPNI'];a37_0x1ba6=function(){return _0x1713d5;};return a37_0x1ba6();}function a37_0x52f6(_0x43847c,_0x592fdc){_0x43847c=_0x43847c-0xf9;const _0x1ba635=a37_0x1ba6();let _0x52f631=_0x1ba635[_0x43847c];return _0x52f631;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a37_0x117a04(0xff),'command':'sql','description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a37_0x117a04(0x10a),'flags':[SQLCODE_FLAG,{'name':a37_0x117a04(0x10b),'type':a37_0x117a04(0x10c),'description':a37_0x117a04(0xfd),'default':a37_0x117a04(0x107),'enum':[a37_0x117a04(0x107),'bff']},{'name':'no-imports','type':a37_0x117a04(0x10e),'description':a37_0x117a04(0x104)}],async 'execute'(_0x4e2164){const _0x3571ec=a37_0x117a04,_0x573ef7=await getSqlQueryInfo(_0x4e2164[_0x3571ec(0x101)],_0x4e2164[_0x3571ec(0xf9)](_0x3571ec(0x109))),_0x318f46=_0x4e2164[_0x3571ec(0xf9)]('target')||_0x3571ec(0x107),_0x2a7dba=generateSqlCodeTemplate(_0x573ef7,{'target':_0x318f46,'includeImports':!_0x4e2164[_0x3571ec(0x111)](_0x3571ec(0xfa))});return{'ok':!![],'data':{'sqlCode':_0x573ef7['sqlCode'],'sqlName':_0x573ef7[_0x3571ec(0x103)],'target':_0x318f46,'code':_0x2a7dba}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x149de8,_0x52a69f){const _0x2978b8=a38_0x5190,_0x442db9=_0x149de8();while(!![]){try{const _0x3ae424=parseInt(_0x2978b8(0x127))/0x1+parseInt(_0x2978b8(0x13c))/0x2*(-parseInt(_0x2978b8(0x125))/0x3)+-parseInt(_0x2978b8(0x12d))/0x4+parseInt(_0x2978b8(0x122))/0x5+parseInt(_0x2978b8(0x12b))/0x6*(-parseInt(_0x2978b8(0x129))/0x7)+-parseInt(_0x2978b8(0x140))/0x8*(-parseInt(_0x2978b8(0x136))/0x9)+-parseInt(_0x2978b8(0x141))/0xa*(-parseInt(_0x2978b8(0x128))/0xb);if(_0x3ae424===_0x52a69f)break;else _0x442db9['push'](_0x442db9['shift']());}catch(_0x16c321){_0x442db9['push'](_0x442db9['shift']());}}}(a38_0x2a34,0x8d62d));import{input,checkbox,select}from'@inquirer/prompts';import a38_0x51c4aa from'chalk';import{validateAppcode}from'../../commands/common/validate.js';function a38_0x5190(_0x127fd2,_0x37f4f3){_0x127fd2=_0x127fd2-0x11a;const _0x2a34ee=a38_0x2a34();let _0x5190e5=_0x2a34ee[_0x127fd2];return _0x5190e5;}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 _0x60c051=a38_0x5190,_0x3bf12d=await input({'message':_0x60c051(0x132),'validate':_0xed8a4b=>{const _0x2cdcc1=_0x60c051,_0xa002b4=validateAppcode(_0xed8a4b['trim']());return _0xa002b4[_0x2cdcc1(0x12c)]||_0xa002b4[_0x2cdcc1(0x12f)]||_0x2cdcc1(0x138);}});return _0x3bf12d['trim']();}export async function promptAppSelection(_0xf36389){const _0x1a40c7=a38_0x5190,_0x4cc6f5=[{'name':a38_0x51c4aa['yellow'](_0x1a40c7(0x13b)),'value':-0x1},..._0xf36389[_0x1a40c7(0x11e)]((_0x57c7bf,_0x4a09a3)=>({'name':_0x57c7bf['appName']+'\x20\x20'+a38_0x51c4aa[_0x1a40c7(0x134)]('('+_0x57c7bf['appCode']+')'),'value':_0x4a09a3}))],_0x7503e9=await checkbox({'message':_0x1a40c7(0x12e)+a38_0x51c4aa[_0x1a40c7(0x12a)](_0xf36389[_0x1a40c7(0x123)])+_0x1a40c7(0x137),'choices':_0x4cc6f5,'loop':![]});if(_0x7503e9[_0x1a40c7(0x13d)](-0x1))return _0x1a40c7(0x13a);if(_0x7503e9[_0x1a40c7(0x123)]===0x0)return _0x1a40c7(0x13a);return _0x7503e9[_0x1a40c7(0x11e)](_0x4a5338=>_0xf36389[_0x4a5338]);}export async function promptSingleAppSelection(_0x48a412){const _0x3c69ec=a38_0x5190,_0x57d5cb=[{'name':a38_0x51c4aa['gray'](_0x3c69ec(0x135)),'value':_0x3c69ec(0x131)},{'name':a38_0x51c4aa['yellow']('✎\x20自定义输入\x20appcode'),'value':_0x3c69ec(0x13a)},..._0x48a412[_0x3c69ec(0x11e)](_0x2f637d=>({'name':_0x2f637d['appName']+'\x20\x20'+a38_0x51c4aa[_0x3c69ec(0x134)]('('+_0x2f637d[_0x3c69ec(0x130)]+')'),'value':_0x2f637d['appCode']}))],_0x144876=await select({'message':_0x3c69ec(0x11f),'choices':_0x57d5cb});if(_0x144876==='skip')return _0x3c69ec(0x131);if(_0x144876==='custom')return _0x3c69ec(0x13a);return _0x48a412[_0x3c69ec(0x121)](_0x4e681a=>_0x4e681a['appCode']===_0x144876);}export async function selectSingleAppcode(_0x249674){const _0x4e3a9f=a38_0x5190;if(!_0x249674)return writeCliSideChannelLine(a38_0x51c4aa[_0x4e3a9f(0x134)](_0x4e3a9f(0x139))),_fallbackOrSkip();writeCliSideChannelLine(_0x4e3a9f(0x133));let _0xdd2840;try{_0xdd2840=await withActiveCookie(_0x249674,()=>listRemoteApps());}catch(_0x22db8c){writeCliSideChannelLine(a38_0x51c4aa['yellow'](_0x4e3a9f(0x126)));if(_0x22db8c instanceof Error)writeCliSideChannelLine(a38_0x51c4aa[_0x4e3a9f(0x134)](_0x4e3a9f(0x13f)+_0x22db8c[_0x4e3a9f(0x12f)]+')'));return _fallbackOrSkip();}if(_0xdd2840[_0x4e3a9f(0x123)]===0x0)return writeCliSideChannelLine(a38_0x51c4aa[_0x4e3a9f(0x13e)](_0x4e3a9f(0x11d))),_fallbackOrSkip();const _0x258485=await promptSingleAppSelection(_0xdd2840);if(_0x258485===_0x4e3a9f(0x131))return'';if(_0x258485===_0x4e3a9f(0x13a))return promptCustomAppcode();return _0x258485[_0x4e3a9f(0x130)];}function a38_0x2a34(){const _0x48b7ee=['174228RcCzXa','includes','yellow','\x20\x20(','3116104YnSeiN','350140naXfZr','manual','\x0a未找到可用应用。','App\x20Code:','未找到可用应用。','map','请选择要绑定的应用:','(跳过,稍后配置)','find','4281770ZxXlIt','length','✎\x20手动输入','9UdaajE','无法获取远程应用列表,请手动输入。','741702SwHYNT','66nXDioS','896161FbxxFq','cyan','54XQiQyM','valid','819948DkLcNc','获取到\x20','message','appCode','skip','请输入\x20App\x20Code:','正在获取可用应用列表...','gray','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','9vRWRJx','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','Invalid\x20App\x20Code','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','custom','✎\x20自定义输入\x20appcode'];a38_0x2a34=function(){return _0x48b7ee;};return a38_0x2a34();}export async function selectMultipleApps(_0xd59caa){const _0x42daea=a38_0x5190;writeCliSideChannelLine(_0x42daea(0x133));let _0x41eaa5;try{_0x41eaa5=await withActiveCookie(_0xd59caa,()=>listRemoteApps());}catch(_0x300cf8){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0x300cf8 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x300cf8[_0x42daea(0x12f)]+')');return _0x42daea(0x13a);}if(_0x41eaa5[_0x42daea(0x123)]===0x0)return writeCliSideChannelLine(_0x42daea(0x11b)),_0x42daea(0x13a);return promptAppSelection(_0x41eaa5);}async function _fallbackOrSkip(){const _0x49706e=a38_0x5190,_0x587ea4=await select({'message':_0x49706e(0x11c),'choices':[{'name':a38_0x51c4aa['gray'](_0x49706e(0x120)),'value':_0x49706e(0x131)},{'name':a38_0x51c4aa[_0x49706e(0x13e)](_0x49706e(0x124)),'value':_0x49706e(0x11a)}]});if(_0x587ea4===_0x49706e(0x131))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a39_0x5c59bb=a39_0x595b;function a39_0x595b(_0xc3f5fb,_0x5edb1f){_0xc3f5fb=_0xc3f5fb-0x1a5;const _0x18a2e6=a39_0x18a2();let _0x595bff=_0x18a2e6[_0xc3f5fb];return _0x595bff;}(function(_0xe99d06,_0x532e58){const _0x1d7592=a39_0x595b,_0xc1f643=_0xe99d06();while(!![]){try{const _0x11bac2=-parseInt(_0x1d7592(0x1a5))/0x1*(-parseInt(_0x1d7592(0x1b7))/0x2)+parseInt(_0x1d7592(0x1b4))/0x3*(parseInt(_0x1d7592(0x1b3))/0x4)+parseInt(_0x1d7592(0x1a8))/0x5*(-parseInt(_0x1d7592(0x1ab))/0x6)+parseInt(_0x1d7592(0x1b1))/0x7*(parseInt(_0x1d7592(0x1bb))/0x8)+-parseInt(_0x1d7592(0x1ad))/0x9+parseInt(_0x1d7592(0x1b8))/0xa+-parseInt(_0x1d7592(0x1b5))/0xb;if(_0x11bac2===_0x532e58)break;else _0xc1f643['push'](_0xc1f643['shift']());}catch(_0x4d299f){_0xc1f643['push'](_0xc1f643['shift']());}}}(a39_0x18a2,0x7bb26));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_0x5c59bb(0x1ac),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a39_0x5c59bb(0x1ae),'description':a39_0x5c59bb(0x1a9)};export const SQLCODE_FLAG={'name':'sqlcode','type':a39_0x5c59bb(0x1ac),'required':!![],'description':a39_0x5c59bb(0x1b2),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a39_0x5c59bb(0x1b9)}};export const APPCODE_FLAG_OPTIONAL={'name':a39_0x5c59bb(0x1aa),'type':a39_0x5c59bb(0x1ac),'required':![],'description':a39_0x5c59bb(0x1a6)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};function a39_0x18a2(){const _0x43bec4=['3aiuJDu','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','MYSQL','339355DxRCca','Dataset\x20code\x20(32-char\x20hex\x20UUID)','appcode','84xwALzX','string','8220501zgHjNp','datasetcode','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','POSTGRESQL','7MmawXm','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','304ClRPZU','24762siSTrn','3124715mpMEzv','number','604142ggHFKz','7256240HvqpSj','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Database\x20product\x20type','3161352fiyRhs'];a39_0x18a2=function(){return _0x43bec4;};return a39_0x18a2();}export const DBLINK_ID_FLAG={'name':'id','type':a39_0x5c59bb(0x1b6),'required':!![],'description':a39_0x5c59bb(0x1af)};export const DB_TYPE_FLAG={'name':'dbtype','type':a39_0x5c59bb(0x1ac),'required':!![],'description':a39_0x5c59bb(0x1ba),'enum':[a39_0x5c59bb(0x1a7),a39_0x5c59bb(0x1b0)]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x997eea,_0x2ba985){const _0x24a8a1=a40_0x989a,_0x1dcf8f=_0x997eea();while(!![]){try{const _0x4f69be=parseInt(_0x24a8a1(0x11a))/0x1+-parseInt(_0x24a8a1(0x119))/0x2*(parseInt(_0x24a8a1(0x11d))/0x3)+parseInt(_0x24a8a1(0x11e))/0x4*(-parseInt(_0x24a8a1(0x114))/0x5)+-parseInt(_0x24a8a1(0x112))/0x6*(-parseInt(_0x24a8a1(0x115))/0x7)+parseInt(_0x24a8a1(0x117))/0x8+parseInt(_0x24a8a1(0x11c))/0x9+parseInt(_0x24a8a1(0x113))/0xa;if(_0x4f69be===_0x2ba985)break;else _0x1dcf8f['push'](_0x1dcf8f['shift']());}catch(_0x401197){_0x1dcf8f['push'](_0x1dcf8f['shift']());}}}(a40_0x3fe3,0xb0842));function a40_0x989a(_0x490188,_0x304179){_0x490188=_0x490188-0x112;const _0x3fe3c2=a40_0x3fe3();let _0x989a94=_0x3fe3c2[_0x490188];return _0x989a94;}export function validateAppcode(_0x2b61f3){const _0x4cc372=a40_0x989a,_0x68c144=_0x2b61f3['trim']();if(!_0x68c144)return{'valid':![],'message':_0x4cc372(0x118)};if(_0x68c144['length']>0x64)return{'valid':![],'message':_0x4cc372(0x116)};if(!/^[A-Za-z0-9_-]+$/[_0x4cc372(0x11b)](_0x68c144))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}function a40_0x3fe3(){const _0x2e7143=['2154udvqOY','1948530vypzjK','2825gtYsmr','4333JQqioh','App\x20Code\x20cannot\x20exceed\x20100\x20characters','1694136XNtNjN','App\x20Code\x20cannot\x20be\x20empty','2jHwNtp','152428cJZfBm','test','426258aGQfuh','3288LmyuKY','740LyTNGH'];a40_0x3fe3=function(){return _0x2e7143;};return a40_0x3fe3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a41_0x3ba5(){const _0x409f67=['object','808257aTjefP','5655363kXqAJv','validation','83815EFlICu','1837BbZsZb','key','str','9tbLlNu','114110woSEwS','10Jdcslk','app','Usage:\x20','3993096ElGmMP','220683IwDxfc','306HMNuVI','string','config','Missing\x20key.','893624hqenXg'];a41_0x3ba5=function(){return _0x409f67;};return a41_0x3ba5();}const a41_0x284001=a41_0x4b70;(function(_0x2ba10c,_0x128a03){const _0x7d1e7f=a41_0x4b70,_0x4b8afb=_0x2ba10c();while(!![]){try{const _0x3da781=-parseInt(_0x7d1e7f(0x1dd))/0x1+parseInt(_0x7d1e7f(0x1e6))/0x2*(parseInt(_0x7d1e7f(0x1ea))/0x3)+-parseInt(_0x7d1e7f(0x1e9))/0x4+-parseInt(_0x7d1e7f(0x1e0))/0x5*(parseInt(_0x7d1e7f(0x1eb))/0x6)+parseInt(_0x7d1e7f(0x1de))/0x7+-parseInt(_0x7d1e7f(0x1db))/0x8*(-parseInt(_0x7d1e7f(0x1e4))/0x9)+-parseInt(_0x7d1e7f(0x1e5))/0xa*(-parseInt(_0x7d1e7f(0x1e1))/0xb);if(_0x3da781===_0x128a03)break;else _0x4b8afb['push'](_0x4b8afb['shift']());}catch(_0x4aed90){_0x4b8afb['push'](_0x4b8afb['shift']());}}}(a41_0x3ba5,0x81c9a));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x2784a9){const _0x3c27b5=a41_0x4b70,_0x344a0c=_0x2784a9[_0x3c27b5(0x1e3)](_0x3c27b5(0x1e2));if(!_0x344a0c)throw CliErrors[_0x3c27b5(0x1df)](_0x3c27b5(0x1da),_0x3c27b5(0x1e8)+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x3ac8f0=readConfig(),_0xed9b7e=_0x344a0c===_0x3c27b5(0x1e7)?'appcode':_0x344a0c,_0xa628b9=_0x3ac8f0[_0xed9b7e];if(_0xa628b9===undefined)throw CliErrors[_0x3c27b5(0x1df)]('Key\x20not\x20found:\x20'+_0x344a0c);return{'ok':!![],'data':typeof _0xa628b9===_0x3c27b5(0x1dc)?_0xa628b9:{[_0xed9b7e]:_0xa628b9},'message':typeof _0xa628b9===_0x3c27b5(0x1dc)?undefined:String(_0xa628b9)};}function a41_0x4b70(_0x158b76,_0x3b85ae){_0x158b76=_0x158b76-0x1d8;const _0x3ba5b0=a41_0x3ba5();let _0x4b70c3=_0x3ba5b0[_0x158b76];return _0x4b70c3;}export const configGetDefinition={'service':a41_0x284001(0x1d9),'command':'get','description':'Get\x20a\x20config\x20value\x20by\x20key','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a41_0x284001(0x1d8),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x10a6fb,_0x2739bf){const _0x127e7d=a42_0x5d75,_0x179c18=_0x10a6fb();while(!![]){try{const _0x403113=-parseInt(_0x127e7d(0x78))/0x1+-parseInt(_0x127e7d(0x7d))/0x2+-parseInt(_0x127e7d(0x79))/0x3+-parseInt(_0x127e7d(0x7c))/0x4+-parseInt(_0x127e7d(0x7a))/0x5+-parseInt(_0x127e7d(0x7e))/0x6+parseInt(_0x127e7d(0x7b))/0x7;if(_0x403113===_0x2739bf)break;else _0x179c18['push'](_0x179c18['shift']());}catch(_0x29a898){_0x179c18['push'](_0x179c18['shift']());}}}(a42_0x1808,0x85fe4));function a42_0x1808(){const _0x14e16=['29579AKCQry','2302545pARHJh','2435875EjQxdZ','31602242sHgSkO','3787100LkYVwz','1710834lwkRTd','5275854oxFaMf'];a42_0x1808=function(){return _0x14e16;};return a42_0x1808();}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a42_0x5d75(_0x1814fa,_0x4a2888){_0x1814fa=_0x1814fa-0x78;const _0x180859=a42_0x1808();let _0x5d7570=_0x180859[_0x1814fa];return _0x5d7570;}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a43_0x56e7(){const _0x40cdbe=['667299TTpMNI','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','global','config','2882172DZXENL','105234ZsVGZs','6785360GYPByd','1TjRVBa','67282hZuVzv','1642675yfCoyx','List\x20all\x20config\x20values','5096097ujDfqA','bool','154ZyLrYB','list'];a43_0x56e7=function(){return _0x40cdbe;};return a43_0x56e7();}function a43_0x2936(_0x1b39d5,_0x30b75a){_0x1b39d5=_0x1b39d5-0x1bd;const _0x56e721=a43_0x56e7();let _0x2936f7=_0x56e721[_0x1b39d5];return _0x2936f7;}const a43_0x30d804=a43_0x2936;(function(_0x589815,_0x491452){const _0x34d4e6=a43_0x2936,_0x30556b=_0x589815();while(!![]){try{const _0x537321=parseInt(_0x34d4e6(0x1c0))/0x1*(-parseInt(_0x34d4e6(0x1c1))/0x2)+parseInt(_0x34d4e6(0x1c8))/0x3+parseInt(_0x34d4e6(0x1bd))/0x4+parseInt(_0x34d4e6(0x1c2))/0x5+parseInt(_0x34d4e6(0x1be))/0x6*(-parseInt(_0x34d4e6(0x1c6))/0x7)+-parseInt(_0x34d4e6(0x1bf))/0x8+parseInt(_0x34d4e6(0x1c4))/0x9;if(_0x537321===_0x491452)break;else _0x30556b['push'](_0x30556b['shift']());}catch(_0x3ec59e){_0x30556b['push'](_0x30556b['shift']());}}}(a43_0x56e7,0x8b2db));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x13f923){const _0x1baae0=a43_0x2936,_0x3f99e4=_0x13f923[_0x1baae0(0x1c5)](_0x1baae0(0x1ca))?readScopedConfig(_0x1baae0(0x1ca)):readConfig();return{'ok':!![],'data':_0x3f99e4};}export const configListDefinition={'service':a43_0x30d804(0x1cb),'command':a43_0x30d804(0x1c7),'description':a43_0x30d804(0x1c3),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a43_0x30d804(0x1ca),'type':'boolean','description':a43_0x30d804(0x1c9),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a44_0x5c0e(){const _0x150030=['`,\x20`','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','length','Global','Invalid\x20locale\x20value.','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','includes','5349624hivySr','set','\x20appcode\x20set\x20to:\x20','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','2122yUiVgT','str','Top-level\x20key\x20\x22','validation','riskLevel','21345228xHdVcM','bool','locale','config','appcode','\x22\x20is\x20not\x20settable.','\x20set\x20to:\x20','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','\x20app\x20add\x20<name>\x20--appcode\x20','value','app','Settable\x20top-level\x20keys:\x20','write','3349461OJwYra','string','Project','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','Set\x20a\x20config\x20value','key','object','3542256ZYTyYo','769lsqNiE','5290182SQHxhd','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Usage:\x20','boolean','Config\x20value','keys','4JXuvxe','global','3640885urYQAZ'];a44_0x5c0e=function(){return _0x150030;};return a44_0x5c0e();}const a44_0xfcb602=a44_0x53b6;(function(_0x3f98b0,_0x253bfc){const _0x335abc=a44_0x53b6,_0x1bd8bc=_0x3f98b0();while(!![]){try{const _0x352af5=parseInt(_0x335abc(0x16f))/0x1*(-parseInt(_0x335abc(0x155))/0x2)+-parseInt(_0x335abc(0x167))/0x3*(-parseInt(_0x335abc(0x176))/0x4)+-parseInt(_0x335abc(0x148))/0x5+-parseInt(_0x335abc(0x170))/0x6+-parseInt(_0x335abc(0x151))/0x7+parseInt(_0x335abc(0x16e))/0x8+parseInt(_0x335abc(0x15a))/0x9;if(_0x352af5===_0x253bfc)break;else _0x1bd8bc['push'](_0x1bd8bc['shift']());}catch(_0x33e9ab){_0x1bd8bc['push'](_0x1bd8bc['shift']());}}}(a44_0x5c0e,0xb4e52));import{CliErrors}from'../../errors.js';function a44_0x53b6(_0x4e911d,_0x558d5c){_0x4e911d=_0x4e911d-0x148;const _0x5c0e37=a44_0x5c0e();let _0x53b69f=_0x5c0e37[_0x4e911d];return _0x53b69f;}import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x282287){const _0x3384a9=a44_0x53b6,_0x4067af=_0x282287[_0x3384a9(0x156)](_0x3384a9(0x16c)),_0x54c361=_0x282287[_0x3384a9(0x156)](_0x3384a9(0x163));if(!_0x4067af)throw CliErrors['validation']('Missing\x20key.',_0x3384a9(0x172)+CLI_BIN_NAME+_0x3384a9(0x161));if(_0x54c361===undefined||_0x54c361==='')throw CliErrors[_0x3384a9(0x158)]('Missing\x20value.',_0x3384a9(0x172)+CLI_BIN_NAME+_0x3384a9(0x161));if(_0x54c361[_0x3384a9(0x14c)]>0x1f4)throw CliErrors[_0x3384a9(0x158)](_0x3384a9(0x14f));if(!isTopLevelConfigKey(_0x4067af))throw CliErrors[_0x3384a9(0x158)](_0x3384a9(0x157)+_0x4067af+_0x3384a9(0x15f),_0x3384a9(0x165)+getTopLevelConfigKeySummary());if(_0x4067af===_0x3384a9(0x159))throw CliErrors[_0x3384a9(0x158)](_0x3384a9(0x171));if(CONFIG_ENUM_VALUES[_0x4067af]&&!CONFIG_ENUM_VALUES[_0x4067af][_0x3384a9(0x150)](_0x54c361))throw CliErrors[_0x3384a9(0x158)]('Invalid\x20value\x20for\x20\x22'+_0x4067af+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x4067af]['join'](',\x20'));if(_0x4067af===_0x3384a9(0x15c)&&!normalizeLocale(_0x54c361))throw CliErrors[_0x3384a9(0x158)](_0x3384a9(0x14e),_0x3384a9(0x154));const _0x1519b9={'global':_0x282287[_0x3384a9(0x15b)](_0x3384a9(0x177))},_0x569836=resolveWriteScope(_0x1519b9),_0x261c4d=readScopedConfig(_0x569836);let _0x31d9bd=_0x4067af,_0x291a2e=_0x54c361;_0x4067af===_0x3384a9(0x164)&&(_0x31d9bd='appcode',delete _0x261c4d['app']);_0x4067af===_0x3384a9(0x15c)&&(_0x291a2e=normalizeLocale(_0x54c361));if(_0x4067af==='env'){_0x291a2e=normalizeEnv(_0x54c361);if(!isProduction(_0x291a2e)&&!isDaily(_0x291a2e))throw CliErrors[_0x3384a9(0x158)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x3384a9(0x14b));}if(_0x4067af===_0x3384a9(0x15e)){const _0x591a84=_0x261c4d['apps']&&typeof _0x261c4d['apps']===_0x3384a9(0x16d)?Object[_0x3384a9(0x175)](_0x261c4d['apps']):[];if(_0x591a84[_0x3384a9(0x14c)]>0x0)throw CliErrors[_0x3384a9(0x158)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Use\x20`'+CLI_BIN_NAME+_0x3384a9(0x162)+_0x291a2e+_0x3384a9(0x149)+CLI_BIN_NAME+'\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x512de7=buildCanonicalProjectConfig({..._0x261c4d},{'appCodes':[_0x291a2e],'env':typeof _0x261c4d['env']===_0x3384a9(0x168)?_0x261c4d['env']:undefined});writeScopedConfig(_0x512de7,_0x569836);const _0x25a556=_0x569836===_0x3384a9(0x177)?_0x3384a9(0x14d):_0x3384a9(0x169);return{'ok':!![],'message':'✓\x20'+_0x25a556+_0x3384a9(0x153)+_0x291a2e+_0x3384a9(0x16a)};}_0x261c4d[_0x31d9bd]=_0x291a2e,writeScopedConfig(_0x261c4d,_0x569836);const _0x3a9fd0=_0x569836===_0x3384a9(0x177)?_0x3384a9(0x14d):_0x3384a9(0x169);return{'ok':!![],'message':'✓\x20'+_0x3a9fd0+'\x20'+_0x31d9bd+_0x3384a9(0x160)+_0x291a2e};}export const configSetDefinition={'service':a44_0xfcb602(0x15d),'command':a44_0xfcb602(0x152),'description':a44_0xfcb602(0x16b),'risk':a44_0xfcb602(0x166),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a44_0xfcb602(0x16c),'type':a44_0xfcb602(0x168),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a44_0xfcb602(0x163),'type':a44_0xfcb602(0x168),'description':a44_0xfcb602(0x174),'required':!![]},{'name':a44_0xfcb602(0x177),'type':a44_0xfcb602(0x173),'description':a44_0xfcb602(0x14a),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3d1583,_0x491a75){var _0x154fd1=a45_0x4331,_0x2902b6=_0x3d1583();while(!![]){try{var _0x17502e=parseInt(_0x154fd1(0xae))/0x1*(parseInt(_0x154fd1(0xb9))/0x2)+parseInt(_0x154fd1(0xb5))/0x3+-parseInt(_0x154fd1(0xb3))/0x4*(parseInt(_0x154fd1(0xb4))/0x5)+-parseInt(_0x154fd1(0xac))/0x6+-parseInt(_0x154fd1(0xaf))/0x7+parseInt(_0x154fd1(0xb8))/0x8*(parseInt(_0x154fd1(0xb7))/0x9)+-parseInt(_0x154fd1(0xb1))/0xa;if(_0x17502e===_0x491a75)break;else _0x2902b6['push'](_0x2902b6['shift']());}catch(_0x137980){_0x2902b6['push'](_0x2902b6['shift']());}}}(a45_0x32a4,0x1ff02));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};function a45_0x32a4(){var _0x416af7=['9LySANT','919544StyQRr','4BMftDK','validation','1361400XDwmBw','global','85306ewRHSF','117950CJXqyp','project','578280OlFZOn','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','24lYdykM','87110QARHiI','754119ReRbzI','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'];a45_0x32a4=function(){return _0x416af7;};return a45_0x32a4();}export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x1c1460){var _0x765532=a45_0x4331;if(_0x1c1460[_0x765532(0xad)])return'global';if(!isInProject())throw CliErrors[_0x765532(0xba)](_0x765532(0xb2),_0x765532(0xb6)+CLI_BIN_NAME+'\x20init`\x20first.');return _0x765532(0xb0);}function a45_0x4331(_0x5ac560,_0x2a849b){_0x5ac560=_0x5ac560-0xac;var _0x32a422=a45_0x32a4();var _0x4331d7=_0x32a422[_0x5ac560];return _0x4331d7;}export function readScopedConfig(_0x1170e3){return readConfigFile(resolveWriteConfigPath(_0x1170e3));}export function writeScopedConfig(_0x21a5b9,_0x288c85){writeConfigFile(resolveWriteConfigPath(_0x288c85),_0x21a5b9);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a46_0x1759(_0x5e3e11,_0x456788){_0x5e3e11=_0x5e3e11-0x13d;const _0x3c4959=a46_0x3c49();let _0x17599f=_0x3c4959[_0x5e3e11];return _0x17599f;}const a46_0x5a88fa=a46_0x1759;function a46_0x3c49(){const _0x459ae4=['8OxavpF','367228pKIWxa','582735AxWvLV','65919XCxXrG','filter','240659Wrtbnd','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','5010906pIwQpK','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','3247030SGKDin','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','21059334waRXsf','\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]','join','\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}]','304ikEMlL','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)'];a46_0x3c49=function(){return _0x459ae4;};return a46_0x3c49();}(function(_0x495a42,_0x3fc476){const _0x15c332=a46_0x1759,_0x3efee8=_0x495a42();while(!![]){try{const _0x4ac70a=parseInt(_0x15c332(0x14d))/0x1*(-parseInt(_0x15c332(0x148))/0x2)+parseInt(_0x15c332(0x14a))/0x3+parseInt(_0x15c332(0x149))/0x4+-parseInt(_0x15c332(0x140))/0x5+-parseInt(_0x15c332(0x13e))/0x6+parseInt(_0x15c332(0x14b))/0x7*(parseInt(_0x15c332(0x146))/0x8)+parseInt(_0x15c332(0x142))/0x9;if(_0x4ac70a===_0x3fc476)break;else _0x3efee8['push'](_0x3efee8['shift']());}catch(_0x3b1627){_0x3efee8['push'](_0x3efee8['shift']());}}}(a46_0x3c49,0x83037));import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':'filter','operation':a46_0x5a88fa(0x14c),'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsRequired':![],'paramsHint':a46_0x5a88fa(0x141),'helpExtra':[a46_0x5a88fa(0x13f),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions',a46_0x5a88fa(0x143),a46_0x5a88fa(0x145),a46_0x5a88fa(0x147),a46_0x5a88fa(0x13d)][a46_0x5a88fa(0x144)]('\x0a')});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a47_0x518a24=a47_0x4410;(function(_0x590322,_0x11e625){const _0x38ab32=a47_0x4410,_0x295a81=_0x590322();while(!![]){try{const _0x36c4e3=-parseInt(_0x38ab32(0x193))/0x1*(-parseInt(_0x38ab32(0x192))/0x2)+parseInt(_0x38ab32(0x198))/0x3*(parseInt(_0x38ab32(0x196))/0x4)+-parseInt(_0x38ab32(0x18e))/0x5+parseInt(_0x38ab32(0x18d))/0x6+parseInt(_0x38ab32(0x195))/0x7+parseInt(_0x38ab32(0x197))/0x8*(-parseInt(_0x38ab32(0x194))/0x9)+-parseInt(_0x38ab32(0x190))/0xa*(-parseInt(_0x38ab32(0x18c))/0xb);if(_0x36c4e3===_0x11e625)break;else _0x295a81['push'](_0x295a81['shift']());}catch(_0x1b485c){_0x295a81['push'](_0x295a81['shift']());}}}(a47_0x55a4,0x9fff4));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a47_0x518a24(0x18f),'operation':a47_0x518a24(0x18f),'description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsRequired':!![],'paramsHint':a47_0x518a24(0x191)});function a47_0x4410(_0x166734,_0x4fa72b){_0x166734=_0x166734-0x18c;const _0x55a43a=a47_0x55a4();let _0x44109b=_0x55a43a[_0x166734];return _0x44109b;}function a47_0x55a4(){const _0x934d08=['1368CFuWfm','6qymUqs','11Meaqob','5606658QjjLHY','4108790dNaweu','getOne','2183390BEFwCD','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','178WMtAGt','1283nPUtHJ','17505YuviIP','3728186OPiuJz','20268tjvNaw'];a47_0x55a4=function(){return _0x934d08;};return a47_0x55a4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x470ee7,_0x484019){const _0x5bb7ab=a48_0x476e,_0x3a7db8=_0x470ee7();while(!![]){try{const _0x27d0d6=parseInt(_0x5bb7ab(0xe7))/0x1+-parseInt(_0x5bb7ab(0xe8))/0x2+-parseInt(_0x5bb7ab(0xe3))/0x3+-parseInt(_0x5bb7ab(0xe9))/0x4+-parseInt(_0x5bb7ab(0xe1))/0x5*(-parseInt(_0x5bb7ab(0xe5))/0x6)+-parseInt(_0x5bb7ab(0xe2))/0x7*(parseInt(_0x5bb7ab(0xea))/0x8)+parseInt(_0x5bb7ab(0xe4))/0x9*(parseInt(_0x5bb7ab(0xe6))/0xa);if(_0x27d0d6===_0x484019)break;else _0x3a7db8['push'](_0x3a7db8['shift']());}catch(_0x2b2fda){_0x3a7db8['push'](_0x3a7db8['shift']());}}}(a48_0x2824,0x5a555));import{dataFilter}from'../../commands/data/filter.js';function a48_0x476e(_0x1eae0b,_0x550183){_0x1eae0b=_0x1eae0b-0xe1;const _0x2824a8=a48_0x2824();let _0x476e25=_0x2824a8[_0x1eae0b];return _0x476e25;}import{dataGetOne}from'../../commands/data/getOne.js';function a48_0x2824(){const _0x50c465=['14plDaTb','1855263KwZlxh','60678VIyUuE','1020414SrxhaG','3170xbKsEY','113996QBqJaE','1279354PUpRvw','2294432FQkLLA','878272DgwLne','5cmUoFg'];a48_0x2824=function(){return _0x50c465;};return a48_0x2824();}export const dataDefinitions=[dataFilter,dataGetOne];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x13eb37,_0x10670a){const _0x3b3026=a49_0x5933,_0x527a0e=_0x13eb37();while(!![]){try{const _0xaafcff=-parseInt(_0x3b3026(0x16b))/0x1+-parseInt(_0x3b3026(0x167))/0x2+-parseInt(_0x3b3026(0x161))/0x3*(parseInt(_0x3b3026(0x15b))/0x4)+-parseInt(_0x3b3026(0x173))/0x5*(-parseInt(_0x3b3026(0x162))/0x6)+parseInt(_0x3b3026(0x16e))/0x7*(parseInt(_0x3b3026(0x15d))/0x8)+-parseInt(_0x3b3026(0x158))/0x9+parseInt(_0x3b3026(0x172))/0xa;if(_0xaafcff===_0x10670a)break;else _0x527a0e['push'](_0x527a0e['shift']());}catch(_0x1244f0){_0x527a0e['push'](_0x527a0e['shift']());}}}(a49_0x5add,0xd58ae));import{executeDatasetDataOperation}from'../../core/api-client.js';function a49_0x5add(){const _0x5dd7b8=['data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','1445811myxKUz','str','paramsHint','7LXYoAk','helpExtra','string','now','28175740TBEIrA','3280qnYNxB','data','flagMissing','5088186nPSQnK','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','command','266492kMooYj','read','5753112eyOPoI','alias','\x20completed\x20in\x20','getOne','3SSIQEZ','9012LzTWUk','compress','appCode','operation','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','3139134bAKeQl','params'];a49_0x5add=function(){return _0x5dd7b8;};return a49_0x5add();}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a49_0x5933(_0x5838ae,_0x39570f){_0x5838ae=_0x5838ae-0x156;const _0x5addab=a49_0x5add();let _0x5933fc=_0x5addab[_0x5838ae];return _0x5933fc;}import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x4084d1){const _0x24fbce=a49_0x5933;if(!_0x4084d1)throw CliErrors['flagMissing'](_0x24fbce(0x168),_0x24fbce(0x166));const _0x1dac19=_0x4084d1['id'];if(_0x1dac19===undefined||_0x1dac19===null||_0x1dac19==='')throw CliErrors['validation'](_0x24fbce(0x169),_0x24fbce(0x16a));}function parseCommandParams(_0x5a547d){return parseJsonParams(_0x5a547d)??{};}export function buildDataCommand(_0x3fc2c2){const _0x37cc17=a49_0x5933,_0x32afc0=_0x37cc17(0x159);return{'service':_0x37cc17(0x156),'command':_0x3fc2c2[_0x37cc17(0x15a)],'description':_0x3fc2c2['description'],'risk':_0x37cc17(0x15c),'defaultOutputFormat':_0x37cc17(0x163),'helpExtra':_0x3fc2c2[_0x37cc17(0x16f)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x37cc17(0x15e),'type':_0x37cc17(0x170),'description':_0x32afc0},{'name':_0x37cc17(0x168),'type':_0x37cc17(0x170),'description':_0x3fc2c2[_0x37cc17(0x16d)]}],async 'validate'(_0x3ad5eb){const _0x24d353=_0x37cc17,_0x585ae9=_0x3ad5eb['str'](_0x24d353(0x168));if(_0x3fc2c2['paramsRequired']&&!_0x585ae9)throw CliErrors[_0x24d353(0x157)](_0x24d353(0x168),_0x3fc2c2[_0x24d353(0x16d)]);const _0x50032e=parseJsonParams(_0x585ae9);_0x3fc2c2[_0x24d353(0x165)]===_0x24d353(0x160)&&assertGetOneId(_0x50032e);},async 'execute'(_0x14501a){const _0x4071f0=_0x37cc17,_0x46e58d=parseCommandParams(_0x14501a[_0x4071f0(0x16c)](_0x4071f0(0x168))),_0x4da42f=Date[_0x4071f0(0x171)](),_0x438885=await executeDatasetDataOperation(_0x14501a[_0x4071f0(0x164)],_0x14501a[_0x4071f0(0x16c)]('code'),_0x3fc2c2[_0x4071f0(0x165)],_0x46e58d),_0x78662=Date[_0x4071f0(0x171)]()-_0x4da42f;return{'ok':!![],'data':{'result':_0x438885,'elapsed':_0x78662},'message':'data\x20'+_0x3fc2c2[_0x4071f0(0x15a)]+_0x4071f0(0x15f)+_0x78662+'ms'};}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x154621=a50_0x2e64;function a50_0x4349(){const _0x1aa9f9=['lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','unknown','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','17687OMpmdT','2544861ZrggCe','datasetCode','\x20类型,不适合作为\x20','\x20的数据源。','join','sourceType','lovrabet','length','4gtOvTv','trim','请先将该数据集升级/迁移为\x20DB\x20table\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','4994367hggAoY','toUpperCase','dbtableConfig','当前数据集\x20\x22','BFF\x20/\x20SQL\x20等研发态资产','3601962LNcuqN','getOne','dataset','1508788nwSWSA','object','\x20是\x20','5142625rygQGw','datasetName','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','source','6183096cbWCeL','dbId','filter','UNKNOWN'];a50_0x4349=function(){return _0x1aa9f9;};return a50_0x4349();}function a50_0x2e64(_0xed548d,_0x18a4dd){_0xed548d=_0xed548d-0x83;const _0x4349a2=a50_0x4349();let _0x2e64e8=_0x4349a2[_0xed548d];return _0x2e64e8;}(function(_0x3550f5,_0x509d45){const _0xa7c893=a50_0x2e64,_0x4165b4=_0x3550f5();while(!![]){try{const _0x48a445=-parseInt(_0xa7c893(0x8b))/0x1*(parseInt(_0xa7c893(0x94))/0x2)+parseInt(_0xa7c893(0x8c))/0x3+-parseInt(_0xa7c893(0xa0))/0x4+parseInt(_0xa7c893(0xa3))/0x5+parseInt(_0xa7c893(0x9d))/0x6+-parseInt(_0xa7c893(0x98))/0x7+-parseInt(_0xa7c893(0x84))/0x8;if(_0x48a445===_0x509d45)break;else _0x4165b4['push'](_0x4165b4['shift']());}catch(_0x35a9e8){_0x4165b4['push'](_0x4165b4['shift']());}}}(a50_0x4349,0x8d298));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a50_0x154621(0x92),'filter':a50_0x154621(0x88),'getOne':a50_0x154621(0x8a)};export const RUNTIME_DATA_ACCESS_SUMMARY=a50_0x154621(0x97);function valueToString(_0x3770d0){const _0x165361=a50_0x154621;return _0x3770d0==null?'':String(_0x3770d0)[_0x165361(0x95)]();}function getDatasetCode(_0x5cf3d4){const _0x39c1ff=a50_0x154621;return valueToString(_0x5cf3d4['code']??_0x5cf3d4['modelCode']??_0x5cf3d4[_0x39c1ff(0x9f)]?.[_0x39c1ff(0x8d)]);}function getDatasetName(_0xcb1e9){const _0x23b605=a50_0x154621;return valueToString(_0xcb1e9['name']??_0xcb1e9[_0x23b605(0x9f)]?.[_0x23b605(0xa4)])||_0x23b605(0x89);}function getDatasetSource(_0x1c9101){const _0x23d83e=a50_0x154621;return valueToString(_0x1c9101[_0x23d83e(0x83)]??_0x1c9101['dataset']?.[_0x23d83e(0x91)])[_0x23d83e(0x99)]();}function getDbtableConfig(_0x44df44){const _0xcc4fd6=a50_0x154621,_0x320a28=_0x44df44[_0xcc4fd6(0x9a)]??_0x44df44['dbtable'];return _0x320a28&&typeof _0x320a28===_0xcc4fd6(0xa1)?_0x320a28:{};}export function isDbBackedDataset(_0x3e2062){const _0x186056=a50_0x154621,_0x39c709=getDatasetSource(_0x3e2062);if(_0x39c709==='METADATA')return![];const _0x5aaa35=getDbtableConfig(_0x3e2062),_0x3514c5=_0x5aaa35[_0x186056(0x85)]??_0x5aaa35['id'],_0x150206=valueToString(_0x5aaa35['tableName']??_0x3e2062['tableName']??_0x3e2062[_0x186056(0x9f)]?.['tableName']);return _0x3514c5!==undefined&&_0x3514c5!==null&&_0x150206[_0x186056(0x93)]>0x0;}export function filterDbBackedDatasets(_0x14a41c){const _0x5c1fc2=a50_0x154621;return _0x14a41c[_0x5c1fc2(0x86)](_0x5999d4=>isDbBackedDataset(_0x5999d4));}export function buildDbTableUpgradeMessage(_0x46c2c5,_0x182886=a50_0x154621(0x9c)){const _0x2b9ab1=a50_0x154621,_0x28ffec=getDatasetSource(_0x46c2c5)||_0x2b9ab1(0x87),_0x3c934b=getDatasetName(_0x46c2c5),_0x126db7=getDatasetCode(_0x46c2c5),_0x5e8bfe=_0x126db7?'\x20('+_0x126db7+')':'';return[_0x2b9ab1(0x9b)+_0x3c934b+'\x22'+_0x5e8bfe+_0x2b9ab1(0xa2)+_0x28ffec+_0x2b9ab1(0x8e)+_0x182886+_0x2b9ab1(0x8f),'原因:该类研发态资产需要\x20DB\x20table、dbId、tableName\x20与数据库连接上下文,并深度依赖\x20SQL\x20执行链路。',_0x2b9ab1(0x96),_0x2b9ab1(0xa5)+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x2b9ab1(0x9e)]+'。'][_0x2b9ab1(0x90)]('\x20');}export function assertDatasetSupportsLocalDevelopment(_0x14c5b8,_0x45e815){if(!isDbBackedDataset(_0x14c5b8))throw CliErrors['validation'](buildDbTableUpgradeMessage(_0x14c5b8,_0x45e815));}
|