@lovrabet/rabetbase-cli 2.1.11 → 2.1.12-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/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -1
- package/lib/commands/dataset/link-delete.js +1 -1
- package/lib/commands/dataset/link-shared.js +1 -1
- package/lib/commands/dataset/link-update.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/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/report.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x35d6b7=a33_0x2a7a;(function(_0x52a3b4,_0x321ae8){const _0x302727=a33_0x2a7a,_0x439a0e=_0x52a3b4();while(!![]){try{const _0x2ca605=parseInt(_0x302727(0x1b6))/0x1+parseInt(_0x302727(0x1c6))/0x2+-parseInt(_0x302727(0x1c1))/0x3*(-parseInt(_0x302727(0x1c8))/0x4)+-parseInt(_0x302727(0x1c2))/0x5*(-parseInt(_0x302727(0x1b9))/0x6)+-parseInt(_0x302727(0x1bf))/0x7+-parseInt(_0x302727(0x1c9))/0x8*(parseInt(_0x302727(0x1c7))/0x9)+parseInt(_0x302727(0x1b3))/0xa*(-parseInt(_0x302727(0x1c3))/0xb);if(_0x2ca605===_0x321ae8)break;else _0x439a0e['push'](_0x439a0e['shift']());}catch(_0x46d30e){_0x439a0e['push'](_0x439a0e['shift']());}}}(a33_0x1020,0x7e6c3));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a33_0x2a7a(_0x1d8304,_0x4379ed){_0x1d8304=_0x1d8304-0x1a9;const _0x10204a=a33_0x1020();let _0x2a7a5b=_0x10204a[_0x1d8304];return _0x2a7a5b;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a33_0x35d6b7(0x1bc),'command':a33_0x35d6b7(0x1b7),'description':a33_0x35d6b7(0x1b0),'risk':a33_0x35d6b7(0x1ad),'flags':[{'name':a33_0x35d6b7(0x1a9),'type':'boolean','description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x37c382){const _0x12b54c=a33_0x35d6b7,_0x1f1253=loadBffProjectConfig(_0x37c382['appCode']),_0x264805=await readBffLockFile(_0x1f1253[_0x12b54c(0x1b2)]),{appLock:_0x18eeaa}=ensureLockScope(_0x264805??createEmptyBffLock(),_0x37c382['appCode'],_0x1f1253[_0x12b54c(0x1ae)],_0x12b54c(0x1b7)),_0x29fbfd=await scanLocalBffFunctions(_0x1f1253),_0x526c9e=[],_0x48ff3c=[],_0x4e3c5b=[];for(const _0x809ec3 of _0x29fbfd){const _0x1bc604=await computeFileHash(_0x809ec3['filePath']),_0x357d46=_0x18eeaa[_0x12b54c(0x1c0)][_0x809ec3[_0x12b54c(0x1c4)]];if(!_0x357d46)_0x526c9e[_0x12b54c(0x1be)](_0x809ec3[_0x12b54c(0x1c4)]);else _0x357d46[_0x12b54c(0x1b8)]!==_0x1bc604?_0x48ff3c['push'](_0x809ec3[_0x12b54c(0x1c4)]):_0x4e3c5b[_0x12b54c(0x1be)](_0x809ec3[_0x12b54c(0x1c4)]);}const _0x5571e9=[];if(_0x37c382['bool']('remote')){const _0x10befc=loadAliasMap(_0x37c382[_0x12b54c(0x1aa)],undefined,resolveApiFilePath(_0x37c382[_0x12b54c(0x1aa)],_0x37c382[_0x12b54c(0x1c5)])),_0x27313f=new Map(_0x10befc[_0x12b54c(0x1bb)](_0x307ca0=>[_0x307ca0[_0x12b54c(0x1ac)],_0x307ca0[_0x12b54c(0x1ab)]])),[_0x300e8d,_0x281751]=await Promise['all']([listBffScripts(_0x37c382[_0x12b54c(0x1c5)]),getBffScriptStatistics(_0x37c382[_0x12b54c(0x1c5)])]),_0x4072ed=createHookLocationMap(_0x281751),_0x4334b1=new Set(_0x29fbfd['map'](_0x186bda=>_0x186bda['lockKey']));for(const _0x236e92 of _0x300e8d){const _0x59a5b2=resolveRemoteScriptTarget(_0x1f1253,_0x236e92,_0x4072ed,_0x18eeaa['functions'],_0x27313f);_0x59a5b2&&!_0x4334b1['has'](_0x59a5b2['lockKey'])&&_0x5571e9[_0x12b54c(0x1be)](_0x59a5b2['lockKey']);}}const _0x1aba2c=_0x526c9e[_0x12b54c(0x1b1)]===0x0&&_0x48ff3c[_0x12b54c(0x1b1)]===0x0&&_0x5571e9[_0x12b54c(0x1b1)]===0x0;return{'ok':!![],'data':{'added':_0x526c9e,'modified':_0x48ff3c,'unchanged':_0x4e3c5b,'remoteOnly':_0x5571e9},'message':_0x1aba2c?_0x12b54c(0x1ba):_0x526c9e['length']+_0x12b54c(0x1b5)+_0x48ff3c[_0x12b54c(0x1b1)]+_0x12b54c(0x1b4)+_0x4e3c5b[_0x12b54c(0x1b1)]+_0x12b54c(0x1af)+(_0x5571e9['length']>0x0?',\x20'+_0x5571e9[_0x12b54c(0x1b1)]+_0x12b54c(0x1bd):'')};}};function a33_0x1020(){const _0x2ee40a=['590664RooSao','5TdrDPl','5165666CMftoJ','lockKey','appCode','1628234NxzcYm','90WEhnwo','4kVUDDZ','273288OaNauA','remote','apiDir','alias','datasetCode','read','scriptsRoot','\x20unchanged','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','length','lockFilePath','20KmmOKc','\x20modified,\x20','\x20added,\x20','620835DOAfvY','status','hash','1523550fSpneg','All\x20BFF\x20scripts\x20are\x20in\x20sync.','map','bff','\x20remote-only','push','609812NUAjvr','functions'];a33_0x1020=function(){return _0x2ee40a;};return a33_0x1020();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a34_0x558167=a34_0x236e;(function(_0x4fcc79,_0x5ccc27){const _0x5c651b=a34_0x236e,_0x5e65f0=_0x4fcc79();while(!![]){try{const _0x4c82fb=-parseInt(_0x5c651b(0x183))/0x1+parseInt(_0x5c651b(0x186))/0x2*(parseInt(_0x5c651b(0x1a2))/0x3)+-parseInt(_0x5c651b(0x19a))/0x4*(parseInt(_0x5c651b(0x19d))/0x5)+-parseInt(_0x5c651b(0x18e))/0x6+parseInt(_0x5c651b(0x1a6))/0x7+-parseInt(_0x5c651b(0x1a8))/0x8*(parseInt(_0x5c651b(0x176))/0x9)+parseInt(_0x5c651b(0x196))/0xa;if(_0x4c82fb===_0x5ccc27)break;else _0x5e65f0['push'](_0x5e65f0['shift']());}catch(_0x3316c6){_0x5e65f0['push'](_0x5e65f0['shift']());}}}(a34_0xf1a4,0x757ee));import a34_0x5dea85 from'chalk';import a34_0x1a2bad from'ora';import a34_0x15fdd8 from'semver';import{execa}from'execa';import{NPM_PACKAGE_NAME}from'../constant/cli.js';function a34_0xf1a4(){const _0x57d1a1=['Already\x20on\x20requested\x20version\x20(v','beta','fail','Current\x20version:\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','version','\x20→\x20','12877750rhunLh','https://registry.npmjs.org/-/package/','@latest','json','4TauFEh','nonInteractive','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','3339425vmpSsS','Requested\x20version:\x20','execPath','valid','source','6LfyJPx','gray','string','succeed','3560438DnkZmY','unknown','68336jVXWiz','pipe','fromEntries','\x20install\x20-g\x20','Checking\x20official\x20skill\x20package...','bun','warn','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','bool','/dist-tags','object','log','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','boolean','trim','\x20\x20Official\x20skill\x20update\x20failed:\x20','red','timeout','Update\x20available:\x20','latest','validation','Refresh\x20official\x20skill\x20package\x20after\x20updating','includes','Skipping\x20official\x20skill\x20package\x20(--no-skills).','yellow','length','\x20\x20Run\x20manually:\x20','stableVersion','run','Beta\x20version:\x20','Version\x20comparison\x20failed','error','9PSJDPo','toLowerCase','inherit','Invalid\x20version:\x20','skipped','cli','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','install','npm','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','message','\x20\x20Try\x20manually:\x20','entries','613872BJxPEL','Already\x20up\x20to\x20date\x20(v','filter','264266kAGPTQ','...','map','skills','green','no-skills','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','update','1734684gRUBVg'];a34_0xf1a4=function(){return _0x57d1a1;};return a34_0xf1a4();}import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{getCdnConfig}from'../utils/cdn-config.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x2c997a=a34_0x236e;return GIT_COMMIT!==_0x2c997a(0x1a7)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x4c14e9=a34_0x236e,_0x1095c6=process[_0x4c14e9(0x19f)][_0x4c14e9(0x177)]();if(_0x1095c6[_0x4c14e9(0x16c)](_0x4c14e9(0x1ad)))return _0x4c14e9(0x1ad);return _0x4c14e9(0x17e);}const updateFlags=[{'name':a34_0x558167(0x190),'type':a34_0x558167(0x1b5),'description':a34_0x558167(0x193),'default':![]},{'name':a34_0x558167(0x194),'type':a34_0x558167(0x1a4),'description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':a34_0x558167(0x18b),'type':a34_0x558167(0x1b5),'description':a34_0x558167(0x17c),'default':![]},{'name':a34_0x558167(0x189),'type':'boolean','description':a34_0x558167(0x16b),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x2ef10e){const _0x578099=a34_0x558167;return _0x2ef10e['str'](_0x578099(0x194))[_0x578099(0x164)]();}function a34_0x236e(_0x2c950c,_0x4bbb1b){_0x2c950c=_0x2c950c-0x164;const _0xf1a410=a34_0xf1a4();let _0x236e72=_0xf1a410[_0x2c950c];return _0x236e72;}function shouldSkipOfficialSkill(_0x3dea04){const _0x53054b=a34_0x558167;return _0x3dea04[_0x53054b(0x1b0)](_0x53054b(0x18b))||_0x3dea04['flag'](_0x53054b(0x189))===![];}async function validateUpdateFlags(_0x328d52){const _0x5e346b=a34_0x558167,_0x59cb21=_0x328d52['bool']('beta'),_0x2b2d5e=getRequestedVersion(_0x328d52);if(_0x59cb21&&_0x2b2d5e)throw CliErrors[_0x5e346b(0x16a)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x2b2d5e&&!a34_0x15fdd8['valid'](_0x2b2d5e))throw CliErrors[_0x5e346b(0x16a)](_0x5e346b(0x179)+_0x2b2d5e,_0x5e346b(0x19c));}async function fetchNpmDistTags(){const _0xb22e5f=a34_0x558167;try{const _0x3d2483=await fetch(_0xb22e5f(0x197)+encodeURIComponent(NPM_PACKAGE_NAME)+_0xb22e5f(0x1b1),{'signal':AbortSignal[_0xb22e5f(0x167)](0x2710)});if(!_0x3d2483['ok'])return null;const _0x30503a=await _0x3d2483[_0xb22e5f(0x199)]();if(!_0x30503a||typeof _0x30503a!==_0xb22e5f(0x1b2))return null;return Object[_0xb22e5f(0x1aa)](Object[_0xb22e5f(0x182)](_0x30503a)[_0xb22e5f(0x185)](([,_0x1b9d8c])=>typeof _0x1b9d8c===_0xb22e5f(0x1a4)&&_0x1b9d8c[_0xb22e5f(0x164)]()[_0xb22e5f(0x16f)]>0x0)[_0xb22e5f(0x188)](([_0x42fe21,_0x16a6ec])=>[_0x42fe21,String(_0x16a6ec)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x33431b){const _0xa55407=await fetchNpmDistTags();return _0xa55407?.[_0x33431b]??null;}async function fetchLatestVersion(){const _0x391062=a34_0x558167,_0x208646=await fetchNpmDistTagVersion('latest');if(_0x208646)return _0x208646;const _0x163d67=await getCdnConfig();return _0x163d67?.[_0x391062(0x17b)]?.[_0x391062(0x171)]??null;}async function resolveTargetVersion(_0x1249dd){const _0x5a85c1=a34_0x558167,_0x3b181c=getRequestedVersion(_0x1249dd);if(_0x3b181c)return{'version':_0x3b181c,'source':_0x5a85c1(0x194)};if(_0x1249dd[_0x5a85c1(0x1b0)](_0x5a85c1(0x190))){const _0x4a54fe=await fetchNpmDistTagVersion(_0x5a85c1(0x190));if(!_0x4a54fe)return null;return{'version':_0x4a54fe,'source':_0x5a85c1(0x190)};}const _0x125323=await fetchLatestVersion();if(!_0x125323)return null;return{'version':_0x125323,'source':_0x5a85c1(0x169)};}function shouldInstallTarget(_0x367831,_0x29acfe){const _0x4edb8f=a34_0x558167;if(_0x29acfe[_0x4edb8f(0x1a1)]==='version'||_0x29acfe[_0x4edb8f(0x1a1)]==='beta')return!a34_0x15fdd8['eq'](_0x367831,_0x29acfe[_0x4edb8f(0x194)]);return a34_0x15fdd8['lt'](_0x367831,_0x29acfe['version']);}function getInstallPlanLabel(_0xa073e9,_0x2268bd){const _0x24c62c=a34_0x558167;switch(_0x2268bd['source']){case'beta':return _0x24c62c(0x173)+a34_0x5dea85[_0x24c62c(0x16e)](_0xa073e9)+_0x24c62c(0x195)+a34_0x5dea85[_0x24c62c(0x18a)](_0x2268bd[_0x24c62c(0x194)]);case'version':return _0x24c62c(0x19e)+a34_0x5dea85[_0x24c62c(0x16e)](_0xa073e9)+'\x20→\x20'+a34_0x5dea85['green'](_0x2268bd['version']);case _0x24c62c(0x169):default:return _0x24c62c(0x168)+a34_0x5dea85[_0x24c62c(0x16e)](_0xa073e9)+_0x24c62c(0x195)+a34_0x5dea85[_0x24c62c(0x18a)](_0x2268bd[_0x24c62c(0x194)]);}}async function installOfficialSkill(_0x4bcbf0){const _0x464f3c=a34_0x558167;console[_0x464f3c(0x1b3)](a34_0x5dea85['gray'](_0x464f3c(0x1ac)));const _0x104a8f=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x4bcbf0?'pipe':_0x464f3c(0x178)});if(_0x104a8f[_0x464f3c(0x17a)]){console['log'](a34_0x5dea85[_0x464f3c(0x1a3)]('\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x104a8f['ok']){console[_0x464f3c(0x1b3)](a34_0x5dea85[_0x464f3c(0x1a3)](_0x464f3c(0x1b4)));return;}console[_0x464f3c(0x1ae)](a34_0x5dea85[_0x464f3c(0x16e)](_0x464f3c(0x165)+(_0x104a8f['error']||_0x464f3c(0x1a7)))),console[_0x464f3c(0x1b3)](a34_0x5dea85[_0x464f3c(0x1a3)](_0x464f3c(0x170)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x5b1118){const _0x4b52fc=a34_0x558167;await validateUpdateFlags(_0x5b1118);const _0xa5089c=getCurrentVersion();console[_0x4b52fc(0x1b3)](_0x4b52fc(0x192)+_0xa5089c);const _0x22dd32=a34_0x1a2bad('Checking\x20for\x20updates...')['start'](),_0x257935=await resolveTargetVersion(_0x5b1118);if(!_0x257935){const _0x52796b=_0x5b1118[_0x4b52fc(0x1b0)](_0x4b52fc(0x190))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x4b52fc(0x1af);return _0x22dd32[_0x4b52fc(0x191)](_0x52796b),console[_0x4b52fc(0x1b3)](a34_0x5dea85[_0x4b52fc(0x1a3)](_0x4b52fc(0x17f)+NPM_PACKAGE_NAME+_0x4b52fc(0x198))),{'ok':![],'message':_0x52796b};}const _0x40c7e9=a34_0x15fdd8[_0x4b52fc(0x1a0)](VERSION),_0x31d053=a34_0x15fdd8[_0x4b52fc(0x1a0)](_0x257935[_0x4b52fc(0x194)]);if(!_0x40c7e9||!_0x31d053)return _0x22dd32[_0x4b52fc(0x191)](_0x4b52fc(0x174)),{'ok':![],'message':_0x4b52fc(0x174)};if(!shouldInstallTarget(_0x40c7e9,_0x257935)){const _0xf9d1f=_0x257935[_0x4b52fc(0x1a1)]===_0x4b52fc(0x194)?_0x4b52fc(0x18f)+_0x257935[_0x4b52fc(0x194)]+')':_0x4b52fc(0x184)+_0x257935[_0x4b52fc(0x194)]+')';return _0x22dd32[_0x4b52fc(0x1a5)](_0xf9d1f),shouldSkipOfficialSkill(_0x5b1118)?console[_0x4b52fc(0x1b3)](a34_0x5dea85[_0x4b52fc(0x1a3)](_0x4b52fc(0x16d))):await installOfficialSkill(_0x5b1118['nonInteractive']),{'ok':!![]};}_0x22dd32['info'](getInstallPlanLabel(_0xa5089c,_0x257935));const _0x5ee215=detectPackageManager(),_0x3474a4=_0x5ee215===_0x4b52fc(0x17e)?resolveNpmBin(_0x4b52fc(0x17e)):_0x5ee215,_0x4f3e6c=a34_0x1a2bad('Updating\x20via\x20'+_0x5ee215+_0x4b52fc(0x187))['start']();try{return await execa(_0x3474a4,[_0x4b52fc(0x17d),'-g',NPM_PACKAGE_NAME+'@'+_0x257935['version']],{'stdio':_0x4b52fc(0x1a9)}),_0x4f3e6c[_0x4b52fc(0x1a5)]('Updated\x20to\x20v'+_0x257935[_0x4b52fc(0x194)]),console[_0x4b52fc(0x1b3)](a34_0x5dea85['gray'](_0x4b52fc(0x18c))),shouldSkipOfficialSkill(_0x5b1118)?console[_0x4b52fc(0x1b3)](a34_0x5dea85[_0x4b52fc(0x1a3)](_0x4b52fc(0x16d))):await installOfficialSkill(_0x5b1118[_0x4b52fc(0x19b)]),{'ok':!![]};}catch(_0x16257b){return _0x4f3e6c[_0x4b52fc(0x191)]('Update\x20failed'),console[_0x4b52fc(0x175)](a34_0x5dea85[_0x4b52fc(0x166)]('\x20\x20'+_0x16257b[_0x4b52fc(0x180)])),console['log'](a34_0x5dea85['gray'](_0x4b52fc(0x181)+_0x5ee215+_0x4b52fc(0x1ab)+NPM_PACKAGE_NAME+'@'+_0x257935[_0x4b52fc(0x194)])),{'ok':![],'message':_0x16257b['message']};}}export const updateDefinition={'service':a34_0x558167(0x18d),'command':a34_0x558167(0x172),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a34_0x46dcfb=a34_0x415d;(function(_0x478037,_0x178766){const _0x110823=a34_0x415d,_0x2a8eac=_0x478037();while(!![]){try{const _0x1ac7b8=parseInt(_0x110823(0x19a))/0x1*(parseInt(_0x110823(0x1a8))/0x2)+parseInt(_0x110823(0x1a9))/0x3+parseInt(_0x110823(0x1bb))/0x4*(-parseInt(_0x110823(0x19f))/0x5)+parseInt(_0x110823(0x1af))/0x6+parseInt(_0x110823(0x1ce))/0x7*(-parseInt(_0x110823(0x1db))/0x8)+-parseInt(_0x110823(0x1ae))/0x9*(-parseInt(_0x110823(0x19e))/0xa)+-parseInt(_0x110823(0x1d4))/0xb;if(_0x1ac7b8===_0x178766)break;else _0x2a8eac['push'](_0x2a8eac['shift']());}catch(_0x18b73a){_0x2a8eac['push'](_0x2a8eac['shift']());}}}(a34_0x1cc9,0xb23ce));import a34_0x564004 from'chalk';import a34_0x4355c5 from'ora';import a34_0xc966c2 from'semver';import{execa}from'execa';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{getCdnConfig}from'../utils/cdn-config.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x5aa8d8=a34_0x415d;return GIT_COMMIT!==_0x5aa8d8(0x1d5)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x5aa8d8(0x1dd)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x96da7b=a34_0x415d,_0x17dc73=process[_0x96da7b(0x1dc)][_0x96da7b(0x1bd)]();if(_0x17dc73['includes'](_0x96da7b(0x1c9)))return _0x96da7b(0x1c9);return _0x96da7b(0x1a4);}const updateFlags=[{'name':a34_0x46dcfb(0x1a1),'type':a34_0x46dcfb(0x197),'description':a34_0x46dcfb(0x1ac),'default':![]},{'name':'version','type':a34_0x46dcfb(0x1e0),'description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':a34_0x46dcfb(0x1b4),'type':a34_0x46dcfb(0x197),'description':a34_0x46dcfb(0x1ca),'default':![]},{'name':a34_0x46dcfb(0x1de),'type':a34_0x46dcfb(0x197),'description':a34_0x46dcfb(0x1a3),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x35b209){const _0x266d93=a34_0x46dcfb;return _0x35b209[_0x266d93(0x1b3)](_0x266d93(0x198))[_0x266d93(0x1d6)]();}function shouldSkipOfficialSkill(_0x47beb8){const _0x5e1dad=a34_0x46dcfb;return _0x47beb8[_0x5e1dad(0x1cb)](_0x5e1dad(0x1b4))||_0x47beb8[_0x5e1dad(0x193)](_0x5e1dad(0x1de))===![];}async function validateUpdateFlags(_0x2f1fbc){const _0x165f5b=a34_0x46dcfb,_0x14ed51=_0x2f1fbc['bool']('beta'),_0x44b3c0=getRequestedVersion(_0x2f1fbc);if(_0x14ed51&&_0x44b3c0)throw CliErrors[_0x165f5b(0x1e6)](_0x165f5b(0x1d8),_0x165f5b(0x194));if(_0x44b3c0&&!a34_0xc966c2[_0x165f5b(0x1e7)](_0x44b3c0))throw CliErrors[_0x165f5b(0x1e6)](_0x165f5b(0x1a2)+_0x44b3c0,_0x165f5b(0x1a6));}async function fetchNpmDistTags(){const _0x13b52b=a34_0x46dcfb;try{const _0x52646d=await fetch(_0x13b52b(0x192)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x13b52b(0x1c0),{'signal':AbortSignal[_0x13b52b(0x1ba)](0x2710)});if(!_0x52646d['ok'])return null;const _0x392521=await _0x52646d['json']();if(!_0x392521||typeof _0x392521!==_0x13b52b(0x1d7))return null;return Object[_0x13b52b(0x1b7)](Object[_0x13b52b(0x1be)](_0x392521)['filter'](([,_0x1a7e6d])=>typeof _0x1a7e6d===_0x13b52b(0x1e0)&&_0x1a7e6d[_0x13b52b(0x1d6)]()['length']>0x0)[_0x13b52b(0x19d)](([_0x42d5ae,_0x497ee3])=>[_0x42d5ae,String(_0x497ee3)[_0x13b52b(0x1d6)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x1a680f){const _0x9c8305=await fetchNpmDistTags();return _0x9c8305?.[_0x1a680f]??null;}async function fetchLatestVersion(){const _0x43d2cc=a34_0x46dcfb,_0x294668=await fetchNpmDistTagVersion(_0x43d2cc(0x1c7));if(_0x294668)return _0x294668;const _0x5efdd1=await getCdnConfig();return _0x5efdd1?.[_0x43d2cc(0x1c5)]?.['stableVersion']??null;}async function resolveTargetVersion(_0x379351){const _0x29ae0d=a34_0x46dcfb,_0x1ec5bb=getRequestedVersion(_0x379351);if(_0x1ec5bb)return{'version':_0x1ec5bb,'source':_0x29ae0d(0x198)};if(_0x379351[_0x29ae0d(0x1cb)](_0x29ae0d(0x1a1))){const _0x4b39c5=await fetchNpmDistTagVersion(_0x29ae0d(0x1a1));if(!_0x4b39c5)return null;return{'version':_0x4b39c5,'source':_0x29ae0d(0x1a1)};}const _0x55c785=await fetchLatestVersion();if(!_0x55c785)return null;return{'version':_0x55c785,'source':_0x29ae0d(0x1c7)};}function shouldInstallTarget(_0x379c77,_0x577c02){const _0x2a66e8=a34_0x46dcfb;if(_0x577c02[_0x2a66e8(0x1da)]===_0x2a66e8(0x198)||_0x577c02['source']===_0x2a66e8(0x1a1))return!a34_0xc966c2['eq'](_0x379c77,_0x577c02[_0x2a66e8(0x198)]);return a34_0xc966c2['lt'](_0x379c77,_0x577c02[_0x2a66e8(0x198)]);}function getInstallPlanLabel(_0x3691fe,_0x9ee646){const _0x34a669=a34_0x46dcfb;switch(_0x9ee646[_0x34a669(0x1da)]){case'beta':return'Beta\x20version:\x20'+a34_0x564004['yellow'](_0x3691fe)+'\x20→\x20'+a34_0x564004['green'](_0x9ee646[_0x34a669(0x198)]);case _0x34a669(0x198):return _0x34a669(0x1d3)+a34_0x564004[_0x34a669(0x1e5)](_0x3691fe)+_0x34a669(0x195)+a34_0x564004[_0x34a669(0x199)](_0x9ee646[_0x34a669(0x198)]);case _0x34a669(0x1c7):default:return _0x34a669(0x1bc)+a34_0x564004[_0x34a669(0x1e5)](_0x3691fe)+_0x34a669(0x195)+a34_0x564004[_0x34a669(0x199)](_0x9ee646[_0x34a669(0x198)]);}}function a34_0x415d(_0x541b80,_0x2f4b47){_0x541b80=_0x541b80-0x192;const _0x1cc91f=a34_0x1cc9();let _0x415dfa=_0x1cc91f[_0x541b80];return _0x415dfa;}async function installOfficialSkill(_0x512af0){const _0x16aa65=a34_0x46dcfb;console[_0x16aa65(0x1ad)](a34_0x564004[_0x16aa65(0x1e1)]('Checking\x20official\x20skill\x20package...'));const _0x358eab=runNpxSkillsAddGlobal(process[_0x16aa65(0x1d0)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x512af0?_0x16aa65(0x1df):'inherit'});if(_0x358eab[_0x16aa65(0x1c2)]){console[_0x16aa65(0x1ad)](a34_0x564004['gray']('\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x358eab['ok']){console[_0x16aa65(0x1ad)](a34_0x564004[_0x16aa65(0x1e1)](_0x16aa65(0x19c)));return;}console['warn'](a34_0x564004['yellow'](_0x16aa65(0x1e3)+(_0x358eab[_0x16aa65(0x1b8)]||'unknown'))),console[_0x16aa65(0x1ad)](a34_0x564004[_0x16aa65(0x1e1)](_0x16aa65(0x1b2)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x2cec7a){const _0x267355=a34_0x46dcfb;await validateUpdateFlags(_0x2cec7a);const _0x53aca5=getCurrentVersion();console['log'](_0x267355(0x1c4)+_0x53aca5);const _0x3b120e=a34_0x4355c5(_0x267355(0x1a7))[_0x267355(0x1cf)](),_0x2568e9=await resolveTargetVersion(_0x2cec7a);if(!_0x2568e9){const _0x245c72=_0x2cec7a[_0x267355(0x1cb)]('beta')?_0x267355(0x1c8):_0x267355(0x1b9);return _0x3b120e[_0x267355(0x1aa)](_0x245c72),console[_0x267355(0x1ad)](a34_0x564004['gray'](_0x267355(0x1d9)+NPM_PACKAGE_NAME+_0x267355(0x1c3))),{'ok':![],'message':_0x245c72};}const _0x2a950b=a34_0xc966c2[_0x267355(0x1e7)](VERSION),_0x337765=a34_0xc966c2[_0x267355(0x1e7)](_0x2568e9[_0x267355(0x198)]);if(!_0x2a950b||!_0x337765)return _0x3b120e[_0x267355(0x1aa)](_0x267355(0x1b0)),{'ok':![],'message':_0x267355(0x1b0)};if(!shouldInstallTarget(_0x2a950b,_0x2568e9)){const _0x28d3b3=_0x2568e9[_0x267355(0x1da)]===_0x267355(0x198)?_0x267355(0x1cc)+_0x2568e9[_0x267355(0x198)]+')':_0x267355(0x1bf)+_0x2568e9['version']+')';return _0x3b120e[_0x267355(0x1d2)](_0x28d3b3),shouldSkipOfficialSkill(_0x2cec7a)?console[_0x267355(0x1ad)](a34_0x564004['gray'](_0x267355(0x1d1))):await installOfficialSkill(_0x2cec7a['nonInteractive']),{'ok':!![]};}_0x3b120e[_0x267355(0x196)](getInstallPlanLabel(_0x53aca5,_0x2568e9));const _0x63049a=detectPackageManager(),_0x3df161=_0x63049a===_0x267355(0x1a4)?resolveNpmBin(_0x267355(0x1a4)):_0x63049a,_0x2140b4=a34_0x4355c5(_0x267355(0x1e4)+_0x63049a+_0x267355(0x1b6))[_0x267355(0x1cf)]();try{return await execa(_0x3df161,[_0x267355(0x1b1),'-g',NPM_PACKAGE_NAME+'@'+_0x2568e9[_0x267355(0x198)]],{'stdio':_0x267355(0x1df)}),_0x2140b4[_0x267355(0x1d2)](_0x267355(0x1c1)+_0x2568e9[_0x267355(0x198)]),console[_0x267355(0x1ad)](a34_0x564004[_0x267355(0x1e1)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipOfficialSkill(_0x2cec7a)?console[_0x267355(0x1ad)](a34_0x564004[_0x267355(0x1e1)](_0x267355(0x1d1))):await installOfficialSkill(_0x2cec7a[_0x267355(0x1b5)]),{'ok':!![]};}catch(_0x177d59){return _0x2140b4[_0x267355(0x1aa)](_0x267355(0x1cd)),console[_0x267355(0x1b8)](a34_0x564004[_0x267355(0x19b)]('\x20\x20'+_0x177d59[_0x267355(0x1e2)])),console[_0x267355(0x1ad)](a34_0x564004[_0x267355(0x1e1)](_0x267355(0x1a5)+_0x63049a+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x2568e9[_0x267355(0x198)])),{'ok':![],'message':_0x177d59['message']};}}export const updateDefinition={'service':a34_0x46dcfb(0x1a0),'command':a34_0x46dcfb(0x1c6),'description':a34_0x46dcfb(0x1ab),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};function a34_0x1cc9(){const _0x4452ff=['Updating\x20via\x20','yellow','validation','valid','https://registry.npmjs.org/-/package/','flag','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','\x20→\x20','info','boolean','version','green','4SHSfFf','red','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','map','10992480kdEgcz','7204315lDSwzx','update','beta','Invalid\x20version:\x20','Refresh\x20official\x20skill\x20package\x20after\x20updating','npm','\x20\x20Try\x20manually:\x20','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','Checking\x20for\x20updates...','704402RzzTuf','1781886AXVZRz','fail','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','log','9IAvsHH','5857632jvWdNS','Version\x20comparison\x20failed','install','\x20\x20Run\x20manually:\x20','str','no-skills','nonInteractive','...','fromEntries','error','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','timeout','4QuMrIh','Update\x20available:\x20','toLowerCase','entries','Already\x20up\x20to\x20date\x20(v','/dist-tags','Updated\x20to\x20v','skipped','@latest','Current\x20version:\x20','cli','run','latest','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','bun','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','bool','Already\x20on\x20requested\x20version\x20(v','Update\x20failed','4350605kewKcm','start','cwd','Skipping\x20official\x20skill\x20package\x20(--no-skills).','succeed','Requested\x20version:\x20','14144306MBjrRd','unknown','trim','object','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','source','8uDbqXp','execPath','slice','skills','pipe','string','gray','message','\x20\x20Official\x20skill\x20update\x20failed:\x20'];a34_0x1cc9=function(){return _0x4452ff;};return a34_0x1cc9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a35_0x1e6c(_0x8476fb,_0x33f65c){_0x8476fb=_0x8476fb-0xe8;const _0xc3e01e=a35_0xc3e0();let _0x1e6c35=_0xc3e01e[_0x8476fb];return _0x1e6c35;}(function(_0x272e4d,_0x147e88){const _0x28cc69=a35_0x1e6c,_0x365d88=_0x272e4d();while(!![]){try{const _0x152e14=-parseInt(_0x28cc69(0xed))/0x1*(-parseInt(_0x28cc69(0xec))/0x2)+-parseInt(_0x28cc69(0xe8))/0x3+parseInt(_0x28cc69(0xea))/0x4*(-parseInt(_0x28cc69(0xef))/0x5)+-parseInt(_0x28cc69(0xee))/0x6*(parseInt(_0x28cc69(0xf1))/0x7)+parseInt(_0x28cc69(0xeb))/0x8+-parseInt(_0x28cc69(0xe9))/0x9+parseInt(_0x28cc69(0xf2))/0xa*(parseInt(_0x28cc69(0xf0))/0xb);if(_0x152e14===_0x147e88)break;else _0x365d88['push'](_0x365d88['shift']());}catch(_0x4e37af){_0x365d88['push'](_0x365d88['shift']());}}}(a35_0xc3e0,0xb9772));function a35_0xc3e0(){const _0x3a7902=['594390EYalKu','7612038JAyQKO','127044yHunKe','6855656MCdygH','102qwpjUA','26605AAQqDG','22692cKbgSv','95cKDVnT','82247FIBAJp','791gKaEcs','830ddPRGD'];a35_0xc3e0=function(){return _0x3a7902;};return a35_0xc3e0();}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a36_0x265a41=a36_0x3cd1;(function(_0x363cc3,_0x968144){const _0x402a6b=a36_0x3cd1,_0x49bf4e=_0x363cc3();while(!![]){try{const _0x5c7170=-parseInt(_0x402a6b(0xd0))/0x1*(parseInt(_0x402a6b(0xc6))/0x2)+-parseInt(_0x402a6b(0xc5))/0x3+-parseInt(_0x402a6b(0xca))/0x4+-parseInt(_0x402a6b(0xd2))/0x5*(parseInt(_0x402a6b(0xc9))/0x6)+parseInt(_0x402a6b(0xd7))/0x7*(-parseInt(_0x402a6b(0xd8))/0x8)+parseInt(_0x402a6b(0xd9))/0x9+-parseInt(_0x402a6b(0xd1))/0xa*(-parseInt(_0x402a6b(0xcd))/0xb);if(_0x5c7170===_0x968144)break;else _0x49bf4e['push'](_0x49bf4e['shift']());}catch(_0x4ebbf9){_0x49bf4e['push'](_0x49bf4e['shift']());}}}(a36_0x1988,0x1e70c));function a36_0x1988(){const _0x5c5544=['codegen','string','str','698823Avkibv','12604BjHhhL','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','appCode','12dFwjIl','758812RNigRZ','read','Omit\x20import\x20statements\x20from\x20generated\x20code','2216467LqaPJn','alias','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','2JaiHmq','40UWcrQR','415095peJJEP','code','bool','operation','sdk','19873AVotxT','232CrLGWN','20817pIPJwA','skip-imports','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'];a36_0x1988=function(){return _0x5c5544;};return a36_0x1988();}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a36_0x3cd1(_0x5d6fbb,_0x4a0952){_0x5d6fbb=_0x5d6fbb-0xc0;const _0x198888=a36_0x1988();let _0x3cd1af=_0x198888[_0x5d6fbb];return _0x3cd1af;}export const codegenSdk={'service':a36_0x265a41(0xc2),'command':a36_0x265a41(0xd6),'description':a36_0x265a41(0xcf),'risk':a36_0x265a41(0xcb),'flags':[CODE_FLAG_OPTIONAL,{'name':a36_0x265a41(0xce),'type':a36_0x265a41(0xc3),'description':a36_0x265a41(0xc7)},{'name':a36_0x265a41(0xd5),'type':a36_0x265a41(0xc3),'required':!![],'description':a36_0x265a41(0xc1)},{'name':a36_0x265a41(0xc0),'type':'boolean','description':a36_0x265a41(0xcc)}],async 'execute'(_0x32efbb){const _0x29b077=a36_0x265a41,{dataset:_0x5ad787,operation:_0x3af332}=await getOperationDetail(_0x32efbb[_0x29b077(0xc8)],_0x32efbb[_0x29b077(0xc4)]('code'),_0x32efbb['str'](_0x29b077(0xd5))),_0x3c46a4=generateSdkCode(_0x5ad787,_0x3af332,{'includeImports':!_0x32efbb[_0x29b077(0xd4)](_0x29b077(0xc0))});return{'ok':!![],'data':{'dataset':{'name':_0x5ad787['name'],'code':_0x5ad787[_0x29b077(0xd3)],'tableName':_0x5ad787['tableName']},'operation':_0x32efbb[_0x29b077(0xc4)](_0x29b077(0xd5)),'code':_0x3c46a4}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a37_0x515c0a=a37_0x1f1b;(function(_0x641318,_0x9886b5){const _0x27ab14=a37_0x1f1b,_0x15e31e=_0x641318();while(!![]){try{const _0x35c413=-parseInt(_0x27ab14(0xb9))/0x1*(-parseInt(_0x27ab14(0xbd))/0x2)+-parseInt(_0x27ab14(0xc8))/0x3+parseInt(_0x27ab14(0xb2))/0x4*(parseInt(_0x27ab14(0xbc))/0x5)+parseInt(_0x27ab14(0xc6))/0x6+-parseInt(_0x27ab14(0xc3))/0x7*(parseInt(_0x27ab14(0xb6))/0x8)+-parseInt(_0x27ab14(0xbe))/0x9*(-parseInt(_0x27ab14(0xcc))/0xa)+-parseInt(_0x27ab14(0xca))/0xb*(parseInt(_0x27ab14(0xc7))/0xc);if(_0x35c413===_0x9886b5)break;else _0x15e31e['push'](_0x15e31e['shift']());}catch(_0x2e6e56){_0x15e31e['push'](_0x15e31e['shift']());}}}(a37_0x22b7,0x97935));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a37_0x1f1b(_0x408028,_0x1bc1df){_0x408028=_0x408028-0xb2;const _0x22b72b=a37_0x22b7();let _0x1f1bb1=_0x22b72b[_0x408028];return _0x1f1bb1;}function a37_0x22b7(){const _0x5dd6fa=['sqlcode','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','5qDPqIV','41494kMOOUg','14922tGOBhm','sqlCode','read','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','bff','26222ItVSEU','bool','codegen','2378340KHjoDf','325092eECxnA','507948tesNql','sdk','407rKayJD','target','2230acPdsj','appCode','1658656fCOeXj','str','boolean','string','200hTdfks','sql','no-imports','34qKUkMQ'];a37_0x22b7=function(){return _0x5dd6fa;};return a37_0x22b7();}export const codegenSql={'service':a37_0x515c0a(0xc5),'command':a37_0x515c0a(0xb7),'description':a37_0x515c0a(0xbb),'risk':a37_0x515c0a(0xc0),'flags':[SQLCODE_FLAG,{'name':'target','type':a37_0x515c0a(0xb5),'description':a37_0x515c0a(0xc1),'default':a37_0x515c0a(0xc9),'enum':[a37_0x515c0a(0xc9),a37_0x515c0a(0xc2)]},{'name':a37_0x515c0a(0xb8),'type':a37_0x515c0a(0xb4),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x51991d){const _0x5c91cb=a37_0x515c0a,_0x3b2944=await getSqlQueryInfo(_0x51991d[_0x5c91cb(0xcd)],_0x51991d[_0x5c91cb(0xb3)](_0x5c91cb(0xba))),_0x4d4996=_0x51991d[_0x5c91cb(0xb3)](_0x5c91cb(0xcb))||_0x5c91cb(0xc9),_0x2aa8d1=generateSqlCodeTemplate(_0x3b2944,{'target':_0x4d4996,'includeImports':!_0x51991d[_0x5c91cb(0xc4)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x3b2944[_0x5c91cb(0xbf)],'sqlName':_0x3b2944['sqlName'],'target':_0x4d4996,'code':_0x2aa8d1}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x427f76,_0x4a1be7){const _0x572a92=a38_0x496c,_0xec7399=_0x427f76();while(!![]){try{const _0xc137f9=-parseInt(_0x572a92(0x102))/0x1*(-parseInt(_0x572a92(0xfb))/0x2)+-parseInt(_0x572a92(0x110))/0x3+parseInt(_0x572a92(0x109))/0x4*(parseInt(_0x572a92(0xfc))/0x5)+parseInt(_0x572a92(0x116))/0x6*(-parseInt(_0x572a92(0xf8))/0x7)+-parseInt(_0x572a92(0x113))/0x8*(-parseInt(_0x572a92(0x118))/0x9)+-parseInt(_0x572a92(0x117))/0xa*(-parseInt(_0x572a92(0xf7))/0xb)+-parseInt(_0x572a92(0x103))/0xc;if(_0xc137f9===_0x4a1be7)break;else _0xec7399['push'](_0xec7399['shift']());}catch(_0x5456f1){_0xec7399['push'](_0xec7399['shift']());}}}(a38_0x878a,0x38f4f));import{input,checkbox,select}from'@inquirer/prompts';import a38_0x25b9c0 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x2e5400=a38_0x496c,_0x28d675=await input({'message':_0x2e5400(0x114),'validate':_0x1e5bf7=>{const _0x10f569=_0x2e5400,_0x5e525b=validateAppcode(_0x1e5bf7[_0x10f569(0xfd)]());return _0x5e525b[_0x10f569(0x10c)]||_0x5e525b[_0x10f569(0xfe)]||'Invalid\x20App\x20Code';}});return _0x28d675['trim']();}function a38_0x878a(){const _0x2ff2b9=['(跳过,稍后配置)','53171ZjcAGx','1415712AaOkTq','manual','appCode','正在获取可用应用列表...','appName','cyan','1431932leKnkb','✎\x20自定义输入\x20appcode','custom','valid','gray','✎\x20手动输入','length','682965Udchek','\x20\x20(','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','25144zgutsN','请输入\x20App\x20Code:','find','325062FRUUwK','207970fmOneB','576SIvTnk','未找到可用应用。','skip','includes','11DFmssh','7cpRDOc','App\x20Code:','\x0a未找到可用应用。','2ojkIlZ','5DxtQLG','trim','message','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','yellow'];a38_0x878a=function(){return _0x2ff2b9;};return a38_0x878a();}function a38_0x496c(_0x4783a2,_0x521631){_0x4783a2=_0x4783a2-0xf4;const _0x878a5=a38_0x878a();let _0x496c56=_0x878a5[_0x4783a2];return _0x496c56;}export async function promptAppSelection(_0x3eb8fa){const _0x4d9898=a38_0x496c,_0x44151d=[{'name':a38_0x25b9c0['yellow']('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0x3eb8fa['map']((_0x183060,_0x60ed7c)=>({'name':_0x183060[_0x4d9898(0x107)]+'\x20\x20'+a38_0x25b9c0[_0x4d9898(0x10d)]('('+_0x183060[_0x4d9898(0x105)]+')'),'value':_0x60ed7c}))],_0x2789e6=await checkbox({'message':'获取到\x20'+a38_0x25b9c0[_0x4d9898(0x108)](_0x3eb8fa[_0x4d9898(0x10f)])+_0x4d9898(0xff),'choices':_0x44151d,'loop':![]});if(_0x2789e6[_0x4d9898(0xf6)](-0x1))return'custom';if(_0x2789e6[_0x4d9898(0x10f)]===0x0)return'custom';return _0x2789e6['map'](_0x535325=>_0x3eb8fa[_0x535325]);}export async function promptSingleAppSelection(_0x409d9e){const _0x150534=a38_0x496c,_0x818b09=[{'name':a38_0x25b9c0[_0x150534(0x10d)](_0x150534(0x112)),'value':'skip'},{'name':a38_0x25b9c0[_0x150534(0x100)](_0x150534(0x10a)),'value':_0x150534(0x10b)},..._0x409d9e['map'](_0x3257ed=>({'name':_0x3257ed['appName']+'\x20\x20'+a38_0x25b9c0[_0x150534(0x10d)]('('+_0x3257ed[_0x150534(0x105)]+')'),'value':_0x3257ed[_0x150534(0x105)]}))],_0x20d149=await select({'message':'请选择要绑定的应用:','choices':_0x818b09});if(_0x20d149==='skip')return _0x150534(0xf5);if(_0x20d149==='custom')return _0x150534(0x10b);return _0x409d9e[_0x150534(0x115)](_0x305bf7=>_0x305bf7['appCode']===_0x20d149);}export async function selectSingleAppcode(_0xb82c7e){const _0x13849d=a38_0x496c;if(!_0xb82c7e)return writeCliSideChannelLine(a38_0x25b9c0[_0x13849d(0x10d)]('(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)')),_fallbackOrSkip();writeCliSideChannelLine(_0x13849d(0x106));let _0x4d7b8a;try{_0x4d7b8a=await withActiveCookie(_0xb82c7e,()=>listRemoteApps());}catch(_0x457968){writeCliSideChannelLine(a38_0x25b9c0[_0x13849d(0x100)]('无法获取远程应用列表,请手动输入。'));if(_0x457968 instanceof Error)writeCliSideChannelLine(a38_0x25b9c0['gray'](_0x13849d(0x111)+_0x457968[_0x13849d(0xfe)]+')'));return _fallbackOrSkip();}if(_0x4d7b8a['length']===0x0)return writeCliSideChannelLine(a38_0x25b9c0[_0x13849d(0x100)](_0x13849d(0xf4))),_fallbackOrSkip();const _0x39f16d=await promptSingleAppSelection(_0x4d7b8a);if(_0x39f16d===_0x13849d(0xf5))return'';if(_0x39f16d===_0x13849d(0x10b))return promptCustomAppcode();return _0x39f16d['appCode'];}export async function selectMultipleApps(_0x49de95){const _0x4325ac=a38_0x496c;writeCliSideChannelLine(_0x4325ac(0x106));let _0x3ab26a;try{_0x3ab26a=await withActiveCookie(_0x49de95,()=>listRemoteApps());}catch(_0x4b375d){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0x4b375d instanceof Error)writeCliSideChannelLine(_0x4325ac(0x111)+_0x4b375d[_0x4325ac(0xfe)]+')');return'custom';}if(_0x3ab26a[_0x4325ac(0x10f)]===0x0)return writeCliSideChannelLine(_0x4325ac(0xfa)),_0x4325ac(0x10b);return promptAppSelection(_0x3ab26a);}async function _fallbackOrSkip(){const _0x5b3424=a38_0x496c,_0x219c60=await select({'message':_0x5b3424(0xf9),'choices':[{'name':a38_0x25b9c0[_0x5b3424(0x10d)](_0x5b3424(0x101)),'value':_0x5b3424(0xf5)},{'name':a38_0x25b9c0[_0x5b3424(0x100)](_0x5b3424(0x10e)),'value':_0x5b3424(0x104)}]});if(_0x219c60===_0x5b3424(0xf5))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a39_0x5d8f9e=a39_0x1b2b;(function(_0x3a1ee5,_0xd222be){const _0xdcd91c=a39_0x1b2b,_0x286cb4=_0x3a1ee5();while(!![]){try{const _0x469a7b=-parseInt(_0xdcd91c(0xbc))/0x1*(parseInt(_0xdcd91c(0xb7))/0x2)+parseInt(_0xdcd91c(0xbf))/0x3*(-parseInt(_0xdcd91c(0xc7))/0x4)+-parseInt(_0xdcd91c(0xc5))/0x5*(-parseInt(_0xdcd91c(0xc4))/0x6)+-parseInt(_0xdcd91c(0xaf))/0x7*(-parseInt(_0xdcd91c(0xc9))/0x8)+parseInt(_0xdcd91c(0xc6))/0x9+-parseInt(_0xdcd91c(0xbe))/0xa*(parseInt(_0xdcd91c(0xba))/0xb)+-parseInt(_0xdcd91c(0xb6))/0xc*(parseInt(_0xdcd91c(0xb5))/0xd);if(_0x469a7b===_0xd222be)break;else _0x286cb4['push'](_0x286cb4['shift']());}catch(_0x538622){_0x286cb4['push'](_0x286cb4['shift']());}}}(a39_0x20d4,0xcb5c5));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a39_0x5d8f9e(0xbd)};export const CODE_FLAG={'name':a39_0x5d8f9e(0xb3),'type':'string','required':!![],'description':a39_0x5d8f9e(0xb9),'pattern':DATASET_CODE_PATTERN};function a39_0x1b2b(_0x4fe76e,_0x206ef0){_0x4fe76e=_0x4fe76e-0xaf;const _0x20d460=a39_0x20d4();let _0x1b2baa=_0x20d460[_0x4fe76e];return _0x1b2baa;}function a39_0x20d4(){const _0x5a3e3b=['4btpiic','string','Dataset\x20code\x20(32-char\x20hex\x20UUID)','8668jEHvhd','number','408001LNkDPI','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','9560bjHTIJ','3tDZNMb','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Database\x20product\x20type','42xCisel','1083550bIJYfD','10165167UfqCdL','1638116BgrrNI','appcode','6951824ZOOqUx','7QHcygM','sqlcode','MYSQL','POSTGRESQL','code','dbtype','9146631OUwXJM','12EPwmXD'];a39_0x20d4=function(){return _0x5a3e3b;};return a39_0x20d4();}export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)'};export const SQLCODE_FLAG={'name':a39_0x5d8f9e(0xb0),'type':a39_0x5d8f9e(0xb8),'required':!![],'description':a39_0x5d8f9e(0xc0),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a39_0x5d8f9e(0xc2)}};export const APPCODE_FLAG_OPTIONAL={'name':a39_0x5d8f9e(0xc8),'type':a39_0x5d8f9e(0xb8),'required':![],'description':a39_0x5d8f9e(0xc1)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a39_0x5d8f9e(0xbb),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':a39_0x5d8f9e(0xb4),'type':a39_0x5d8f9e(0xb8),'required':!![],'description':a39_0x5d8f9e(0xc3),'enum':[a39_0x5d8f9e(0xb1),a39_0x5d8f9e(0xb2)]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x7a6087,_0x45678b){const _0x1e8aea=a40_0x2242,_0x3f6e36=_0x7a6087();while(!![]){try{const _0x35066e=parseInt(_0x1e8aea(0x112))/0x1*(-parseInt(_0x1e8aea(0x114))/0x2)+parseInt(_0x1e8aea(0x10b))/0x3+parseInt(_0x1e8aea(0x118))/0x4+-parseInt(_0x1e8aea(0x10c))/0x5*(parseInt(_0x1e8aea(0x10f))/0x6)+parseInt(_0x1e8aea(0x11a))/0x7*(-parseInt(_0x1e8aea(0x10a))/0x8)+parseInt(_0x1e8aea(0x115))/0x9*(parseInt(_0x1e8aea(0x116))/0xa)+parseInt(_0x1e8aea(0x111))/0xb*(parseInt(_0x1e8aea(0x109))/0xc);if(_0x35066e===_0x45678b)break;else _0x3f6e36['push'](_0x3f6e36['shift']());}catch(_0x1477a5){_0x3f6e36['push'](_0x3f6e36['shift']());}}}(a40_0x36bc,0xcfb06));export function validateAppcode(_0x443c3b){const _0x358f04=a40_0x2242,_0x46ea8b=_0x443c3b[_0x358f04(0x10e)]();if(!_0x46ea8b)return{'valid':![],'message':_0x358f04(0x113)};if(_0x46ea8b[_0x358f04(0x10d)]>0x64)return{'valid':![],'message':_0x358f04(0x119)};if(!/^[A-Za-z0-9_-]+$/[_0x358f04(0x110)](_0x46ea8b))return{'valid':![],'message':_0x358f04(0x117)};return{'valid':!![]};}function a40_0x2242(_0x3934d5,_0x2447ed){_0x3934d5=_0x3934d5-0x109;const _0x36bc62=a40_0x36bc();let _0x224287=_0x36bc62[_0x3934d5];return _0x224287;}function a40_0x36bc(){const _0x505836=['4225RrBGDK','App\x20Code\x20cannot\x20be\x20empty','452DDNIpF','432iCadER','204310ezPdLD','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','4095532AljXCu','App\x20Code\x20cannot\x20exceed\x20100\x20characters','287WyZete','132FulclS','248568DtxsvS','4777638MYiULN','5ERVEWF','length','trim','8157810uuxWCH','test','841973IUHGsp'];a40_0x36bc=function(){return _0x505836;};return a40_0x36bc();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a41_0x5bb7d7=a41_0x2610;(function(_0x1691e4,_0x3ebf09){const _0x399f86=a41_0x2610,_0x283101=_0x1691e4();while(!![]){try{const _0x2cb511=-parseInt(_0x399f86(0x1f7))/0x1+parseInt(_0x399f86(0x200))/0x2+parseInt(_0x399f86(0x1ff))/0x3+-parseInt(_0x399f86(0x203))/0x4*(-parseInt(_0x399f86(0x1f9))/0x5)+parseInt(_0x399f86(0x1f1))/0x6*(parseInt(_0x399f86(0x1fd))/0x7)+parseInt(_0x399f86(0x205))/0x8*(-parseInt(_0x399f86(0x1f2))/0x9)+-parseInt(_0x399f86(0x1f5))/0xa;if(_0x2cb511===_0x3ebf09)break;else _0x283101['push'](_0x283101['shift']());}catch(_0xe70d01){_0x283101['push'](_0x283101['shift']());}}}(a41_0x447e,0x8350f));function a41_0x2610(_0x402a5d,_0x443cb1){_0x402a5d=_0x402a5d-0x1f0;const _0x447ecd=a41_0x447e();let _0x26107f=_0x447ecd[_0x402a5d];return _0x26107f;}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(_0x575579){const _0x484e1f=a41_0x2610,_0x3bb395=_0x575579['str'](_0x484e1f(0x1f3));if(!_0x3bb395)throw CliErrors[_0x484e1f(0x1f4)](_0x484e1f(0x1fc),'Usage:\x20'+CLI_BIN_NAME+_0x484e1f(0x204));const _0x522ebd=readConfig(),_0x3212e1=_0x3bb395===_0x484e1f(0x202)?_0x484e1f(0x201):_0x3bb395,_0x53e2e2=_0x522ebd[_0x3212e1];if(_0x53e2e2===undefined)throw CliErrors[_0x484e1f(0x1f4)](_0x484e1f(0x1fb)+_0x3bb395);return{'ok':!![],'data':typeof _0x53e2e2===_0x484e1f(0x1f6)?_0x53e2e2:{[_0x3212e1]:_0x53e2e2},'message':typeof _0x53e2e2==='object'?undefined:String(_0x53e2e2)};}export const configGetDefinition={'service':a41_0x5bb7d7(0x1f0),'command':a41_0x5bb7d7(0x1f8),'description':a41_0x5bb7d7(0x1fe),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a41_0x5bb7d7(0x1f3),'type':a41_0x5bb7d7(0x1fa),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};function a41_0x447e(){const _0x151034=['192wybmVZ','3041946GTYxkW','key','validation','11310820yuhdkZ','object','256985QpyOWE','get','6105OwBygz','string','Key\x20not\x20found:\x20','Missing\x20key.','15932NRiPuQ','Get\x20a\x20config\x20value\x20by\x20key','2589393ubjGGf','1407630glzldQ','appcode','app','3152aKIHId','\x20config\x20get\x20--key\x20<key>','16KRgybv','config'];a41_0x447e=function(){return _0x151034;};return a41_0x447e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a42_0x35e0(_0xc5be4b,_0x46271f){_0xc5be4b=_0xc5be4b-0x17c;const _0x34c108=a42_0x34c1();let _0x35e0d0=_0x34c108[_0xc5be4b];return _0x35e0d0;}(function(_0x335419,_0x47d0aa){const _0x5e1cb7=a42_0x35e0,_0x2bbf30=_0x335419();while(!![]){try{const _0x31511c=parseInt(_0x5e1cb7(0x17e))/0x1*(parseInt(_0x5e1cb7(0x181))/0x2)+parseInt(_0x5e1cb7(0x180))/0x3+parseInt(_0x5e1cb7(0x182))/0x4*(parseInt(_0x5e1cb7(0x187))/0x5)+-parseInt(_0x5e1cb7(0x184))/0x6*(-parseInt(_0x5e1cb7(0x185))/0x7)+-parseInt(_0x5e1cb7(0x17f))/0x8*(-parseInt(_0x5e1cb7(0x188))/0x9)+-parseInt(_0x5e1cb7(0x186))/0xa*(-parseInt(_0x5e1cb7(0x17d))/0xb)+-parseInt(_0x5e1cb7(0x183))/0xc*(parseInt(_0x5e1cb7(0x17c))/0xd);if(_0x31511c===_0x47d0aa)break;else _0x2bbf30['push'](_0x2bbf30['shift']());}catch(_0x27a149){_0x2bbf30['push'](_0x2bbf30['shift']());}}}(a42_0x34c1,0x851af));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a42_0x34c1(){const _0x8b3ae0=['322946maOXVu','172766oGtvWZ','2uTIMzG','8qLcWEd','2270064UfWgCY','903022LmfjRp','125588hthocv','1428HDFrOe','8898hpwbMR','623PiaVWu','140gimjQd','95aDKkfX','8039457mvJzli'];a42_0x34c1=function(){return _0x8b3ae0;};return a42_0x34c1();}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x55180d=a43_0x5efd;(function(_0x5e02ba,_0x5c6f99){const _0x2ea3a1=a43_0x5efd,_0x22991d=_0x5e02ba();while(!![]){try{const _0x2315ae=-parseInt(_0x2ea3a1(0x128))/0x1*(-parseInt(_0x2ea3a1(0x121))/0x2)+parseInt(_0x2ea3a1(0x11e))/0x3+parseInt(_0x2ea3a1(0x12b))/0x4+-parseInt(_0x2ea3a1(0x11f))/0x5+parseInt(_0x2ea3a1(0x124))/0x6*(parseInt(_0x2ea3a1(0x12a))/0x7)+parseInt(_0x2ea3a1(0x11c))/0x8+parseInt(_0x2ea3a1(0x123))/0x9*(-parseInt(_0x2ea3a1(0x11d))/0xa);if(_0x2315ae===_0x5c6f99)break;else _0x22991d['push'](_0x22991d['shift']());}catch(_0x2c441e){_0x22991d['push'](_0x22991d['shift']());}}}(a43_0x28df,0x2ccbb));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x351d37){const _0x39168e=a43_0x5efd,_0x48d89d=_0x351d37[_0x39168e(0x125)](_0x39168e(0x11b))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x48d89d};}export const configListDefinition={'service':a43_0x55180d(0x122),'command':a43_0x55180d(0x126),'description':a43_0x55180d(0x120),'risk':a43_0x55180d(0x127),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a43_0x55180d(0x11b),'type':'boolean','description':a43_0x55180d(0x129),'default':![]}],'execute':execute};function a43_0x5efd(_0x236734,_0x581119){_0x236734=_0x236734-0x11b;const _0x28dfb2=a43_0x28df();let _0x5efdc2=_0x28dfb2[_0x236734];return _0x5efdc2;}function a43_0x28df(){const _0xd93ddc=['2OMcnFV','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','7ItXghJ','1009660IYKHPR','global','2557616YjXMox','40bTZpWE','914682cwanSz','8615pSbZsc','List\x20all\x20config\x20values','29168IdCHZK','config','2099268JvXWcY','1272210AvdKuo','bool','list','read'];a43_0x28df=function(){return _0xd93ddc;};return a43_0x28df();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a44_0x704ebf=a44_0xfdda;function a44_0x2e5c(){const _0x1a9d8c=['Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','boolean','Invalid\x20locale\x20value.','Project','app','Config\x20value','26wKBGTK','\x20appcode\x20set\x20to:\x20','write','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','riskLevel','\x20set\x20to:\x20','object','1271168dfMClD','apps','Missing\x20key.','length','Global','1827510igudld','Use\x20`','string','1030638rJXCWd','set','join','validation','bool','3581140WwNyUe','\x20app\x20add\x20<name>\x20--appcode\x20','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','18714590AWlJly','locale','env','includes','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','20250nPBfZU','15yarTGO','\x22\x20is\x20not\x20settable.','Usage:\x20','1526273OiWSzQ','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','global','Invalid\x20value\x20for\x20\x22','Missing\x20value.','config','key','str','value','9intViU','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','keys'];a44_0x2e5c=function(){return _0x1a9d8c;};return a44_0x2e5c();}(function(_0x4b8a56,_0x568cd1){const _0x26d9e7=a44_0xfdda,_0x2be0f5=_0x4b8a56();while(!![]){try{const _0x4ed167=parseInt(_0x26d9e7(0xd1))/0x1*(parseInt(_0x26d9e7(0xe8))/0x2)+-parseInt(_0x26d9e7(0xf4))/0x3+-parseInt(_0x26d9e7(0xc9))/0x4+-parseInt(_0x26d9e7(0xd2))/0x5*(parseInt(_0x26d9e7(0xf7))/0x6)+parseInt(_0x26d9e7(0xd5))/0x7+-parseInt(_0x26d9e7(0xef))/0x8*(-parseInt(_0x26d9e7(0xdf))/0x9)+parseInt(_0x26d9e7(0xcc))/0xa;if(_0x4ed167===_0x568cd1)break;else _0x2be0f5['push'](_0x2be0f5['shift']());}catch(_0x2261cc){_0x2be0f5['push'](_0x2be0f5['shift']());}}}(a44_0x2e5c,0x7815e));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a44_0xfdda(_0x5c0463,_0x3a22f4){_0x5c0463=_0x5c0463-0xc5;const _0x2e5c0e=a44_0x2e5c();let _0xfdda5b=_0x2e5c0e[_0x5c0463];return _0xfdda5b;}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(_0x54814f){const _0x28d51a=a44_0xfdda,_0x4f7589=_0x54814f[_0x28d51a(0xdd)]('key'),_0x5ada56=_0x54814f['str'](_0x28d51a(0xde));if(!_0x4f7589)throw CliErrors[_0x28d51a(0xc7)](_0x28d51a(0xf1),_0x28d51a(0xd4)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x5ada56===undefined||_0x5ada56==='')throw CliErrors['validation'](_0x28d51a(0xda),_0x28d51a(0xd4)+CLI_BIN_NAME+_0x28d51a(0xd7));if(_0x5ada56['length']>0x1f4)throw CliErrors['validation'](_0x28d51a(0xe0));if(!isTopLevelConfigKey(_0x4f7589))throw CliErrors['validation']('Top-level\x20key\x20\x22'+_0x4f7589+_0x28d51a(0xd3),'Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(_0x4f7589===_0x28d51a(0xec))throw CliErrors[_0x28d51a(0xc7)](_0x28d51a(0xcb));if(CONFIG_ENUM_VALUES[_0x4f7589]&&!CONFIG_ENUM_VALUES[_0x4f7589][_0x28d51a(0xcf)](_0x5ada56))throw CliErrors[_0x28d51a(0xc7)](_0x28d51a(0xd9)+_0x4f7589+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x4f7589][_0x28d51a(0xc6)](',\x20'));if(_0x4f7589===_0x28d51a(0xcd)&&!normalizeLocale(_0x5ada56))throw CliErrors['validation'](_0x28d51a(0xe4),_0x28d51a(0xe2));const _0x290b02={'global':_0x54814f[_0x28d51a(0xc8)](_0x28d51a(0xd8))},_0xdbb378=resolveWriteScope(_0x290b02),_0x31354a=readScopedConfig(_0xdbb378);let _0x51b3a9=_0x4f7589,_0x58acf5=_0x5ada56;_0x4f7589===_0x28d51a(0xe6)&&(_0x51b3a9='appcode',delete _0x31354a[_0x28d51a(0xe6)]);_0x4f7589===_0x28d51a(0xcd)&&(_0x58acf5=normalizeLocale(_0x5ada56));if(_0x4f7589==='env'){_0x58acf5=normalizeEnv(_0x5ada56);if(!isProduction(_0x58acf5)&&!isDaily(_0x58acf5))throw CliErrors[_0x28d51a(0xc7)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x28d51a(0xeb));}if(_0x4f7589==='appcode'){const _0x3ed3ce=_0x31354a['apps']&&typeof _0x31354a[_0x28d51a(0xf0)]===_0x28d51a(0xee)?Object[_0x28d51a(0xe1)](_0x31354a[_0x28d51a(0xf0)]):[];if(_0x3ed3ce[_0x28d51a(0xf2)]>0x0)throw CliErrors['validation']('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.',_0x28d51a(0xf5)+CLI_BIN_NAME+_0x28d51a(0xca)+_0x58acf5+'`,\x20`'+CLI_BIN_NAME+'\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x138a47=buildCanonicalProjectConfig({..._0x31354a},{'appCodes':[_0x58acf5],'env':typeof _0x31354a[_0x28d51a(0xce)]===_0x28d51a(0xf6)?_0x31354a[_0x28d51a(0xce)]:undefined});writeScopedConfig(_0x138a47,_0xdbb378);const _0x1aaf59=_0xdbb378===_0x28d51a(0xd8)?_0x28d51a(0xf3):'Project';return{'ok':!![],'message':'✓\x20'+_0x1aaf59+_0x28d51a(0xe9)+_0x58acf5+_0x28d51a(0xd6)};}_0x31354a[_0x51b3a9]=_0x58acf5,writeScopedConfig(_0x31354a,_0xdbb378);const _0x266aad=_0xdbb378===_0x28d51a(0xd8)?'Global':_0x28d51a(0xe5);return{'ok':!![],'message':'✓\x20'+_0x266aad+'\x20'+_0x51b3a9+_0x28d51a(0xed)+_0x58acf5};}export const configSetDefinition={'service':a44_0x704ebf(0xdb),'command':a44_0x704ebf(0xc5),'description':'Set\x20a\x20config\x20value','risk':a44_0x704ebf(0xea),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a44_0x704ebf(0xdc),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a44_0x704ebf(0xde),'type':a44_0x704ebf(0xf6),'description':a44_0x704ebf(0xe7),'required':!![]},{'name':a44_0x704ebf(0xd8),'type':a44_0x704ebf(0xe3),'description':a44_0x704ebf(0xd0),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x535291,_0x44ff24){var _0x53a243=a45_0x2c3b,_0x38a2dc=_0x535291();while(!![]){try{var _0x3d42f2=-parseInt(_0x53a243(0x198))/0x1+-parseInt(_0x53a243(0x18f))/0x2*(-parseInt(_0x53a243(0x199))/0x3)+-parseInt(_0x53a243(0x196))/0x4*(-parseInt(_0x53a243(0x191))/0x5)+parseInt(_0x53a243(0x19b))/0x6*(parseInt(_0x53a243(0x19a))/0x7)+-parseInt(_0x53a243(0x195))/0x8*(-parseInt(_0x53a243(0x194))/0x9)+-parseInt(_0x53a243(0x197))/0xa+-parseInt(_0x53a243(0x193))/0xb*(parseInt(_0x53a243(0x18d))/0xc);if(_0x3d42f2===_0x44ff24)break;else _0x38a2dc['push'](_0x38a2dc['shift']());}catch(_0x171b8d){_0x38a2dc['push'](_0x38a2dc['shift']());}}}(a45_0x24fa,0x9fbaf));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';function a45_0x2c3b(_0x58198a,_0x19e5fc){_0x58198a=_0x58198a-0x18d;var _0x24fadd=a45_0x24fa();var _0x2c3b42=_0x24fadd[_0x58198a];return _0x2c3b42;}import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';function a45_0x24fa(){var _0x10e888=['project','2593716kcxjje','validation','985342snztTd','\x20init`\x20first.','2103985vUpyWw','global','22quTToT','441zcFiNb','172664eaVqpS','4ABAqrT','6811840btkMhI','787230tTgECW','6sZIQAl','7ChZOdx','547494qCUrml'];a45_0x24fa=function(){return _0x10e888;};return a45_0x24fa();}export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x24c3ca){var _0x4acbc0=a45_0x2c3b;if(_0x24c3ca[_0x4acbc0(0x192)])return _0x4acbc0(0x192);if(!isInProject())throw CliErrors[_0x4acbc0(0x18e)]('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+_0x4acbc0(0x190));return _0x4acbc0(0x19c);}export function readScopedConfig(_0x50840b){return readConfigFile(resolveWriteConfigPath(_0x50840b));}export function writeScopedConfig(_0x106049,_0x44dc2f){writeConfigFile(resolveWriteConfigPath(_0x44dc2f),_0x106049);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x52f87d=a46_0x31a5;function a46_0x31a5(_0x57837f,_0x41ecb9){_0x57837f=_0x57837f-0x11b;const _0x28ba50=a46_0x28ba();let _0x31a519=_0x28ba50[_0x57837f];return _0x31a519;}(function(_0x459d3f,_0x4bef26){const _0x54bc69=a46_0x31a5,_0x243c0e=_0x459d3f();while(!![]){try{const _0x136c5e=-parseInt(_0x54bc69(0x129))/0x1+parseInt(_0x54bc69(0x123))/0x2+parseInt(_0x54bc69(0x11b))/0x3*(-parseInt(_0x54bc69(0x120))/0x4)+-parseInt(_0x54bc69(0x11c))/0x5+-parseInt(_0x54bc69(0x126))/0x6+-parseInt(_0x54bc69(0x128))/0x7+parseInt(_0x54bc69(0x127))/0x8*(parseInt(_0x54bc69(0x12b))/0x9);if(_0x136c5e===_0x4bef26)break;else _0x243c0e['push'](_0x243c0e['shift']());}catch(_0x56c04b){_0x243c0e['push'](_0x243c0e['shift']());}}}(a46_0x28ba,0x3a24c));import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a46_0x52f87d(0x121),'operation':'filter','description':a46_0x52f87d(0x12a),'paramsRequired':![],'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':[a46_0x52f87d(0x11f),a46_0x52f87d(0x11d),a46_0x52f87d(0x124),a46_0x52f87d(0x11e),a46_0x52f87d(0x12c),a46_0x52f87d(0x125)][a46_0x52f87d(0x122)]('\x0a')});function a46_0x28ba(){const _0x515450=['334080lWlALq','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','2370186gErMfd','808UNsZak','450716fgKaYL','290513ViroAS','Filter\x20dataset\x20records\x20with\x20query\x20conditions','138051mByrsr','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','3ukzeiv','1649950ZjlMnS','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','\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}]','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','1592804qKAtWW','filter','join'];a46_0x28ba=function(){return _0x515450;};return a46_0x28ba();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a47_0xfeac(_0x23ea79,_0x3b5189){_0x23ea79=_0x23ea79-0x16f;const _0x916bfc=a47_0x916b();let _0xfeacd=_0x916bfc[_0x23ea79];return _0xfeacd;}const a47_0x3b2a7d=a47_0xfeac;(function(_0x3fa305,_0x46460e){const _0x32da83=a47_0xfeac,_0x439097=_0x3fa305();while(!![]){try{const _0x34b978=-parseInt(_0x32da83(0x176))/0x1*(-parseInt(_0x32da83(0x179))/0x2)+parseInt(_0x32da83(0x171))/0x3+-parseInt(_0x32da83(0x173))/0x4+parseInt(_0x32da83(0x175))/0x5+-parseInt(_0x32da83(0x170))/0x6*(-parseInt(_0x32da83(0x17b))/0x7)+parseInt(_0x32da83(0x174))/0x8*(-parseInt(_0x32da83(0x16f))/0x9)+parseInt(_0x32da83(0x172))/0xa*(-parseInt(_0x32da83(0x177))/0xb);if(_0x34b978===_0x46460e)break;else _0x439097['push'](_0x439097['shift']());}catch(_0x1463a3){_0x439097['push'](_0x439097['shift']());}}}(a47_0x916b,0x49a73));function a47_0x916b(){const _0x1dde3b=['getOne','1947064WjhamP','1538622LBQYfx','6HLnCUh','545235zXXmUl','22690vpQcIn','1258860UazoUc','16aBjPHk','2248600LImNKU','62311fOUnty','66ZBDrqj','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','2dGKGSg'];a47_0x916b=function(){return _0x1dde3b;};return a47_0x916b();}import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a47_0x3b2a7d(0x17a),'operation':'getOne','description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsRequired':!![],'paramsHint':a47_0x3b2a7d(0x178)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x197f0e,_0xd1e8e7){const _0x15e04d=a48_0x4ea7,_0x912668=_0x197f0e();while(!![]){try{const _0x59338e=-parseInt(_0x15e04d(0x1ee))/0x1*(-parseInt(_0x15e04d(0x1f7))/0x2)+-parseInt(_0x15e04d(0x1f0))/0x3*(parseInt(_0x15e04d(0x1f9))/0x4)+-parseInt(_0x15e04d(0x1ef))/0x5*(parseInt(_0x15e04d(0x1f5))/0x6)+parseInt(_0x15e04d(0x1f8))/0x7*(-parseInt(_0x15e04d(0x1f4))/0x8)+-parseInt(_0x15e04d(0x1f2))/0x9+-parseInt(_0x15e04d(0x1f3))/0xa+-parseInt(_0x15e04d(0x1f1))/0xb*(-parseInt(_0x15e04d(0x1f6))/0xc);if(_0x59338e===_0xd1e8e7)break;else _0x912668['push'](_0x912668['shift']());}catch(_0x18ab61){_0x912668['push'](_0x912668['shift']());}}}(a48_0x11cf,0x950ec));function a48_0x4ea7(_0x38eb4d,_0x34dfc4){_0x38eb4d=_0x38eb4d-0x1ee;const _0x11cfa5=a48_0x11cf();let _0x4ea75a=_0x11cfa5[_0x38eb4d];return _0x4ea75a;}function a48_0x11cf(){const _0x4a1555=['341NLkryg','4584537SAmJAU','2214800mphSQf','12984GIciIB','30vibTQz','1041204guSCmJ','780232EghmPK','4599TJhJDc','4beviMh','2OYGMBY','690785kPPwgo','1114500KrmGok'];a48_0x11cf=function(){return _0x4a1555;};return a48_0x11cf();}import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a49_0x3246(_0x1e95e4,_0x4a2859){_0x1e95e4=_0x1e95e4-0x113;const _0x40e0e3=a49_0x40e0();let _0x324641=_0x40e0e3[_0x1e95e4];return _0x324641;}(function(_0x534e68,_0x10eae8){const _0x4935b8=a49_0x3246,_0xbea19c=_0x534e68();while(!![]){try{const _0x3046ea=-parseInt(_0x4935b8(0x11c))/0x1*(parseInt(_0x4935b8(0x113))/0x2)+parseInt(_0x4935b8(0x11e))/0x3+-parseInt(_0x4935b8(0x12b))/0x4+parseInt(_0x4935b8(0x11a))/0x5+-parseInt(_0x4935b8(0x12d))/0x6*(parseInt(_0x4935b8(0x115))/0x7)+-parseInt(_0x4935b8(0x116))/0x8+parseInt(_0x4935b8(0x118))/0x9*(parseInt(_0x4935b8(0x11d))/0xa);if(_0x3046ea===_0x10eae8)break;else _0xbea19c['push'](_0xbea19c['shift']());}catch(_0x83910e){_0xbea19c['push'](_0xbea19c['shift']());}}}(a49_0x40e0,0x6613d));import{executeDatasetDataOperation}from'../../core/api-client.js';function a49_0x40e0(){const _0x1a8b10=['operation','4535988PPCdZZ','str','now','256762DVQIsY','data','7ROmspY','3860752CBozrj','alias','96291npTjQl','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','3617305ixkjjm','flagMissing','1ljYhpQ','1040XJanNz','1205538NIGErX','validation','string','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','compress','command','helpExtra','description','params','data\x20','read','appCode','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','1811684ZEcxSM'];a49_0x40e0=function(){return _0x1a8b10;};return a49_0x40e0();}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x6d0f90){const _0x2a36d1=a49_0x3246;if(!_0x6d0f90)throw CliErrors['flagMissing'](_0x2a36d1(0x126),_0x2a36d1(0x119));const _0x42b95f=_0x6d0f90['id'];if(_0x42b95f===undefined||_0x42b95f===null||_0x42b95f==='')throw CliErrors[_0x2a36d1(0x11f)](_0x2a36d1(0x121),'Example:\x20--params\x20\x27{\x22id\x22:123}\x27');}function parseCommandParams(_0x3ee29d){return parseJsonParams(_0x3ee29d)??{};}export function buildDataCommand(_0x20c90d){const _0x3040f6=a49_0x3246,_0x2660e9=_0x3040f6(0x12a);return{'service':_0x3040f6(0x114),'command':_0x20c90d[_0x3040f6(0x123)],'description':_0x20c90d[_0x3040f6(0x125)],'risk':_0x3040f6(0x128),'defaultOutputFormat':_0x3040f6(0x122),'helpExtra':_0x20c90d[_0x3040f6(0x124)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x3040f6(0x117),'type':_0x3040f6(0x120),'description':_0x2660e9},{'name':'params','type':_0x3040f6(0x120),'description':_0x20c90d['paramsHint']}],async 'validate'(_0x532dac){const _0x364a94=_0x3040f6,_0xac7642=_0x532dac[_0x364a94(0x12e)](_0x364a94(0x126));if(_0x20c90d['paramsRequired']&&!_0xac7642)throw CliErrors[_0x364a94(0x11b)](_0x364a94(0x126),_0x20c90d['paramsHint']);const _0x1a2c36=parseJsonParams(_0xac7642);_0x20c90d[_0x364a94(0x12c)]==='getOne'&&assertGetOneId(_0x1a2c36);},async 'execute'(_0xb3a407){const _0x109c6b=_0x3040f6,_0x55ec54=parseCommandParams(_0xb3a407[_0x109c6b(0x12e)]('params')),_0x269381=Date[_0x109c6b(0x12f)](),_0x3d8725=await executeDatasetDataOperation(_0xb3a407[_0x109c6b(0x129)],_0xb3a407[_0x109c6b(0x12e)]('code'),_0x20c90d['operation'],_0x55ec54),_0x29dc42=Date[_0x109c6b(0x12f)]()-_0x269381;return{'ok':!![],'data':{'result':_0x3d8725,'elapsed':_0x29dc42},'message':_0x109c6b(0x127)+_0x20c90d[_0x109c6b(0x123)]+'\x20completed\x20in\x20'+_0x29dc42+'ms'};}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x5b69ea=a50_0x1d70;(function(_0x3500bf,_0x2f73d7){const _0x3aaf9a=a50_0x1d70,_0x31dbe9=_0x3500bf();while(!![]){try{const _0x86550a=-parseInt(_0x3aaf9a(0x1e7))/0x1*(-parseInt(_0x3aaf9a(0x1e6))/0x2)+parseInt(_0x3aaf9a(0x1ee))/0x3+-parseInt(_0x3aaf9a(0x1de))/0x4+-parseInt(_0x3aaf9a(0x1f2))/0x5*(parseInt(_0x3aaf9a(0x1e1))/0x6)+parseInt(_0x3aaf9a(0x1d5))/0x7+parseInt(_0x3aaf9a(0x1ed))/0x8*(parseInt(_0x3aaf9a(0x1ef))/0x9)+parseInt(_0x3aaf9a(0x1e0))/0xa*(-parseInt(_0x3aaf9a(0x1ec))/0xb);if(_0x86550a===_0x2f73d7)break;else _0x31dbe9['push'](_0x31dbe9['shift']());}catch(_0x3e7b16){_0x31dbe9['push'](_0x31dbe9['shift']());}}}(a50_0xafb6,0x55790));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a50_0x5b69ea(0x1f7),'filter':a50_0x5b69ea(0x1d9),'getOne':'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress'};function a50_0x1d70(_0x3ec946,_0x28d852){_0x3ec946=_0x3ec946-0x1d1;const _0xafb6c7=a50_0xafb6();let _0x1d7062=_0xafb6c7[_0x3ec946];return _0x1d7062;}export const RUNTIME_DATA_ACCESS_SUMMARY=a50_0x5b69ea(0x1db);function valueToString(_0x1c5a18){const _0x3bfb91=a50_0x5b69ea;return _0x1c5a18==null?'':String(_0x1c5a18)[_0x3bfb91(0x1da)]();}function getDatasetCode(_0x594491){const _0xe27c93=a50_0x5b69ea;return valueToString(_0x594491[_0xe27c93(0x1df)]??_0x594491[_0xe27c93(0x1d8)]??_0x594491[_0xe27c93(0x1eb)]?.['datasetCode']);}function getDatasetName(_0x13be94){const _0x1d2720=a50_0x5b69ea;return valueToString(_0x13be94[_0x1d2720(0x1f3)]??_0x13be94[_0x1d2720(0x1eb)]?.[_0x1d2720(0x1f1)])||_0x1d2720(0x1d2);}function a50_0xafb6(){const _0x46d5ee=['length','METADATA','2588208PIydPh','BFF\x20/\x20SQL\x20等研发态资产','原因:该类研发态资产需要\x20DB\x20table、dbId、tableName\x20与数据库连接上下文,并深度依赖\x20SQL\x20执行链路。','modelCode','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','trim','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','getOne','UNKNOWN','1650268MkXLGx','code','10vjsJUe','4386OGNaKk','dbId','dbtable','\x20的数据源。','tableName','88qNBloH','13954IWUVTf','请先将该数据集升级/迁移为\x20DB\x20table\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','当前数据集\x20\x22','dataset','5312351eaxGhd','8lemoyh','1027479FIQJHU','4162716VjWiOu','join','datasetName','3715RrIXpt','name','toUpperCase','object','\x20类型,不适合作为\x20','lovrabet','sourceType','source','unknown'];a50_0xafb6=function(){return _0x46d5ee;};return a50_0xafb6();}function getDatasetSource(_0x2d7813){const _0x2f5b3e=a50_0x5b69ea;return valueToString(_0x2d7813[_0x2f5b3e(0x1d1)]??_0x2d7813[_0x2f5b3e(0x1eb)]?.[_0x2f5b3e(0x1f8)])[_0x2f5b3e(0x1f4)]();}function getDbtableConfig(_0x55db3b){const _0x26e332=a50_0x5b69ea,_0x146855=_0x55db3b['dbtableConfig']??_0x55db3b[_0x26e332(0x1e3)];return _0x146855&&typeof _0x146855===_0x26e332(0x1f5)?_0x146855:{};}export function isDbBackedDataset(_0xeb3873){const _0xf3667a=a50_0x5b69ea,_0x115d87=getDatasetSource(_0xeb3873);if(_0x115d87===_0xf3667a(0x1d4))return![];const _0x84c716=getDbtableConfig(_0xeb3873),_0xf681cf=_0x84c716[_0xf3667a(0x1e2)]??_0x84c716['id'],_0x5383b3=valueToString(_0x84c716['tableName']??_0xeb3873[_0xf3667a(0x1e5)]??_0xeb3873['dataset']?.[_0xf3667a(0x1e5)]);return _0xf681cf!==undefined&&_0xf681cf!==null&&_0x5383b3[_0xf3667a(0x1d3)]>0x0;}export function filterDbBackedDatasets(_0x1a6823){return _0x1a6823['filter'](_0x2468d5=>isDbBackedDataset(_0x2468d5));}export function buildDbTableUpgradeMessage(_0x411a9d,_0x168858=a50_0x5b69ea(0x1d6)){const _0x4db2f8=a50_0x5b69ea,_0x1d6f6d=getDatasetSource(_0x411a9d)||_0x4db2f8(0x1dd),_0x23d225=getDatasetName(_0x411a9d),_0x299bae=getDatasetCode(_0x411a9d),_0x13dd82=_0x299bae?'\x20('+_0x299bae+')':'';return[_0x4db2f8(0x1ea)+_0x23d225+'\x22'+_0x13dd82+'\x20是\x20'+_0x1d6f6d+_0x4db2f8(0x1f6)+_0x168858+_0x4db2f8(0x1e4),_0x4db2f8(0x1d7),_0x4db2f8(0x1e8),_0x4db2f8(0x1e9)+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x4db2f8(0x1dc)]+'。'][_0x4db2f8(0x1f0)]('\x20');}export function assertDatasetSupportsLocalDevelopment(_0x54eef4,_0x4542ed){if(!isDbBackedDataset(_0x54eef4))throw CliErrors['validation'](buildDbTableUpgradeMessage(_0x54eef4,_0x4542ed));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a51_0x2bce67=a51_0x4ee6;(function(_0xd144c5,_0x124432){const _0x13c015=a51_0x4ee6,_0x47a280=_0xd144c5();while(!![]){try{const _0xa317cb=parseInt(_0x13c015(0x1dc))/0x1*(parseInt(_0x13c015(0x1b6))/0x2)+-parseInt(_0x13c015(0x1c9))/0x3+parseInt(_0x13c015(0x1bd))/0x4+parseInt(_0x13c015(0x1dd))/0x5+parseInt(_0x13c015(0x1b5))/0x6*(-parseInt(_0x13c015(0x1be))/0x7)+-parseInt(_0x13c015(0x1b4))/0x8*(-parseInt(_0x13c015(0x1cb))/0x9)+-parseInt(_0x13c015(0x1c2))/0xa;if(_0xa317cb===_0x124432)break;else _0x47a280['push'](_0x47a280['shift']());}catch(_0xa70f34){_0x47a280['push'](_0x47a280['shift']());}}}(a51_0x1962,0x8c3fe));import{deleteDataset,listDatasets}from'../../core/api-client.js';function a51_0x4ee6(_0x3f1ce5,_0x1cda82){_0x3f1ce5=_0x3f1ce5-0x1b4;const _0x1962ec=a51_0x1962();let _0x4ee697=_0x1962ec[_0x3f1ce5];return _0x4ee697;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a51_0x2bce67(0x1b8),'description':'Dataset\x20id'},DBID_FLAG={'name':a51_0x2bce67(0x1cd),'type':'number','description':a51_0x2bce67(0x1cc)},CONFIRM_FLAG={'name':a51_0x2bce67(0x1e0),'type':'boolean','description':'Required\x20to\x20execute\x20dataset\x20deletion'},EXPECTED_COUNT_FLAG={'name':'expected-count','type':'number','description':a51_0x2bce67(0x1c8)};function a51_0x1962(){const _0x255b70=['number','\x20dataset(s);\x20','description','isArray','tableName','3285236ohFJwM','1573663ykTWiv','push','name','validation','12584460bAygHB','code','Deleted\x20','dbtableConfig','delete','dataset','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','2449626Rslgim','No\x20undeleted\x20dataset\x20found\x20for\x20','1289097iWBQXw','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','dbid','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','num','relationPages','appCode','source','filter','str','id=','dbId','\x20failed','length','Would\x20delete\x20','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','1NSfeaT','4941635aAglPO','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','/smartapi/dataset/delete-dataset','confirm','8Hlqgmk','12yzxshL','2292398eLCfsC','expected-count'];a51_0x1962=function(){return _0x255b70;};return a51_0x1962();}export const datasetDelete={'service':a51_0x2bce67(0x1c7),'command':a51_0x2bce67(0x1c6),'description':'Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','risk':'high-risk-write','flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x291b6f){const _0x29a696=a51_0x2bce67,_0x5dd17e=_0x291b6f[_0x29a696(0x1d0)]('id'),_0x11a812=_0x291b6f[_0x29a696(0x1d5)]('code'),_0x48bbc7=_0x291b6f['num']('dbid'),_0x1dacbd=[_0x5dd17e>0x0,Boolean(_0x11a812),_0x48bbc7>0x0][_0x29a696(0x1d4)](Boolean);if(_0x1dacbd[_0x29a696(0x1d9)]===0x0)throw CliErrors[_0x29a696(0x1c1)]('One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.');if(_0x1dacbd[_0x29a696(0x1d9)]>0x1)throw CliErrors[_0x29a696(0x1c1)]('Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.');},async 'dryRun'(_0x8d895c){const _0x18a8b4=a51_0x2bce67,_0x4ddf96=await resolveTargets(_0x8d895c);return{'method':'POST','url':_0x18a8b4(0x1df),'body':{'appCode':_0x8d895c[_0x18a8b4(0x1d2)],'count':_0x4ddf96[_0x18a8b4(0x1d9)],'datasets':_0x4ddf96},'description':_0x18a8b4(0x1da)+_0x4ddf96[_0x18a8b4(0x1d9)]+_0x18a8b4(0x1ce)};},async 'execute'(_0x3f9ee0){const _0x2d2cfc=a51_0x2bce67;if(!_0x3f9ee0['bool']('confirm'))throw CliErrors[_0x2d2cfc(0x1c1)](_0x2d2cfc(0x1db),_0x2d2cfc(0x1de));const _0x49e96f=await resolveTargets(_0x3f9ee0),_0x22a37a=[],_0x28ec35=[];for(const _0x197999 of _0x49e96f){try{await deleteDataset(_0x3f9ee0[_0x2d2cfc(0x1d2)],_0x197999['id']),_0x22a37a[_0x2d2cfc(0x1bf)](_0x197999);}catch(_0xe17bab){_0x28ec35[_0x2d2cfc(0x1bf)]({..._0x197999,'error':_0xe17bab instanceof Error?_0xe17bab['message']:String(_0xe17bab)});}}if(_0x28ec35[_0x2d2cfc(0x1d9)]>0x0)return{'ok':![],'data':{'requested':_0x49e96f[_0x2d2cfc(0x1d9)],'deletedCount':_0x22a37a[_0x2d2cfc(0x1d9)],'failedCount':_0x28ec35[_0x2d2cfc(0x1d9)],'deleted':_0x22a37a,'failed':_0x28ec35},'message':_0x2d2cfc(0x1c4)+_0x22a37a[_0x2d2cfc(0x1d9)]+'/'+_0x49e96f[_0x2d2cfc(0x1d9)]+_0x2d2cfc(0x1b9)+_0x28ec35[_0x2d2cfc(0x1d9)]+_0x2d2cfc(0x1d8)};return{'ok':!![],'data':{'requested':_0x49e96f['length'],'deletedCount':_0x22a37a[_0x2d2cfc(0x1d9)],'deleted':_0x22a37a},'message':_0x2d2cfc(0x1c4)+_0x22a37a[_0x2d2cfc(0x1d9)]+'\x20dataset(s)'};}};async function resolveTargets(_0x3ab429){const _0x360045=a51_0x2bce67,_0x18151b=_0x3ab429[_0x360045(0x1d0)]('id'),_0x4e7cd3=_0x3ab429[_0x360045(0x1d5)](_0x360045(0x1c3)),_0x5e49b2=_0x3ab429[_0x360045(0x1d0)](_0x360045(0x1cd));let _0x4810e1;_0x4e7cd3?(_0x4810e1=await listDatasets(_0x3ab429[_0x360045(0x1d2)],{'code':_0x4e7cd3}),_0x4810e1=_0x4810e1[_0x360045(0x1d4)](_0x2cf24e=>_0x2cf24e[_0x360045(0x1c3)]===_0x4e7cd3)):(_0x4810e1=await listDatasets(_0x3ab429[_0x360045(0x1d2)]),_0x18151b>0x0&&(_0x4810e1=_0x4810e1[_0x360045(0x1d4)](_0x68505d=>_0x68505d['id']===_0x18151b)),_0x5e49b2>0x0&&(_0x4810e1=_0x4810e1['filter'](_0xa1aec9=>_0xa1aec9[_0x360045(0x1c5)]?.[_0x360045(0x1d7)]===_0x5e49b2)));const _0x3a1566=_0x4810e1['map'](normalizeTarget);if(_0x3a1566['length']===0x0){const _0x3a2a08=_0x4e7cd3||(_0x18151b>0x0?_0x360045(0x1d6)+_0x18151b:'dbid='+_0x5e49b2);throw CliErrors[_0x360045(0x1c1)](_0x360045(0x1ca)+_0x3a2a08+'.');}const _0x3e40c7=_0x3ab429[_0x360045(0x1d0)](_0x360045(0x1b7));if(_0x3e40c7>0x0&&_0x3a1566[_0x360045(0x1d9)]!==_0x3e40c7)throw CliErrors['validation']('Matched\x20'+_0x3a1566[_0x360045(0x1d9)]+_0x360045(0x1cf)+_0x3e40c7+'.');return _0x3a1566;}function normalizeTarget(_0x58426a){const _0x257c3a=a51_0x2bce67,_0x207b45=_0x58426a[_0x257c3a(0x1c5)]??{};return{'id':_0x58426a['id'],'code':_0x58426a[_0x257c3a(0x1c3)],'name':_0x58426a[_0x257c3a(0x1c0)],'description':_0x58426a[_0x257c3a(0x1ba)],'source':_0x58426a[_0x257c3a(0x1d3)],'dbId':_0x207b45[_0x257c3a(0x1d7)],'dbName':_0x207b45['dbName'],'tableName':_0x207b45[_0x257c3a(0x1bc)],'relatedPageCount':Array[_0x257c3a(0x1bb)](_0x58426a[_0x257c3a(0x1d1)])?_0x58426a[_0x257c3a(0x1d1)][_0x257c3a(0x1d9)]:undefined};}
|