@lovrabet/rabetbase-cli 2.1.9 → 2.1.10-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/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -0
- 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 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x3f6998=a33_0x4332;(function(_0x5b0ff8,_0x476050){const _0x575679=a33_0x4332,_0x5dd7d3=_0x5b0ff8();while(!![]){try{const _0x432f95=-parseInt(_0x575679(0x142))/0x1+parseInt(_0x575679(0x137))/0x2+-parseInt(_0x575679(0x133))/0x3+parseInt(_0x575679(0x144))/0x4+-parseInt(_0x575679(0x146))/0x5*(-parseInt(_0x575679(0x14a))/0x6)+-parseInt(_0x575679(0x12f))/0x7*(parseInt(_0x575679(0x132))/0x8)+parseInt(_0x575679(0x13d))/0x9;if(_0x432f95===_0x476050)break;else _0x5dd7d3['push'](_0x5dd7d3['shift']());}catch(_0x4477c3){_0x5dd7d3['push'](_0x5dd7d3['shift']());}}}(a33_0x4077,0x7ce8f));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a33_0x4332(_0x4ffdbc,_0x190bbd){_0x4ffdbc=_0x4ffdbc-0x12f;const _0x4077bb=a33_0x4077();let _0x433255=_0x4077bb[_0x4ffdbc];return _0x433255;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';function a33_0x4077(){const _0x443a0d=['11593467yiyyWU','lockKey','bool','length','bff','50361uzSPhz','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','257020QXWAVL','read','25rKOnAv','has','\x20modified,\x20','status','235326WdnmZQ','functions','map','filePath','2338chwTdE','\x20unchanged','remote','13304KfBxAD','2635839IkqkFb','\x20remote-only','push','scriptsRoot','895048dZCDUz','appCode','apiDir','hash','\x20added,\x20','boolean'];a33_0x4077=function(){return _0x443a0d;};return a33_0x4077();}export const bffStatus={'service':a33_0x3f6998(0x141),'command':'status','description':'Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','risk':a33_0x3f6998(0x145),'flags':[{'name':a33_0x3f6998(0x131),'type':a33_0x3f6998(0x13c),'description':a33_0x3f6998(0x143)}],async 'execute'(_0x532eb7){const _0x8ca5b6=a33_0x3f6998,_0x5da7a8=loadBffProjectConfig(_0x532eb7[_0x8ca5b6(0x138)]),_0xe3e499=await readBffLockFile(_0x5da7a8['lockFilePath']),{appLock:_0x5d61b9}=ensureLockScope(_0xe3e499??createEmptyBffLock(),_0x532eb7[_0x8ca5b6(0x138)],_0x5da7a8[_0x8ca5b6(0x136)],_0x8ca5b6(0x149)),_0x14d7ad=await scanLocalBffFunctions(_0x5da7a8),_0x40ae75=[],_0x4235fd=[],_0x7f50b=[];for(const _0xe024b2 of _0x14d7ad){const _0x363ec4=await computeFileHash(_0xe024b2[_0x8ca5b6(0x14d)]),_0x2980dc=_0x5d61b9[_0x8ca5b6(0x14b)][_0xe024b2[_0x8ca5b6(0x13e)]];if(!_0x2980dc)_0x40ae75[_0x8ca5b6(0x135)](_0xe024b2[_0x8ca5b6(0x13e)]);else _0x2980dc[_0x8ca5b6(0x13a)]!==_0x363ec4?_0x4235fd[_0x8ca5b6(0x135)](_0xe024b2[_0x8ca5b6(0x13e)]):_0x7f50b[_0x8ca5b6(0x135)](_0xe024b2[_0x8ca5b6(0x13e)]);}const _0x449a91=[];if(_0x532eb7[_0x8ca5b6(0x13f)](_0x8ca5b6(0x131))){const _0x2bf677=loadAliasMap(_0x532eb7[_0x8ca5b6(0x139)],undefined,resolveApiFilePath(_0x532eb7[_0x8ca5b6(0x139)],_0x532eb7['appCode'])),_0x3fd8a0=new Map(_0x2bf677[_0x8ca5b6(0x14c)](_0x1a3865=>[_0x1a3865['datasetCode'],_0x1a3865['alias']])),[_0xd8e93f,_0x5dc883]=await Promise['all']([listBffScripts(_0x532eb7[_0x8ca5b6(0x138)]),getBffScriptStatistics(_0x532eb7[_0x8ca5b6(0x138)])]),_0x4b7d6c=createHookLocationMap(_0x5dc883),_0x5f4849=new Set(_0x14d7ad[_0x8ca5b6(0x14c)](_0xb3c0c=>_0xb3c0c[_0x8ca5b6(0x13e)]));for(const _0x897067 of _0xd8e93f){const _0x53f7c6=resolveRemoteScriptTarget(_0x5da7a8,_0x897067,_0x4b7d6c,_0x5d61b9[_0x8ca5b6(0x14b)],_0x3fd8a0);_0x53f7c6&&!_0x5f4849[_0x8ca5b6(0x147)](_0x53f7c6[_0x8ca5b6(0x13e)])&&_0x449a91[_0x8ca5b6(0x135)](_0x53f7c6[_0x8ca5b6(0x13e)]);}}const _0xcfde6f=_0x40ae75['length']===0x0&&_0x4235fd[_0x8ca5b6(0x140)]===0x0&&_0x449a91[_0x8ca5b6(0x140)]===0x0;return{'ok':!![],'data':{'added':_0x40ae75,'modified':_0x4235fd,'unchanged':_0x7f50b,'remoteOnly':_0x449a91},'message':_0xcfde6f?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x40ae75[_0x8ca5b6(0x140)]+_0x8ca5b6(0x13b)+_0x4235fd[_0x8ca5b6(0x140)]+_0x8ca5b6(0x148)+_0x7f50b['length']+_0x8ca5b6(0x130)+(_0x449a91[_0x8ca5b6(0x140)]>0x0?',\x20'+_0x449a91[_0x8ca5b6(0x140)]+_0x8ca5b6(0x134):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a34_0xf241af=a34_0x41a9;(function(_0x2f3f97,_0x149f9c){const _0x26aeeb=a34_0x41a9,_0x2790b9=_0x2f3f97();while(!![]){try{const _0x19620a=-parseInt(_0x26aeeb(0x15f))/0x1*(-parseInt(_0x26aeeb(0x147))/0x2)+parseInt(_0x26aeeb(0x150))/0x3+parseInt(_0x26aeeb(0x151))/0x4+parseInt(_0x26aeeb(0x132))/0x5+parseInt(_0x26aeeb(0x16f))/0x6*(-parseInt(_0x26aeeb(0x13c))/0x7)+-parseInt(_0x26aeeb(0x14a))/0x8+-parseInt(_0x26aeeb(0x146))/0x9;if(_0x19620a===_0x149f9c)break;else _0x2790b9['push'](_0x2790b9['shift']());}catch(_0x1ae1fe){_0x2790b9['push'](_0x2790b9['shift']());}}}(a34_0x5226,0xadc92));import a34_0x4259b9 from'chalk';import a34_0x2b80e1 from'ora';import a34_0x181d39 from'semver';function a34_0x41a9(_0x36f87e,_0x26ac8c){_0x36f87e=_0x36f87e-0x12d;const _0x52263c=a34_0x5226();let _0x41a952=_0x52263c[_0x36f87e];return _0x41a952;}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 _0x39a8d0=a34_0x41a9;return GIT_COMMIT!==_0x39a8d0(0x16d)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x39a8d0(0x170)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x4068b6=a34_0x41a9,_0x225fcc=process[_0x4068b6(0x15b)][_0x4068b6(0x15a)]();if(_0x225fcc['includes'](_0x4068b6(0x164)))return _0x4068b6(0x164);return _0x4068b6(0x152);}const updateFlags=[{'name':'beta','type':a34_0xf241af(0x135),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a34_0xf241af(0x138),'type':'string','description':a34_0xf241af(0x168)},{'name':a34_0xf241af(0x12e),'type':a34_0xf241af(0x135),'description':a34_0xf241af(0x16b),'default':![]},{'name':'skills','type':a34_0xf241af(0x135),'description':a34_0xf241af(0x174),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x2530b4){const _0x2b99ff=a34_0xf241af;return _0x2530b4['str'](_0x2b99ff(0x138))['trim']();}function shouldSkipOfficialSkill(_0x153bc8){const _0x2f82b2=a34_0xf241af;return _0x153bc8['bool']('no-skills')||_0x153bc8[_0x2f82b2(0x16a)](_0x2f82b2(0x162))===![];}async function validateUpdateFlags(_0x5d2aea){const _0x229868=a34_0xf241af,_0x5f4b41=_0x5d2aea[_0x229868(0x158)](_0x229868(0x133)),_0x28e028=getRequestedVersion(_0x5d2aea);if(_0x5f4b41&&_0x28e028)throw CliErrors[_0x229868(0x163)](_0x229868(0x14b),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x28e028&&!a34_0x181d39[_0x229868(0x141)](_0x28e028))throw CliErrors[_0x229868(0x163)]('Invalid\x20version:\x20'+_0x28e028,_0x229868(0x140));}async function fetchNpmDistTags(){const _0x5f3895=a34_0xf241af;try{const _0x2f1321=await fetch(_0x5f3895(0x15d)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x5f3895(0x14e),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x2f1321['ok'])return null;const _0xaa0f3e=await _0x2f1321[_0x5f3895(0x13f)]();if(!_0xaa0f3e||typeof _0xaa0f3e!==_0x5f3895(0x136))return null;return Object[_0x5f3895(0x16e)](Object['entries'](_0xaa0f3e)[_0x5f3895(0x161)](([,_0x200e76])=>typeof _0x200e76===_0x5f3895(0x172)&&_0x200e76[_0x5f3895(0x130)]()[_0x5f3895(0x144)]>0x0)[_0x5f3895(0x173)](([_0x4ecdde,_0x5b3c00])=>[_0x4ecdde,String(_0x5b3c00)[_0x5f3895(0x130)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x128257){const _0x5f5a00=await fetchNpmDistTags();return _0x5f5a00?.[_0x128257]??null;}function a34_0x5226(){const _0x1bebc0=['warn','Version\x20comparison\x20failed','2450651pyujPw','Already\x20on\x20requested\x20version\x20(v','Update\x20available:\x20','json','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','valid','Requested\x20version:\x20','...','length','info','18439821drTXqI','2XYAOSo','gray','log','2893640kIezmh','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','message','stableVersion','/dist-tags','Checking\x20for\x20updates...','3838707QGsyuV','2839296oSGQyw','npm','source','error','update','\x20\x20Official\x20skill\x20update\x20failed:\x20','red','bool','cwd','toLowerCase','execPath','write','https://registry.npmjs.org/-/package/','start','981478eDyjlj','fail','filter','skills','validation','bun','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','succeed','\x20→\x20','Install\x20a\x20specific\x20CLI\x20version','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','flag','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','green','unknown','fromEntries','12FLIFTR','slice','run','string','map','Refresh\x20official\x20skill\x20package\x20after\x20updating','@latest','\x20\x20Run\x20manually:\x20','no-skills','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','trim','latest','4258575YhwxWh','beta','Checking\x20official\x20skill\x20package...','boolean','object','yellow','version','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'];a34_0x5226=function(){return _0x1bebc0;};return a34_0x5226();}async function fetchLatestVersion(){const _0x600aef=a34_0xf241af,_0x5e84a7=await fetchNpmDistTagVersion(_0x600aef(0x131));if(_0x5e84a7)return _0x5e84a7;const _0x143288=await getCdnConfig();return _0x143288?.['cli']?.[_0x600aef(0x14d)]??null;}async function resolveTargetVersion(_0x175c75){const _0xef77b6=a34_0xf241af,_0x7727cf=getRequestedVersion(_0x175c75);if(_0x7727cf)return{'version':_0x7727cf,'source':_0xef77b6(0x138)};if(_0x175c75[_0xef77b6(0x158)](_0xef77b6(0x133))){const _0x39a0f2=await fetchNpmDistTagVersion(_0xef77b6(0x133));if(!_0x39a0f2)return null;return{'version':_0x39a0f2,'source':_0xef77b6(0x133)};}const _0x21c7d6=await fetchLatestVersion();if(!_0x21c7d6)return null;return{'version':_0x21c7d6,'source':'latest'};}function shouldInstallTarget(_0x2deb05,_0x1c6ffb){const _0x521344=a34_0xf241af;if(_0x1c6ffb[_0x521344(0x153)]===_0x521344(0x138)||_0x1c6ffb[_0x521344(0x153)]===_0x521344(0x133))return!a34_0x181d39['eq'](_0x2deb05,_0x1c6ffb[_0x521344(0x138)]);return a34_0x181d39['lt'](_0x2deb05,_0x1c6ffb[_0x521344(0x138)]);}function getInstallPlanLabel(_0x4152ef,_0x286f5e){const _0x3c8328=a34_0xf241af;switch(_0x286f5e[_0x3c8328(0x153)]){case'beta':return'Beta\x20version:\x20'+a34_0x4259b9[_0x3c8328(0x137)](_0x4152ef)+'\x20→\x20'+a34_0x4259b9[_0x3c8328(0x16c)](_0x286f5e[_0x3c8328(0x138)]);case _0x3c8328(0x138):return _0x3c8328(0x142)+a34_0x4259b9[_0x3c8328(0x137)](_0x4152ef)+_0x3c8328(0x167)+a34_0x4259b9[_0x3c8328(0x16c)](_0x286f5e[_0x3c8328(0x138)]);case'latest':default:return _0x3c8328(0x13e)+a34_0x4259b9[_0x3c8328(0x137)](_0x4152ef)+_0x3c8328(0x167)+a34_0x4259b9[_0x3c8328(0x16c)](_0x286f5e[_0x3c8328(0x138)]);}}async function installOfficialSkill(_0x570c2d){const _0x42e21a=a34_0xf241af;console['log'](a34_0x4259b9[_0x42e21a(0x148)](_0x42e21a(0x134)));const _0x2c9d3c=runNpxSkillsAddGlobal(process[_0x42e21a(0x159)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x570c2d?'pipe':'inherit'});if(_0x2c9d3c['skipped']){console[_0x42e21a(0x149)](a34_0x4259b9['gray'](_0x42e21a(0x12f)));return;}if(_0x2c9d3c['ok']){console['log'](a34_0x4259b9['gray']('\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.'));return;}console[_0x42e21a(0x13a)](a34_0x4259b9['yellow'](_0x42e21a(0x156)+(_0x2c9d3c[_0x42e21a(0x154)]||_0x42e21a(0x16d)))),console['log'](a34_0x4259b9[_0x42e21a(0x148)](_0x42e21a(0x12d)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x382db7){const _0x228578=a34_0xf241af;await validateUpdateFlags(_0x382db7);const _0x3c6bad=getCurrentVersion();console['log']('Current\x20version:\x20'+_0x3c6bad);const _0x5975e1=a34_0x2b80e1(_0x228578(0x14f))[_0x228578(0x15e)](),_0x35064d=await resolveTargetVersion(_0x382db7);if(!_0x35064d){const _0x53efcd=_0x382db7[_0x228578(0x158)](_0x228578(0x133))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x228578(0x165);return _0x5975e1[_0x228578(0x160)](_0x53efcd),console[_0x228578(0x149)](a34_0x4259b9[_0x228578(0x148)](_0x228578(0x139)+NPM_PACKAGE_NAME+_0x228578(0x175))),{'ok':![],'message':_0x53efcd};}const _0xc07bd4=a34_0x181d39[_0x228578(0x141)](VERSION),_0x4d8118=a34_0x181d39[_0x228578(0x141)](_0x35064d[_0x228578(0x138)]);if(!_0xc07bd4||!_0x4d8118)return _0x5975e1['fail'](_0x228578(0x13b)),{'ok':![],'message':_0x228578(0x13b)};if(!shouldInstallTarget(_0xc07bd4,_0x35064d)){const _0x43897a=_0x35064d[_0x228578(0x153)]===_0x228578(0x138)?_0x228578(0x13d)+_0x35064d[_0x228578(0x138)]+')':'Already\x20up\x20to\x20date\x20(v'+_0x35064d[_0x228578(0x138)]+')';return _0x5975e1[_0x228578(0x166)](_0x43897a),shouldSkipOfficialSkill(_0x382db7)?console['log'](a34_0x4259b9[_0x228578(0x148)]('Skipping\x20official\x20skill\x20package\x20(--no-skills).')):await installOfficialSkill(_0x382db7['nonInteractive']),{'ok':!![]};}_0x5975e1[_0x228578(0x145)](getInstallPlanLabel(_0x3c6bad,_0x35064d));const _0x42d58a=detectPackageManager(),_0x444bb9=_0x42d58a===_0x228578(0x152)?resolveNpmBin('npm'):_0x42d58a,_0x42c50f=a34_0x2b80e1('Updating\x20via\x20'+_0x42d58a+_0x228578(0x143))['start']();try{return await execa(_0x444bb9,['install','-g',NPM_PACKAGE_NAME+'@'+_0x35064d[_0x228578(0x138)]],{'stdio':'pipe'}),_0x42c50f[_0x228578(0x166)]('Updated\x20to\x20v'+_0x35064d['version']),console['log'](a34_0x4259b9['gray'](_0x228578(0x169))),shouldSkipOfficialSkill(_0x382db7)?console[_0x228578(0x149)](a34_0x4259b9[_0x228578(0x148)]('Skipping\x20official\x20skill\x20package\x20(--no-skills).')):await installOfficialSkill(_0x382db7['nonInteractive']),{'ok':!![]};}catch(_0x53c5bd){return _0x42c50f[_0x228578(0x160)]('Update\x20failed'),console['error'](a34_0x4259b9[_0x228578(0x157)]('\x20\x20'+_0x53c5bd[_0x228578(0x14c)])),console[_0x228578(0x149)](a34_0x4259b9['gray']('\x20\x20Try\x20manually:\x20'+_0x42d58a+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x35064d[_0x228578(0x138)])),{'ok':![],'message':_0x53c5bd['message']};}}export const updateDefinition={'service':a34_0xf241af(0x155),'command':a34_0xf241af(0x171),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a34_0xf241af(0x15c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a34_0x166949=a34_0x5cfd;(function(_0x2f33e1,_0xaa9066){const _0x22ab8f=a34_0x5cfd,_0x593417=_0x2f33e1();while(!![]){try{const _0x114fe4=-parseInt(_0x22ab8f(0x1cf))/0x1+-parseInt(_0x22ab8f(0x1dc))/0x2+parseInt(_0x22ab8f(0x1d5))/0x3*(-parseInt(_0x22ab8f(0x1fe))/0x4)+-parseInt(_0x22ab8f(0x1f2))/0x5*(-parseInt(_0x22ab8f(0x1fb))/0x6)+-parseInt(_0x22ab8f(0x1b5))/0x7+-parseInt(_0x22ab8f(0x1d1))/0x8*(-parseInt(_0x22ab8f(0x1d2))/0x9)+parseInt(_0x22ab8f(0x1c8))/0xa;if(_0x114fe4===_0xaa9066)break;else _0x593417['push'](_0x593417['shift']());}catch(_0x38b1b4){_0x593417['push'](_0x593417['shift']());}}}(a34_0x4820,0x3105e));import a34_0x316e4a from'chalk';import a34_0x3fe980 from'ora';import a34_0x3e6451 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 _0x1f00e5=a34_0x5cfd;return GIT_COMMIT!==_0x1f00e5(0x1ee)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x159880=a34_0x5cfd,_0x153a06=process[_0x159880(0x1be)][_0x159880(0x1eb)]();if(_0x153a06[_0x159880(0x1bd)](_0x159880(0x1c0)))return _0x159880(0x1c0);return _0x159880(0x1f0);}const updateFlags=[{'name':a34_0x166949(0x1bb),'type':a34_0x166949(0x1d7),'description':a34_0x166949(0x1e0),'default':![]},{'name':a34_0x166949(0x1b7),'type':a34_0x166949(0x1f6),'description':a34_0x166949(0x1b9)},{'name':a34_0x166949(0x1d3),'type':'boolean','description':a34_0x166949(0x1e2),'default':![]},{'name':a34_0x166949(0x1e1),'type':a34_0x166949(0x1d7),'description':a34_0x166949(0x1c2),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x2304c7){const _0x4f383d=a34_0x166949;return _0x2304c7[_0x4f383d(0x1ed)](_0x4f383d(0x1b7))['trim']();}function shouldSkipOfficialSkill(_0x58dc7b){const _0x4fe5c9=a34_0x166949;return _0x58dc7b[_0x4fe5c9(0x1b6)](_0x4fe5c9(0x1d3))||_0x58dc7b[_0x4fe5c9(0x1d8)](_0x4fe5c9(0x1e1))===![];}async function validateUpdateFlags(_0x5e46c5){const _0x2d1235=a34_0x166949,_0x4f22a7=_0x5e46c5[_0x2d1235(0x1b6)](_0x2d1235(0x1bb)),_0x1205b7=getRequestedVersion(_0x5e46c5);if(_0x4f22a7&&_0x1205b7)throw CliErrors[_0x2d1235(0x1cb)](_0x2d1235(0x1d4),_0x2d1235(0x1ef));if(_0x1205b7&&!a34_0x3e6451[_0x2d1235(0x1b2)](_0x1205b7))throw CliErrors['validation'](_0x2d1235(0x1cd)+_0x1205b7,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x9d6f5d=a34_0x166949;try{const _0x29dd6d=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x9d6f5d(0x1ce),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x29dd6d['ok'])return null;const _0x2f576e=await _0x29dd6d[_0x9d6f5d(0x1dd)]();if(!_0x2f576e||typeof _0x2f576e!==_0x9d6f5d(0x1f8))return null;return Object[_0x9d6f5d(0x1db)](Object[_0x9d6f5d(0x1f3)](_0x2f576e)[_0x9d6f5d(0x1ba)](([,_0x50cb08])=>typeof _0x50cb08===_0x9d6f5d(0x1f6)&&_0x50cb08[_0x9d6f5d(0x1fc)]()[_0x9d6f5d(0x1bc)]>0x0)[_0x9d6f5d(0x1d0)](([_0xe2da2a,_0x3f7fb4])=>[_0xe2da2a,String(_0x3f7fb4)[_0x9d6f5d(0x1fc)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x2793e6){const _0x4c6033=await fetchNpmDistTags();return _0x4c6033?.[_0x2793e6]??null;}async function fetchLatestVersion(){const _0x77d595=a34_0x166949,_0xb03ae=await fetchNpmDistTagVersion(_0x77d595(0x1e6));if(_0xb03ae)return _0xb03ae;const _0x414dd4=await getCdnConfig();return _0x414dd4?.['cli']?.[_0x77d595(0x1e8)]??null;}function a34_0x5cfd(_0x2a831c,_0x58820c){_0x2a831c=_0x2a831c-0x1af;const _0x48206f=a34_0x4820();let _0x5cfd0a=_0x48206f[_0x2a831c];return _0x5cfd0a;}async function resolveTargetVersion(_0x42f0d7){const _0x1bfe05=a34_0x166949,_0xc86116=getRequestedVersion(_0x42f0d7);if(_0xc86116)return{'version':_0xc86116,'source':_0x1bfe05(0x1b7)};if(_0x42f0d7[_0x1bfe05(0x1b6)](_0x1bfe05(0x1bb))){const _0x194190=await fetchNpmDistTagVersion(_0x1bfe05(0x1bb));if(!_0x194190)return null;return{'version':_0x194190,'source':_0x1bfe05(0x1bb)};}const _0x3fbcda=await fetchLatestVersion();if(!_0x3fbcda)return null;return{'version':_0x3fbcda,'source':'latest'};}function shouldInstallTarget(_0x5634db,_0x3543d9){const _0x266392=a34_0x166949;if(_0x3543d9[_0x266392(0x1f1)]===_0x266392(0x1b7)||_0x3543d9['source']===_0x266392(0x1bb))return!a34_0x3e6451['eq'](_0x5634db,_0x3543d9['version']);return a34_0x3e6451['lt'](_0x5634db,_0x3543d9[_0x266392(0x1b7)]);}function getInstallPlanLabel(_0x519121,_0xec63c4){const _0x3d3644=a34_0x166949;switch(_0xec63c4[_0x3d3644(0x1f1)]){case'beta':return'Beta\x20version:\x20'+a34_0x316e4a['yellow'](_0x519121)+'\x20→\x20'+a34_0x316e4a['green'](_0xec63c4[_0x3d3644(0x1b7)]);case'version':return _0x3d3644(0x1c1)+a34_0x316e4a['yellow'](_0x519121)+'\x20→\x20'+a34_0x316e4a[_0x3d3644(0x1da)](_0xec63c4[_0x3d3644(0x1b7)]);case _0x3d3644(0x1e6):default:return _0x3d3644(0x1b3)+a34_0x316e4a['yellow'](_0x519121)+'\x20→\x20'+a34_0x316e4a[_0x3d3644(0x1da)](_0xec63c4[_0x3d3644(0x1b7)]);}}async function installOfficialSkill(_0x5433af){const _0x457c6e=a34_0x166949;console[_0x457c6e(0x1df)](a34_0x316e4a[_0x457c6e(0x1e5)](_0x457c6e(0x1c5)));const _0x21306f=runNpxSkillsAddGlobal(process[_0x457c6e(0x1f5)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x5433af?'pipe':_0x457c6e(0x1bf)});if(_0x21306f[_0x457c6e(0x1d6)]){console[_0x457c6e(0x1df)](a34_0x316e4a['gray']('\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x21306f['ok']){console[_0x457c6e(0x1df)](a34_0x316e4a[_0x457c6e(0x1e5)]('\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.'));return;}console[_0x457c6e(0x1e3)](a34_0x316e4a[_0x457c6e(0x1ec)]('\x20\x20Official\x20skill\x20update\x20failed:\x20'+(_0x21306f[_0x457c6e(0x1c7)]||_0x457c6e(0x1ee)))),console[_0x457c6e(0x1df)](a34_0x316e4a['gray']('\x20\x20Run\x20manually:\x20'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x343ef6){const _0x117231=a34_0x166949;await validateUpdateFlags(_0x343ef6);const _0x1c4c8a=getCurrentVersion();console[_0x117231(0x1df)](_0x117231(0x1b8)+_0x1c4c8a);const _0x20be0f=a34_0x3fe980('Checking\x20for\x20updates...')[_0x117231(0x1de)](),_0x2ca904=await resolveTargetVersion(_0x343ef6);if(!_0x2ca904){const _0x43718d=_0x343ef6[_0x117231(0x1b6)](_0x117231(0x1bb))?_0x117231(0x1b1):_0x117231(0x1f7);return _0x20be0f[_0x117231(0x1cc)](_0x43718d),console['log'](a34_0x316e4a['gray'](_0x117231(0x1c3)+NPM_PACKAGE_NAME+_0x117231(0x1b0))),{'ok':![],'message':_0x43718d};}const _0xe43f61=a34_0x3e6451[_0x117231(0x1b2)](VERSION),_0xfc20f=a34_0x3e6451[_0x117231(0x1b2)](_0x2ca904[_0x117231(0x1b7)]);if(!_0xe43f61||!_0xfc20f)return _0x20be0f[_0x117231(0x1cc)](_0x117231(0x1fd)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0xe43f61,_0x2ca904)){const _0x5166b3=_0x2ca904['source']===_0x117231(0x1b7)?_0x117231(0x1e4)+_0x2ca904[_0x117231(0x1b7)]+')':_0x117231(0x1af)+_0x2ca904[_0x117231(0x1b7)]+')';return _0x20be0f['succeed'](_0x5166b3),shouldSkipOfficialSkill(_0x343ef6)?console[_0x117231(0x1df)](a34_0x316e4a[_0x117231(0x1e5)](_0x117231(0x1c4))):await installOfficialSkill(_0x343ef6[_0x117231(0x1c6)]),{'ok':!![]};}_0x20be0f[_0x117231(0x1b4)](getInstallPlanLabel(_0x1c4c8a,_0x2ca904));const _0x122a13=detectPackageManager(),_0x2e08c2=_0x122a13===_0x117231(0x1f0)?resolveNpmBin(_0x117231(0x1f0)):_0x122a13,_0x4aefe0=a34_0x3fe980('Updating\x20via\x20'+_0x122a13+_0x117231(0x1f4))[_0x117231(0x1de)]();try{return await execa(_0x2e08c2,[_0x117231(0x1ea),'-g',NPM_PACKAGE_NAME+'@'+_0x2ca904['version']],{'stdio':_0x117231(0x1e9)}),_0x4aefe0[_0x117231(0x1e7)](_0x117231(0x1fa)+_0x2ca904[_0x117231(0x1b7)]),console[_0x117231(0x1df)](a34_0x316e4a[_0x117231(0x1e5)](_0x117231(0x1ff))),shouldSkipOfficialSkill(_0x343ef6)?console[_0x117231(0x1df)](a34_0x316e4a[_0x117231(0x1e5)](_0x117231(0x1c4))):await installOfficialSkill(_0x343ef6[_0x117231(0x1c6)]),{'ok':!![]};}catch(_0x404534){return _0x4aefe0[_0x117231(0x1cc)](_0x117231(0x1f9)),console['error'](a34_0x316e4a['red']('\x20\x20'+_0x404534[_0x117231(0x1c9)])),console[_0x117231(0x1df)](a34_0x316e4a['gray']('\x20\x20Try\x20manually:\x20'+_0x122a13+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x2ca904[_0x117231(0x1b7)])),{'ok':![],'message':_0x404534[_0x117231(0x1c9)]};}}export const updateDefinition={'service':a34_0x166949(0x1d9),'command':'run','description':a34_0x166949(0x1ca),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};function a34_0x4820(){const _0x17be29=['toLowerCase','yellow','str','unknown','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','npm','source','856705CLxtir','entries','...','cwd','string','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','object','Update\x20failed','Updated\x20to\x20v','6MOtnCD','trim','Version\x20comparison\x20failed','3908lNnZQR','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','Already\x20up\x20to\x20date\x20(v','@latest','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','valid','Update\x20available:\x20','info','113400SEvIwv','bool','version','Current\x20version:\x20','Install\x20a\x20specific\x20CLI\x20version','filter','beta','length','includes','execPath','inherit','bun','Requested\x20version:\x20','Refresh\x20official\x20skill\x20package\x20after\x20updating','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Skipping\x20official\x20skill\x20package\x20(--no-skills).','Checking\x20official\x20skill\x20package...','nonInteractive','error','3242430kikLWj','message','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','validation','fail','Invalid\x20version:\x20','/dist-tags','321497NNJdSq','map','232BVjJxo','87372HmgGHC','no-skills','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','93bGLwog','skipped','boolean','flag','update','green','fromEntries','416668naBIeV','json','start','log','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','skills','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','warn','Already\x20on\x20requested\x20version\x20(v','gray','latest','succeed','stableVersion','pipe','install'];a34_0x4820=function(){return _0x17be29;};return a34_0x4820();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5176bc,_0x34bf71){const _0x15c11a=a35_0x30b0,_0x550d59=_0x5176bc();while(!![]){try{const _0xe3ae58=-parseInt(_0x15c11a(0x1c8))/0x1*(parseInt(_0x15c11a(0x1c6))/0x2)+-parseInt(_0x15c11a(0x1ca))/0x3+parseInt(_0x15c11a(0x1ce))/0x4*(-parseInt(_0x15c11a(0x1c4))/0x5)+parseInt(_0x15c11a(0x1c7))/0x6*(parseInt(_0x15c11a(0x1c9))/0x7)+-parseInt(_0x15c11a(0x1c5))/0x8*(-parseInt(_0x15c11a(0x1cb))/0x9)+-parseInt(_0x15c11a(0x1cd))/0xa+parseInt(_0x15c11a(0x1cc))/0xb;if(_0xe3ae58===_0x34bf71)break;else _0x550d59['push'](_0x550d59['shift']());}catch(_0x56bfa2){_0x550d59['push'](_0x550d59['shift']());}}}(a35_0xc2e0,0xdf0ec));function a35_0xc2e0(){const _0x2f9265=['300333TbNBZw','63auEicg','3073741TPgXBZ','3441240zZsbgE','7924VUvaDa','2125sBEvuw','1649720SwYfAV','89024wogglM','6yNmImN','4gDfywA','4584412IJySsI'];a35_0xc2e0=function(){return _0x2f9265;};return a35_0xc2e0();}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a35_0x30b0(_0x590b00,_0x36ce5f){_0x590b00=_0x590b00-0x1c4;const _0xc2e043=a35_0xc2e0();let _0x30b00c=_0xc2e043[_0x590b00];return _0x30b00c;}export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a36_0x5e0e(){const _0x14cde8=['code','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','skip-imports','9140QZcFHR','read','boolean','name','string','286650dZeoEe','8466210bwCzkB','appCode','sdk','31693ZqNBnT','alias','tableName','Omit\x20import\x20statements\x20from\x20generated\x20code','2710ZNqZQd','bool','str','2vsSEEd','266286MaXUNV','1691694CuzDyS','operation','codegen','8579501uXInjq','32IiOhwa'];a36_0x5e0e=function(){return _0x14cde8;};return a36_0x5e0e();}function a36_0x56d7(_0x4943c3,_0x4693cd){_0x4943c3=_0x4943c3-0xc7;const _0x5e0ee2=a36_0x5e0e();let _0x56d7c9=_0x5e0ee2[_0x4943c3];return _0x56d7c9;}const a36_0x15558c=a36_0x56d7;(function(_0x4d36e7,_0x29a73b){const _0x18d080=a36_0x56d7,_0x51a0f7=_0x4d36e7();while(!![]){try{const _0x25b4f4=parseInt(_0x18d080(0xcd))/0x1*(parseInt(_0x18d080(0xd4))/0x2)+parseInt(_0x18d080(0xd5))/0x3+parseInt(_0x18d080(0xde))/0x4*(-parseInt(_0x18d080(0xd1))/0x5)+parseInt(_0x18d080(0xca))/0x6+parseInt(_0x18d080(0xd9))/0x7+parseInt(_0x18d080(0xda))/0x8*(-parseInt(_0x18d080(0xd6))/0x9)+-parseInt(_0x18d080(0xc9))/0xa;if(_0x25b4f4===_0x29a73b)break;else _0x51a0f7['push'](_0x51a0f7['shift']());}catch(_0x4222e3){_0x51a0f7['push'](_0x51a0f7['shift']());}}}(a36_0x5e0e,0xb4356));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a36_0x15558c(0xd8),'command':a36_0x15558c(0xcc),'description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':a36_0x15558c(0xdf),'flags':[CODE_FLAG_OPTIONAL,{'name':a36_0x15558c(0xce),'type':a36_0x15558c(0xc8),'description':a36_0x15558c(0xdc)},{'name':a36_0x15558c(0xd7),'type':a36_0x15558c(0xc8),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a36_0x15558c(0xdd),'type':a36_0x15558c(0xe0),'description':a36_0x15558c(0xd0)}],async 'execute'(_0x1d24ac){const _0x24822c=a36_0x15558c,{dataset:_0x1f904d,operation:_0x344135}=await getOperationDetail(_0x1d24ac[_0x24822c(0xcb)],_0x1d24ac[_0x24822c(0xd3)](_0x24822c(0xdb)),_0x1d24ac[_0x24822c(0xd3)](_0x24822c(0xd7))),_0x553a94=generateSdkCode(_0x1f904d,_0x344135,{'includeImports':!_0x1d24ac[_0x24822c(0xd2)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x1f904d[_0x24822c(0xc7)],'code':_0x1f904d[_0x24822c(0xdb)],'tableName':_0x1f904d[_0x24822c(0xcf)]},'operation':_0x1d24ac[_0x24822c(0xd3)]('operation'),'code':_0x553a94}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a37_0x3c204d=a37_0x40c6;(function(_0x487de1,_0x5ad23c){const _0x29a64a=a37_0x40c6,_0xd69f6=_0x487de1();while(!![]){try{const _0x2d5109=-parseInt(_0x29a64a(0x89))/0x1+parseInt(_0x29a64a(0x78))/0x2*(-parseInt(_0x29a64a(0x7c))/0x3)+-parseInt(_0x29a64a(0x77))/0x4+-parseInt(_0x29a64a(0x82))/0x5*(-parseInt(_0x29a64a(0x7a))/0x6)+-parseInt(_0x29a64a(0x76))/0x7+parseInt(_0x29a64a(0x80))/0x8*(-parseInt(_0x29a64a(0x73))/0x9)+parseInt(_0x29a64a(0x85))/0xa;if(_0x2d5109===_0x5ad23c)break;else _0xd69f6['push'](_0xd69f6['shift']());}catch(_0x38a4d2){_0xd69f6['push'](_0xd69f6['shift']());}}}(a37_0x2457,0xa5918));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a37_0x40c6(_0x2c33a9,_0x2d7134){_0x2c33a9=_0x2c33a9-0x73;const _0x24576e=a37_0x2457();let _0x40c62e=_0x24576e[_0x2c33a9];return _0x40c62e;}function a37_0x2457(){const _0x5aa5c3=['8589987fttBmY','3494492AxiEhX','8RnvjjH','sqlcode','1531326NbJjMK','sqlName','672897WLjVNl','Omit\x20import\x20statements\x20from\x20generated\x20code','str','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','40QzOKhA','appCode','20wHcXfM','sdk','codegen','35918900OyffPp','no-imports','boolean','string','481216nJXDCG','819774vrgtCH','target','sql'];a37_0x2457=function(){return _0x5aa5c3;};return a37_0x2457();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a37_0x3c204d(0x84),'command':a37_0x3c204d(0x75),'description':a37_0x3c204d(0x7f),'risk':'read','flags':[SQLCODE_FLAG,{'name':a37_0x3c204d(0x74),'type':a37_0x3c204d(0x88),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a37_0x3c204d(0x83),'enum':[a37_0x3c204d(0x83),'bff']},{'name':a37_0x3c204d(0x86),'type':a37_0x3c204d(0x87),'description':a37_0x3c204d(0x7d)}],async 'execute'(_0x52346c){const _0x5d914b=a37_0x3c204d,_0x4c5bbf=await getSqlQueryInfo(_0x52346c[_0x5d914b(0x81)],_0x52346c[_0x5d914b(0x7e)](_0x5d914b(0x79))),_0x287aa8=_0x52346c[_0x5d914b(0x7e)](_0x5d914b(0x74))||_0x5d914b(0x83),_0x5b07ee=generateSqlCodeTemplate(_0x4c5bbf,{'target':_0x287aa8,'includeImports':!_0x52346c['bool'](_0x5d914b(0x86))});return{'ok':!![],'data':{'sqlCode':_0x4c5bbf['sqlCode'],'sqlName':_0x4c5bbf[_0x5d914b(0x7b)],'target':_0x287aa8,'code':_0x5b07ee}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xec2a8f,_0x3ebb6f){const _0x52d576=a38_0x5535,_0x2b8ce3=_0xec2a8f();while(!![]){try{const _0x30dc2a=parseInt(_0x52d576(0xda))/0x1*(-parseInt(_0x52d576(0xc9))/0x2)+parseInt(_0x52d576(0xd1))/0x3*(-parseInt(_0x52d576(0xdb))/0x4)+parseInt(_0x52d576(0xc7))/0x5*(-parseInt(_0x52d576(0xce))/0x6)+-parseInt(_0x52d576(0xb5))/0x7*(parseInt(_0x52d576(0xbd))/0x8)+parseInt(_0x52d576(0xc2))/0x9*(parseInt(_0x52d576(0xbe))/0xa)+parseInt(_0x52d576(0xd2))/0xb*(parseInt(_0x52d576(0xb6))/0xc)+parseInt(_0x52d576(0xdd))/0xd*(parseInt(_0x52d576(0xbc))/0xe);if(_0x30dc2a===_0x3ebb6f)break;else _0x2b8ce3['push'](_0x2b8ce3['shift']());}catch(_0x1fdb9b){_0x2b8ce3['push'](_0x2b8ce3['shift']());}}}(a38_0x4b13,0x2e709));import{input,checkbox,select}from'@inquirer/prompts';import a38_0x6c31fa 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 _0x3fb17a=a38_0x5535,_0x3b8bc3=await input({'message':_0x3fb17a(0xb8),'validate':_0x2a4f32=>{const _0x35fa54=_0x3fb17a,_0x12b956=validateAppcode(_0x2a4f32[_0x35fa54(0xbf)]());return _0x12b956[_0x35fa54(0xb9)]||_0x12b956[_0x35fa54(0xd4)]||_0x35fa54(0xd0);}});return _0x3b8bc3[_0x3fb17a(0xbf)]();}function a38_0x4b13(){const _0x5611d2=['custom','map','9474AlGACV','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','Invalid\x20App\x20Code','3ametwE','770vfiMQm','yellow','message','无法获取远程应用列表,请手动输入。','length','manual','请选择要绑定的应用:','✎\x20手动输入','3099Jsrhvv','521148qbtFEg','appCode','49556eeToqT','find','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','539zGkJIA','12516CGtOXk','正在获取可用应用列表...','请输入\x20App\x20Code:','valid','App\x20Code:','\x0a未找到可用应用。','2660otWsbn','20632rEjZPS','2510XCiCzi','trim','includes','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','10053lfLmWe','appName','cyan','\x20\x20(','\x0a无法获取远程应用列表,请手动输入。','915ccTDyx','skip','174VXWCiG','✎\x20自定义输入\x20appcode','gray'];a38_0x4b13=function(){return _0x5611d2;};return a38_0x4b13();}export async function promptAppSelection(_0x79c0ea){const _0x5f02fa=a38_0x5535,_0x2f953b=[{'name':a38_0x6c31fa[_0x5f02fa(0xd3)](_0x5f02fa(0xca)),'value':-0x1},..._0x79c0ea[_0x5f02fa(0xcd)]((_0x4823d4,_0x184f64)=>({'name':_0x4823d4[_0x5f02fa(0xc3)]+'\x20\x20'+a38_0x6c31fa[_0x5f02fa(0xcb)]('('+_0x4823d4['appCode']+')'),'value':_0x184f64}))],_0x5c0729=await checkbox({'message':'获取到\x20'+a38_0x6c31fa[_0x5f02fa(0xc4)](_0x79c0ea['length'])+_0x5f02fa(0xcf),'choices':_0x2f953b,'loop':![]});if(_0x5c0729[_0x5f02fa(0xc0)](-0x1))return _0x5f02fa(0xcc);if(_0x5c0729[_0x5f02fa(0xd6)]===0x0)return _0x5f02fa(0xcc);return _0x5c0729[_0x5f02fa(0xcd)](_0xd9e10c=>_0x79c0ea[_0xd9e10c]);}export async function promptSingleAppSelection(_0x2eb7f0){const _0x278682=a38_0x5535,_0x479dd8=[{'name':a38_0x6c31fa[_0x278682(0xcb)](_0x278682(0xb4)),'value':'skip'},{'name':a38_0x6c31fa[_0x278682(0xd3)]('✎\x20自定义输入\x20appcode'),'value':'custom'},..._0x2eb7f0['map'](_0x20b935=>({'name':_0x20b935[_0x278682(0xc3)]+'\x20\x20'+a38_0x6c31fa[_0x278682(0xcb)]('('+_0x20b935[_0x278682(0xdc)]+')'),'value':_0x20b935[_0x278682(0xdc)]}))],_0x4e54d0=await select({'message':_0x278682(0xd8),'choices':_0x479dd8});if(_0x4e54d0===_0x278682(0xc8))return _0x278682(0xc8);if(_0x4e54d0===_0x278682(0xcc))return'custom';return _0x2eb7f0[_0x278682(0xb3)](_0x21345a=>_0x21345a[_0x278682(0xdc)]===_0x4e54d0);}export async function selectSingleAppcode(_0xfacd27){const _0x54b9ed=a38_0x5535;if(!_0xfacd27)return writeCliSideChannelLine(a38_0x6c31fa[_0x54b9ed(0xcb)](_0x54b9ed(0xc1))),_fallbackOrSkip();writeCliSideChannelLine(_0x54b9ed(0xb7));let _0x135884;try{_0x135884=await withActiveCookie(_0xfacd27,()=>listRemoteApps());}catch(_0x2b92b0){writeCliSideChannelLine(a38_0x6c31fa[_0x54b9ed(0xd3)](_0x54b9ed(0xd5)));if(_0x2b92b0 instanceof Error)writeCliSideChannelLine(a38_0x6c31fa['gray'](_0x54b9ed(0xc5)+_0x2b92b0[_0x54b9ed(0xd4)]+')'));return _fallbackOrSkip();}if(_0x135884[_0x54b9ed(0xd6)]===0x0)return writeCliSideChannelLine(a38_0x6c31fa[_0x54b9ed(0xd3)]('未找到可用应用。')),_fallbackOrSkip();const _0x115576=await promptSingleAppSelection(_0x135884);if(_0x115576===_0x54b9ed(0xc8))return'';if(_0x115576===_0x54b9ed(0xcc))return promptCustomAppcode();return _0x115576[_0x54b9ed(0xdc)];}function a38_0x5535(_0x4570da,_0x14318f){_0x4570da=_0x4570da-0xb3;const _0x4b130c=a38_0x4b13();let _0x55350c=_0x4b130c[_0x4570da];return _0x55350c;}export async function selectMultipleApps(_0x5d1532){const _0xacc741=a38_0x5535;writeCliSideChannelLine(_0xacc741(0xb7));let _0x2ebdc6;try{_0x2ebdc6=await withActiveCookie(_0x5d1532,()=>listRemoteApps());}catch(_0x192062){writeCliSideChannelLine(_0xacc741(0xc6));if(_0x192062 instanceof Error)writeCliSideChannelLine(_0xacc741(0xc5)+_0x192062['message']+')');return'custom';}if(_0x2ebdc6[_0xacc741(0xd6)]===0x0)return writeCliSideChannelLine(_0xacc741(0xbb)),'custom';return promptAppSelection(_0x2ebdc6);}async function _fallbackOrSkip(){const _0x7175c8=a38_0x5535,_0x464b37=await select({'message':_0x7175c8(0xba),'choices':[{'name':a38_0x6c31fa[_0x7175c8(0xcb)]('(跳过,稍后配置)'),'value':'skip'},{'name':a38_0x6c31fa[_0x7175c8(0xd3)](_0x7175c8(0xd9)),'value':_0x7175c8(0xd7)}]});if(_0x464b37==='skip')return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a39_0x450218=a39_0x21d7;(function(_0x15d9e8,_0x24830b){const _0x595cad=a39_0x21d7,_0x191554=_0x15d9e8();while(!![]){try{const _0x1fb140=parseInt(_0x595cad(0xd5))/0x1+-parseInt(_0x595cad(0xd9))/0x2+parseInt(_0x595cad(0xcb))/0x3+-parseInt(_0x595cad(0xd0))/0x4+-parseInt(_0x595cad(0xd8))/0x5*(-parseInt(_0x595cad(0xc8))/0x6)+-parseInt(_0x595cad(0xd7))/0x7+parseInt(_0x595cad(0xd6))/0x8;if(_0x1fb140===_0x24830b)break;else _0x191554['push'](_0x191554['shift']());}catch(_0x48a93d){_0x191554['push'](_0x191554['shift']());}}}(a39_0x53b9,0xe03a5));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a39_0x450218(0xce)};export const CODE_FLAG={'name':a39_0x450218(0xc9),'type':a39_0x450218(0xcc),'required':!![],'description':a39_0x450218(0xca),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a39_0x450218(0xca)};export const SQLCODE_FLAG={'name':a39_0x450218(0xc7),'type':a39_0x450218(0xcc),'required':!![],'description':a39_0x450218(0xc6),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};function a39_0x53b9(){const _0x251485=['POSTGRESQL','Database\x20product\x20type','number','1409383AtKfgO','24877064ichiYF','6539617Tlovud','10FKFufI','2852076fqgXTi','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','sqlcode','185124nEpchl','code','Dataset\x20code\x20(32-char\x20hex\x20UUID)','1587273SaNXxL','string','dbtype','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','MYSQL','7324436ksRooW','appcode'];a39_0x53b9=function(){return _0x251485;};return a39_0x53b9();}function a39_0x21d7(_0x4f36b5,_0x20a132){_0x4f36b5=_0x4f36b5-0xc6;const _0x53b96e=a39_0x53b9();let _0x21d7bb=_0x53b96e[_0x4f36b5];return _0x21d7bb;}export const APPCODE_FLAG_OPTIONAL={'name':a39_0x450218(0xd1),'type':a39_0x450218(0xcc),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a39_0x450218(0xd4),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':a39_0x450218(0xcd),'type':a39_0x450218(0xcc),'required':!![],'description':a39_0x450218(0xd3),'enum':[a39_0x450218(0xcf),a39_0x450218(0xd2)]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a40_0x47bd(_0x4f495a,_0x249ebd){_0x4f495a=_0x4f495a-0xa7;const _0x3df603=a40_0x3df6();let _0x47bdd7=_0x3df603[_0x4f495a];return _0x47bdd7;}(function(_0x2b092f,_0xa7971a){const _0x285570=a40_0x47bd,_0x406371=_0x2b092f();while(!![]){try{const _0x408f67=parseInt(_0x285570(0xaa))/0x1*(parseInt(_0x285570(0xad))/0x2)+parseInt(_0x285570(0xb0))/0x3*(-parseInt(_0x285570(0xaf))/0x4)+parseInt(_0x285570(0xa8))/0x5*(parseInt(_0x285570(0xb1))/0x6)+parseInt(_0x285570(0xb8))/0x7+-parseInt(_0x285570(0xab))/0x8*(parseInt(_0x285570(0xb6))/0x9)+-parseInt(_0x285570(0xac))/0xa+-parseInt(_0x285570(0xb2))/0xb*(-parseInt(_0x285570(0xb3))/0xc);if(_0x408f67===_0xa7971a)break;else _0x406371['push'](_0x406371['shift']());}catch(_0x4a870a){_0x406371['push'](_0x406371['shift']());}}}(a40_0x3df6,0x3703a));function a40_0x3df6(){const _0x2ffe1c=['Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','9xyTDAS','test','1212197XEtAMa','length','25NPYbbe','trim','119468ENgtJa','88784AAuOHT','2341570sUgKeG','4LmZbmk','App\x20Code\x20cannot\x20exceed\x20100\x20characters','112BfgbFV','1497MZIMYz','69774FHYFKF','4037CCrDjU','468KUApGU','App\x20Code\x20cannot\x20be\x20empty'];a40_0x3df6=function(){return _0x2ffe1c;};return a40_0x3df6();}export function validateAppcode(_0x9be4b3){const _0x38d122=a40_0x47bd,_0x30dbf0=_0x9be4b3[_0x38d122(0xa9)]();if(!_0x30dbf0)return{'valid':![],'message':_0x38d122(0xb4)};if(_0x30dbf0[_0x38d122(0xa7)]>0x64)return{'valid':![],'message':_0x38d122(0xae)};if(!/^[A-Za-z0-9_-]+$/[_0x38d122(0xb7)](_0x30dbf0))return{'valid':![],'message':_0x38d122(0xb5)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a41_0x4a8063=a41_0x5227;(function(_0x204be9,_0x19a85f){const _0x23799d=a41_0x5227,_0x5e110f=_0x204be9();while(!![]){try{const _0x191dfc=-parseInt(_0x23799d(0x1fe))/0x1+parseInt(_0x23799d(0x1f0))/0x2*(parseInt(_0x23799d(0x1f6))/0x3)+-parseInt(_0x23799d(0x201))/0x4*(parseInt(_0x23799d(0x1fd))/0x5)+-parseInt(_0x23799d(0x1ef))/0x6+parseInt(_0x23799d(0x200))/0x7+-parseInt(_0x23799d(0x1fc))/0x8+parseInt(_0x23799d(0x1f5))/0x9;if(_0x191dfc===_0x19a85f)break;else _0x5e110f['push'](_0x5e110f['shift']());}catch(_0x4a4f09){_0x5e110f['push'](_0x5e110f['shift']());}}}(a41_0x5956,0xc2d82));function a41_0x5227(_0x2bc811,_0x1ea13b){_0x2bc811=_0x2bc811-0x1ef;const _0x595677=a41_0x5956();let _0x52279b=_0x595677[_0x2bc811];return _0x52279b;}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(_0x1fb7eb){const _0x2d176c=a41_0x5227,_0x2bc1f3=_0x1fb7eb['str'](_0x2d176c(0x1f2));if(!_0x2bc1f3)throw CliErrors[_0x2d176c(0x1f1)](_0x2d176c(0x1f9),_0x2d176c(0x1f8)+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x5b1691=readConfig(),_0x3d1ed3=_0x2bc1f3==='app'?_0x2d176c(0x202):_0x2bc1f3,_0x543852=_0x5b1691[_0x3d1ed3];if(_0x543852===undefined)throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x2bc1f3);return{'ok':!![],'data':typeof _0x543852===_0x2d176c(0x1f3)?_0x543852:{[_0x3d1ed3]:_0x543852},'message':typeof _0x543852===_0x2d176c(0x1f3)?undefined:String(_0x543852)};}function a41_0x5956(){const _0x397533=['22921380mcZUai','43437yWLxxt','get','Usage:\x20','Missing\x20key.','config','Get\x20a\x20config\x20value\x20by\x20key','3272720evzlDF','10ucgGKP','628305MDwmoK','read','3851981GVFAqZ','2837816HIPIby','appcode','5398110lenrjc','146Srsczp','validation','key','object','string'];a41_0x5956=function(){return _0x397533;};return a41_0x5956();}export const configGetDefinition={'service':a41_0x4a8063(0x1fa),'command':a41_0x4a8063(0x1f7),'description':a41_0x4a8063(0x1fb),'risk':a41_0x4a8063(0x1ff),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a41_0x4a8063(0x1f4),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a42_0x53e5(_0x7f46a3,_0x3b1089){_0x7f46a3=_0x7f46a3-0xa4;const _0x2658fa=a42_0x2658();let _0x53e51a=_0x2658fa[_0x7f46a3];return _0x53e51a;}(function(_0x215a52,_0xe48eba){const _0x4e606a=a42_0x53e5,_0x1fa4bb=_0x215a52();while(!![]){try{const _0x3c590=parseInt(_0x4e606a(0xa6))/0x1*(-parseInt(_0x4e606a(0xaa))/0x2)+-parseInt(_0x4e606a(0xab))/0x3*(parseInt(_0x4e606a(0xa4))/0x4)+parseInt(_0x4e606a(0xa9))/0x5*(-parseInt(_0x4e606a(0xae))/0x6)+parseInt(_0x4e606a(0xa7))/0x7+parseInt(_0x4e606a(0xa5))/0x8+-parseInt(_0x4e606a(0xad))/0x9+parseInt(_0x4e606a(0xa8))/0xa*(parseInt(_0x4e606a(0xac))/0xb);if(_0x3c590===_0xe48eba)break;else _0x1fa4bb['push'](_0x1fa4bb['shift']());}catch(_0x2f9610){_0x1fa4bb['push'](_0x1fa4bb['shift']());}}}(a42_0x2658,0xae078));function a42_0x2658(){const _0x585100=['822MnLKxn','368372wuDZrd','7780408YFrPas','1hwTINJ','950502hWkEXY','590IZDxsN','8735LkKIzc','660278lOUKMY','21jSmJRe','386177Lwomct','11274273wrFIBZ'];a42_0x2658=function(){return _0x585100;};return a42_0x2658();}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a43_0x4e27(){const _0xc88409=['4332672OwEnDC','global','42qkzynG','63NHFfIK','1129339NLXtBr','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','10296MrxtcK','622570RyrjLX','27lquxvJ','1883lMXwKI','bool','30596qWlJRc','22NoFOzk','boolean','929975CVXpSw','list','read','398046nBZWGT','config'];a43_0x4e27=function(){return _0xc88409;};return a43_0x4e27();}const a43_0x582ee8=a43_0x4f00;(function(_0x2830b0,_0x53f0db){const _0x2a89db=a43_0x4f00,_0x455b7a=_0x2830b0();while(!![]){try{const _0x3d67fe=parseInt(_0x2a89db(0x198))/0x1+-parseInt(_0x2a89db(0x192))/0x2+-parseInt(_0x2a89db(0x197))/0x3*(-parseInt(_0x2a89db(0x19f))/0x4)+parseInt(_0x2a89db(0x18f))/0x5*(-parseInt(_0x2a89db(0x196))/0x6)+-parseInt(_0x2a89db(0x19d))/0x7*(-parseInt(_0x2a89db(0x19a))/0x8)+parseInt(_0x2a89db(0x19c))/0x9*(-parseInt(_0x2a89db(0x19b))/0xa)+parseInt(_0x2a89db(0x18d))/0xb*(parseInt(_0x2a89db(0x194))/0xc);if(_0x3d67fe===_0x53f0db)break;else _0x455b7a['push'](_0x455b7a['shift']());}catch(_0x2ce9f7){_0x455b7a['push'](_0x455b7a['shift']());}}}(a43_0x4e27,0xa3b3c));import{readScopedConfig}from'../../commands/config/shared.js';function a43_0x4f00(_0x449ea4,_0x55f505){_0x449ea4=_0x449ea4-0x18d;const _0x4e27a4=a43_0x4e27();let _0x4f00ac=_0x4e27a4[_0x449ea4];return _0x4f00ac;}import{readConfig}from'../../utils/config.js';async function execute(_0x3c0f2e){const _0x14ab8e=a43_0x4f00,_0x4818b9=_0x3c0f2e[_0x14ab8e(0x19e)](_0x14ab8e(0x195))?readScopedConfig(_0x14ab8e(0x195)):readConfig();return{'ok':!![],'data':_0x4818b9};}export const configListDefinition={'service':a43_0x582ee8(0x193),'command':a43_0x582ee8(0x190),'description':'List\x20all\x20config\x20values','risk':a43_0x582ee8(0x191),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a43_0x582ee8(0x195),'type':a43_0x582ee8(0x18e),'description':a43_0x582ee8(0x199),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a44_0x43c9db=a44_0x33e0;(function(_0xc6119b,_0x4ef4ca){const _0x360cd2=a44_0x33e0,_0xa94eb=_0xc6119b();while(!![]){try{const _0x3255a5=-parseInt(_0x360cd2(0xbc))/0x1+-parseInt(_0x360cd2(0xd3))/0x2+parseInt(_0x360cd2(0xc2))/0x3+-parseInt(_0x360cd2(0xde))/0x4*(parseInt(_0x360cd2(0xbe))/0x5)+parseInt(_0x360cd2(0xcf))/0x6+parseInt(_0x360cd2(0xc6))/0x7+-parseInt(_0x360cd2(0xd4))/0x8;if(_0x3255a5===_0x4ef4ca)break;else _0xa94eb['push'](_0xa94eb['shift']());}catch(_0xaa649e){_0xa94eb['push'](_0xa94eb['shift']());}}}(a44_0x117c,0x69f38));import{CliErrors}from'../../errors.js';function a44_0x33e0(_0x29e3f3,_0x18b63c){_0x29e3f3=_0x29e3f3-0xbc;const _0x117c75=a44_0x117c();let _0x33e018=_0x117c75[_0x29e3f3];return _0x33e018;}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';function a44_0x117c(){const _0xb44202=['length','boolean','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','locale','31197qSAynh','Top-level\x20key\x20\x22','628825wfTFCn','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Project','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','1982124XYquoL','object','Usage:\x20','join','2428573QByeAp','`,\x20`','Missing\x20key.','validation','apps','string','\x20set\x20to:\x20','value','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','1229454IzHCMv','includes','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','Use\x20`','761866tHemlR','919360MKNLdE','riskLevel','\x22.\x20Allowed:\x20','keys','Config\x20value','write','\x20app\x20add\x20<name>\x20--appcode\x20','Invalid\x20value\x20for\x20\x22','Missing\x20value.','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','8aLTWZY','Global','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','set','app','key','bool','str','Set\x20a\x20config\x20value','env','\x22\x20is\x20not\x20settable.','Invalid\x20locale\x20value.','Settable\x20top-level\x20keys:\x20','\x20appcode\x20set\x20to:\x20','global'];a44_0x117c=function(){return _0xb44202;};return a44_0x117c();}import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x50baaa){const _0x158085=a44_0x33e0,_0x42da64=_0x50baaa[_0x158085(0xe5)](_0x158085(0xe3)),_0x10ba0e=_0x50baaa[_0x158085(0xe5)]('value');if(!_0x42da64)throw CliErrors[_0x158085(0xc9)](_0x158085(0xc8),_0x158085(0xc4)+CLI_BIN_NAME+_0x158085(0xbf));if(_0x10ba0e===undefined||_0x10ba0e==='')throw CliErrors[_0x158085(0xc9)](_0x158085(0xdc),'Usage:\x20'+CLI_BIN_NAME+_0x158085(0xbf));if(_0x10ba0e[_0x158085(0xed)]>0x1f4)throw CliErrors[_0x158085(0xc9)](_0x158085(0xce));if(!isTopLevelConfigKey(_0x42da64))throw CliErrors[_0x158085(0xc9)](_0x158085(0xbd)+_0x42da64+_0x158085(0xe8),_0x158085(0xea)+getTopLevelConfigKeySummary());if(_0x42da64===_0x158085(0xd5))throw CliErrors[_0x158085(0xc9)](_0x158085(0xc1));if(CONFIG_ENUM_VALUES[_0x42da64]&&!CONFIG_ENUM_VALUES[_0x42da64][_0x158085(0xd0)](_0x10ba0e))throw CliErrors['validation'](_0x158085(0xdb)+_0x42da64+_0x158085(0xd6)+CONFIG_ENUM_VALUES[_0x42da64][_0x158085(0xc5)](',\x20'));if(_0x42da64===_0x158085(0xf0)&&!normalizeLocale(_0x10ba0e))throw CliErrors['validation'](_0x158085(0xe9),_0x158085(0xe0));const _0x22d562={'global':_0x50baaa[_0x158085(0xe4)]('global')},_0x37700b=resolveWriteScope(_0x22d562),_0x3cf004=readScopedConfig(_0x37700b);let _0x1a3723=_0x42da64,_0x2745cf=_0x10ba0e;_0x42da64==='app'&&(_0x1a3723='appcode',delete _0x3cf004[_0x158085(0xe2)]);_0x42da64===_0x158085(0xf0)&&(_0x2745cf=normalizeLocale(_0x10ba0e));if(_0x42da64==='env'){_0x2745cf=normalizeEnv(_0x10ba0e);if(!isProduction(_0x2745cf)&&!isDaily(_0x2745cf))throw CliErrors[_0x158085(0xc9)](_0x158085(0xd1),'Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x42da64==='appcode'){const _0x5f3e04=_0x3cf004[_0x158085(0xca)]&&typeof _0x3cf004[_0x158085(0xca)]===_0x158085(0xc3)?Object[_0x158085(0xd7)](_0x3cf004[_0x158085(0xca)]):[];if(_0x5f3e04[_0x158085(0xed)]>0x0)throw CliErrors[_0x158085(0xc9)](_0x158085(0xdd),_0x158085(0xd2)+CLI_BIN_NAME+_0x158085(0xda)+_0x2745cf+_0x158085(0xc7)+CLI_BIN_NAME+'\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x1e7392=buildCanonicalProjectConfig({..._0x3cf004},{'appCodes':[_0x2745cf],'env':typeof _0x3cf004['env']===_0x158085(0xcb)?_0x3cf004[_0x158085(0xe7)]:undefined});writeScopedConfig(_0x1e7392,_0x37700b);const _0x220fbd=_0x37700b===_0x158085(0xec)?_0x158085(0xdf):_0x158085(0xc0);return{'ok':!![],'message':'✓\x20'+_0x220fbd+_0x158085(0xeb)+_0x2745cf+'\x20(stored\x20as\x20apps\x20+\x20defaultApp)'};}_0x3cf004[_0x1a3723]=_0x2745cf,writeScopedConfig(_0x3cf004,_0x37700b);const _0xcdb74=_0x37700b==='global'?_0x158085(0xdf):'Project';return{'ok':!![],'message':'✓\x20'+_0xcdb74+'\x20'+_0x1a3723+_0x158085(0xcc)+_0x2745cf};}export const configSetDefinition={'service':'config','command':a44_0x43c9db(0xe1),'description':a44_0x43c9db(0xe6),'risk':a44_0x43c9db(0xd9),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a44_0x43c9db(0xcb),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a44_0x43c9db(0xcd),'type':a44_0x43c9db(0xcb),'description':a44_0x43c9db(0xd8),'required':!![]},{'name':'global','type':a44_0x43c9db(0xee),'description':a44_0x43c9db(0xef),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x13ad11,_0x7fa977){var _0xf1efeb=a45_0x1f49,_0x27d3c7=_0x13ad11();while(!![]){try{var _0x3cf6f5=-parseInt(_0xf1efeb(0x81))/0x1+parseInt(_0xf1efeb(0x7b))/0x2+-parseInt(_0xf1efeb(0x82))/0x3*(-parseInt(_0xf1efeb(0x78))/0x4)+parseInt(_0xf1efeb(0x75))/0x5*(-parseInt(_0xf1efeb(0x7e))/0x6)+parseInt(_0xf1efeb(0x7f))/0x7+parseInt(_0xf1efeb(0x7d))/0x8+parseInt(_0xf1efeb(0x7c))/0x9*(-parseInt(_0xf1efeb(0x77))/0xa);if(_0x3cf6f5===_0x7fa977)break;else _0x27d3c7['push'](_0x27d3c7['shift']());}catch(_0x1f689d){_0x27d3c7['push'](_0x27d3c7['shift']());}}}(a45_0x4c49,0x63502));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';function a45_0x1f49(_0xb08759,_0xe2b5e7){_0xb08759=_0xb08759-0x74;var _0x4c4998=a45_0x4c49();var _0x1f49bc=_0x4c4998[_0xb08759];return _0x1f49bc;}export{CLI_BIN_NAME};export{normalizeLocale};function a45_0x4c49(){var _0x2ba027=['2461232fmzIMP','143322jhaiPi','1408351uvqpBr','validation','160731oVHXgH','51OtZumj','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','135YcxTAb','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','6677840huQeBY','155896VZvZzm','\x20init`\x20first.','global','1417690vlxldR','9oArcQC'];a45_0x4c49=function(){return _0x2ba027;};return a45_0x4c49();}export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x4404b9){var _0x17015e=a45_0x1f49;if(_0x4404b9['global'])return _0x17015e(0x7a);if(!isInProject())throw CliErrors[_0x17015e(0x80)](_0x17015e(0x74),_0x17015e(0x76)+CLI_BIN_NAME+_0x17015e(0x79));return'project';}export function readScopedConfig(_0x2fb7d4){return readConfigFile(resolveWriteConfigPath(_0x2fb7d4));}export function writeScopedConfig(_0x4fc706,_0x585b1e){writeConfigFile(resolveWriteConfigPath(_0x585b1e),_0x4fc706);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a46_0x3604(_0x325e06,_0x2c1942){_0x325e06=_0x325e06-0xa4;const _0xdbbd2c=a46_0xdbbd();let _0x360444=_0xdbbd2c[_0x325e06];return _0x360444;}const a46_0x26fa66=a46_0x3604;(function(_0x3bf219,_0x5029b3){const _0x5998f4=a46_0x3604,_0x30dc4f=_0x3bf219();while(!![]){try{const _0x2dde29=parseInt(_0x5998f4(0xaf))/0x1*(-parseInt(_0x5998f4(0xb5))/0x2)+-parseInt(_0x5998f4(0xaa))/0x3*(parseInt(_0x5998f4(0xae))/0x4)+parseInt(_0x5998f4(0xac))/0x5+-parseInt(_0x5998f4(0xb4))/0x6*(parseInt(_0x5998f4(0xb2))/0x7)+-parseInt(_0x5998f4(0xa5))/0x8+-parseInt(_0x5998f4(0xb1))/0x9+parseInt(_0x5998f4(0xb3))/0xa*(parseInt(_0x5998f4(0xab))/0xb);if(_0x2dde29===_0x5029b3)break;else _0x30dc4f['push'](_0x30dc4f['shift']());}catch(_0x2c4ea2){_0x30dc4f['push'](_0x30dc4f['shift']());}}}(a46_0xdbbd,0xd1519));function a46_0xdbbd(){const _0x339ff8=['\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','9Rrdbyx','51575359MDWSRW','2733485bxQeQJ','filter','798632kHznfb','55hjPQzR','join','13039182dYlIaN','245OLKfJX','10anjvMX','116454ukrDHm','2842sDRfcr','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','12582040jotKjc','\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}]','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]'];a46_0xdbbd=function(){return _0x339ff8;};return a46_0xdbbd();}import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a46_0x26fa66(0xad),'operation':'filter','description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsRequired':![],'paramsHint':a46_0x26fa66(0xa7),'helpExtra':['\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a46_0x26fa66(0xa9),a46_0x26fa66(0xa8),a46_0x26fa66(0xa6),a46_0x26fa66(0xa4),a46_0x26fa66(0xb6)][a46_0x26fa66(0xb0)]('\x0a')});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a47_0x207a9e=a47_0x3653;function a47_0x3653(_0x32f444,_0x13f37c){_0x32f444=_0x32f444-0x102;const _0x3ec9a1=a47_0x3ec9();let _0x3653ed=_0x3ec9a1[_0x32f444];return _0x3653ed;}function a47_0x3ec9(){const _0x44de74=['Get\x20a\x20single\x20record\x20by\x20ID','2650048ZKDqGp','9omWPLS','1563396YzLLIG','5BEoiOO','11937PRzLyY','962143zFouJM','241605IbXJvl','3685060atcPTX','3327632uxligx','12DlbUHY','getOne','88aWFpOi','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'];a47_0x3ec9=function(){return _0x44de74;};return a47_0x3ec9();}(function(_0x352e71,_0x4ca94d){const _0x13315d=a47_0x3653,_0x41b904=_0x352e71();while(!![]){try{const _0x1305d3=-parseInt(_0x13315d(0x104))/0x1+parseInt(_0x13315d(0x109))/0x2*(parseInt(_0x13315d(0x102))/0x3)+-parseInt(_0x13315d(0x10e))/0x4*(parseInt(_0x13315d(0x10f))/0x5)+parseInt(_0x13315d(0x107))/0x6*(parseInt(_0x13315d(0x103))/0x7)+-parseInt(_0x13315d(0x10c))/0x8*(-parseInt(_0x13315d(0x10d))/0x9)+parseInt(_0x13315d(0x105))/0xa+-parseInt(_0x13315d(0x106))/0xb;if(_0x1305d3===_0x4ca94d)break;else _0x41b904['push'](_0x41b904['shift']());}catch(_0xfaf4cc){_0x41b904['push'](_0x41b904['shift']());}}}(a47_0x3ec9,0x346f2));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a47_0x207a9e(0x108),'operation':a47_0x207a9e(0x108),'description':a47_0x207a9e(0x10b),'paramsRequired':!![],'paramsHint':a47_0x207a9e(0x10a)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x380bce,_0x2422e7){const _0x16b1f1=a48_0x3f36,_0x1f3b6e=_0x380bce();while(!![]){try{const _0x1b3d32=-parseInt(_0x16b1f1(0xab))/0x1*(-parseInt(_0x16b1f1(0xb4))/0x2)+parseInt(_0x16b1f1(0xad))/0x3+-parseInt(_0x16b1f1(0xae))/0x4*(-parseInt(_0x16b1f1(0xb3))/0x5)+parseInt(_0x16b1f1(0xaf))/0x6+-parseInt(_0x16b1f1(0xb0))/0x7*(parseInt(_0x16b1f1(0xaa))/0x8)+parseInt(_0x16b1f1(0xb2))/0x9+parseInt(_0x16b1f1(0xb1))/0xa*(-parseInt(_0x16b1f1(0xac))/0xb);if(_0x1b3d32===_0x2422e7)break;else _0x1f3b6e['push'](_0x1f3b6e['shift']());}catch(_0x1b6a80){_0x1f3b6e['push'](_0x1f3b6e['shift']());}}}(a48_0x6686,0x84c50));import{dataFilter}from'../../commands/data/filter.js';function a48_0x3f36(_0x266c9c,_0x10c475){_0x266c9c=_0x266c9c-0xaa;const _0x6686ab=a48_0x6686();let _0x3f361c=_0x6686ab[_0x266c9c];return _0x3f361c;}function a48_0x6686(){const _0x448b2b=['645480CGjqtK','28ZKzEuY','410EoHnaN','9109980PbwAFh','2691310COQUDv','7380spSfsS','2021144QXMPpC','250KqEwoI','468138GLLrhq','541350DWGRdm','8GXgmmw'];a48_0x6686=function(){return _0x448b2b;};return a48_0x6686();}import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4ae79b,_0x1956cb){const _0x3442af=a49_0x41ab,_0x2f114e=_0x4ae79b();while(!![]){try{const _0x250647=-parseInt(_0x3442af(0x13a))/0x1+parseInt(_0x3442af(0x138))/0x2+-parseInt(_0x3442af(0x13b))/0x3+-parseInt(_0x3442af(0x120))/0x4*(-parseInt(_0x3442af(0x139))/0x5)+-parseInt(_0x3442af(0x127))/0x6+parseInt(_0x3442af(0x122))/0x7*(-parseInt(_0x3442af(0x123))/0x8)+-parseInt(_0x3442af(0x11d))/0x9*(-parseInt(_0x3442af(0x125))/0xa);if(_0x250647===_0x1956cb)break;else _0x2f114e['push'](_0x2f114e['shift']());}catch(_0x4e54d8){_0x2f114e['push'](_0x2f114e['shift']());}}}(a49_0xc959,0x533f5));import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0xfd50aa){const _0x10cacf=a49_0x41ab;if(!_0xfd50aa)throw CliErrors[_0x10cacf(0x135)](_0x10cacf(0x12c),'Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.');const _0x508316=_0xfd50aa['id'];if(_0x508316===undefined||_0x508316===null||_0x508316==='')throw CliErrors['validation'](_0x10cacf(0x12e),_0x10cacf(0x11e));}function parseCommandParams(_0x16bdc8){return parseJsonParams(_0x16bdc8)??{};}function a49_0x41ab(_0x1399d3,_0x1b1663){_0x1399d3=_0x1399d3-0x11d;const _0xc95901=a49_0xc959();let _0x41ab6a=_0xc95901[_0x1399d3];return _0x41ab6a;}export function buildDataCommand(_0x2b0c80){const _0x3c6d51=a49_0x41ab,_0x48a2c1=_0x3c6d51(0x126);return{'service':'data','command':_0x2b0c80[_0x3c6d51(0x12a)],'description':_0x2b0c80[_0x3c6d51(0x12d)],'risk':_0x3c6d51(0x131),'defaultOutputFormat':_0x3c6d51(0x121),'helpExtra':_0x2b0c80[_0x3c6d51(0x130)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x3c6d51(0x12b),'type':_0x3c6d51(0x132),'description':_0x48a2c1},{'name':_0x3c6d51(0x12c),'type':_0x3c6d51(0x132),'description':_0x2b0c80['paramsHint']}],async 'validate'(_0x4fc9f0){const _0x58c11a=_0x3c6d51,_0x2a522c=_0x4fc9f0[_0x58c11a(0x124)](_0x58c11a(0x12c));if(_0x2b0c80[_0x58c11a(0x12f)]&&!_0x2a522c)throw CliErrors[_0x58c11a(0x135)]('params',_0x2b0c80[_0x58c11a(0x129)]);const _0x4175c1=parseJsonParams(_0x2a522c);_0x2b0c80[_0x58c11a(0x136)]===_0x58c11a(0x128)&&assertGetOneId(_0x4175c1);},async 'execute'(_0x48741c){const _0xa2fc78=_0x3c6d51,_0xefbe97=parseCommandParams(_0x48741c['str'](_0xa2fc78(0x12c))),_0x1c3970=Date[_0xa2fc78(0x137)](),_0x42b4af=await executeDatasetDataOperation(_0x48741c[_0xa2fc78(0x11f)],_0x48741c['str']('code'),_0x2b0c80[_0xa2fc78(0x136)],_0xefbe97),_0x2fa9cb=Date[_0xa2fc78(0x137)]()-_0x1c3970;return{'ok':!![],'data':{'result':_0x42b4af,'elapsed':_0x2fa9cb},'message':_0xa2fc78(0x133)+_0x2b0c80[_0xa2fc78(0x12a)]+_0xa2fc78(0x134)+_0x2fa9cb+'ms'};}};}function a49_0xc959(){const _0x10c1ec=['5478561IolyMz','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','appCode','54272CPZeBm','compress','7hoOANf','3779448afHGuJ','str','20YNqGKW','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','1336176VbybAV','getOne','paramsHint','command','alias','params','description','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','paramsRequired','helpExtra','read','string','data\x20','\x20completed\x20in\x20','flagMissing','operation','now','75780GTBFLS','160mfQLTj','486716HDrvNX','500100lvoVfI'];a49_0xc959=function(){return _0x10c1ec;};return a49_0xc959();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x36a3eb=a50_0x2d74;function a50_0x2d74(_0x12275a,_0x364350){_0x12275a=_0x12275a-0xaf;const _0x3a4e89=a50_0x3a4e();let _0x2d74c8=_0x3a4e89[_0x12275a];return _0x2d74c8;}(function(_0x47dfc5,_0x5f29dd){const _0x7ab51b=a50_0x2d74,_0x37a959=_0x47dfc5();while(!![]){try{const _0x50beca=parseInt(_0x7ab51b(0xde))/0x1+parseInt(_0x7ab51b(0xb3))/0x2+parseInt(_0x7ab51b(0xd3))/0x3+-parseInt(_0x7ab51b(0xd9))/0x4*(parseInt(_0x7ab51b(0xb0))/0x5)+parseInt(_0x7ab51b(0xd6))/0x6+-parseInt(_0x7ab51b(0xcd))/0x7*(parseInt(_0x7ab51b(0xbe))/0x8)+-parseInt(_0x7ab51b(0xc8))/0x9*(parseInt(_0x7ab51b(0xbd))/0xa);if(_0x50beca===_0x5f29dd)break;else _0x37a959['push'](_0x37a959['shift']());}catch(_0x35a779){_0x37a959['push'](_0x37a959['shift']());}}}(a50_0x3a4e,0x8b536));import{deleteDataset,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a50_0x36a3eb(0xcc),'description':a50_0x36a3eb(0xda)},DBID_FLAG={'name':a50_0x36a3eb(0xbc),'type':a50_0x36a3eb(0xcc),'description':a50_0x36a3eb(0xc6)},CONFIRM_FLAG={'name':'confirm','type':a50_0x36a3eb(0xb8),'description':a50_0x36a3eb(0xb9)},EXPECTED_COUNT_FLAG={'name':a50_0x36a3eb(0xca),'type':a50_0x36a3eb(0xcc),'description':a50_0x36a3eb(0xb5)};export const datasetDelete={'service':'dataset','command':a50_0x36a3eb(0xcb),'description':a50_0x36a3eb(0xe1),'risk':a50_0x36a3eb(0xc4),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x32f36e){const _0x18d613=a50_0x36a3eb,_0xb10207=_0x32f36e[_0x18d613(0xb6)]('id'),_0x1cc955=_0x32f36e[_0x18d613(0xdd)](_0x18d613(0xd1)),_0x41bbec=_0x32f36e[_0x18d613(0xb6)](_0x18d613(0xbc)),_0x26f71b=[_0xb10207>0x0,Boolean(_0x1cc955),_0x41bbec>0x0]['filter'](Boolean);if(_0x26f71b['length']===0x0)throw CliErrors[_0x18d613(0xb4)](_0x18d613(0xaf));if(_0x26f71b[_0x18d613(0xce)]>0x1)throw CliErrors['validation']('Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.');},async 'dryRun'(_0x2213d9){const _0x25e084=a50_0x36a3eb,_0x318696=await resolveTargets(_0x2213d9);return{'method':_0x25e084(0xd0),'url':_0x25e084(0xc7),'body':{'appCode':_0x2213d9[_0x25e084(0xc1)],'count':_0x318696['length'],'datasets':_0x318696},'description':_0x25e084(0xe0)+_0x318696[_0x25e084(0xce)]+'\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.'};},async 'execute'(_0x4db4e2){const _0x135fab=a50_0x36a3eb;if(!_0x4db4e2['bool'](_0x135fab(0xd4)))throw CliErrors[_0x135fab(0xb4)](_0x135fab(0xba),_0x135fab(0xb7));const _0x3fd9c3=await resolveTargets(_0x4db4e2),_0x52c3f2=[],_0x12e14c=[];for(const _0xbc0561 of _0x3fd9c3){try{await deleteDataset(_0x4db4e2[_0x135fab(0xc1)],_0xbc0561['id']),_0x52c3f2['push'](_0xbc0561);}catch(_0xfa6198){_0x12e14c[_0x135fab(0xd8)]({..._0xbc0561,'error':_0xfa6198 instanceof Error?_0xfa6198[_0x135fab(0xd7)]:String(_0xfa6198)});}}if(_0x12e14c[_0x135fab(0xce)]>0x0)return{'ok':![],'data':{'requested':_0x3fd9c3[_0x135fab(0xce)],'deletedCount':_0x52c3f2[_0x135fab(0xce)],'failedCount':_0x12e14c[_0x135fab(0xce)],'deleted':_0x52c3f2,'failed':_0x12e14c},'message':'Deleted\x20'+_0x52c3f2[_0x135fab(0xce)]+'/'+_0x3fd9c3[_0x135fab(0xce)]+_0x135fab(0xb1)+_0x12e14c[_0x135fab(0xce)]+_0x135fab(0xc0)};return{'ok':!![],'data':{'requested':_0x3fd9c3[_0x135fab(0xce)],'deletedCount':_0x52c3f2['length'],'deleted':_0x52c3f2},'message':_0x135fab(0xdc)+_0x52c3f2[_0x135fab(0xce)]+_0x135fab(0xe3)};}};async function resolveTargets(_0x5eb9ce){const _0x2a9369=a50_0x36a3eb,_0x4e6627=_0x5eb9ce[_0x2a9369(0xb6)]('id'),_0x4d9a65=_0x5eb9ce[_0x2a9369(0xdd)](_0x2a9369(0xd1)),_0x57d88d=_0x5eb9ce[_0x2a9369(0xb6)](_0x2a9369(0xbc));let _0x12cc1a;_0x4d9a65?(_0x12cc1a=await listDatasets(_0x5eb9ce['appCode'],{'code':_0x4d9a65}),_0x12cc1a=_0x12cc1a[_0x2a9369(0xe2)](_0x5b3db4=>_0x5b3db4['code']===_0x4d9a65)):(_0x12cc1a=await listDatasets(_0x5eb9ce[_0x2a9369(0xc1)]),_0x4e6627>0x0&&(_0x12cc1a=_0x12cc1a[_0x2a9369(0xe2)](_0x163644=>_0x163644['id']===_0x4e6627)),_0x57d88d>0x0&&(_0x12cc1a=_0x12cc1a['filter'](_0x35e08f=>_0x35e08f[_0x2a9369(0xb2)]?.[_0x2a9369(0xbb)]===_0x57d88d)));const _0x7e75bd=_0x12cc1a[_0x2a9369(0xd2)](normalizeTarget);if(_0x7e75bd[_0x2a9369(0xce)]===0x0){const _0x3ce5d8=_0x4d9a65||(_0x4e6627>0x0?_0x2a9369(0xc5)+_0x4e6627:_0x2a9369(0xc2)+_0x57d88d);throw CliErrors[_0x2a9369(0xb4)]('No\x20undeleted\x20dataset\x20found\x20for\x20'+_0x3ce5d8+'.');}const _0x46307d=_0x5eb9ce[_0x2a9369(0xb6)]('expected-count');if(_0x46307d>0x0&&_0x7e75bd[_0x2a9369(0xce)]!==_0x46307d)throw CliErrors[_0x2a9369(0xb4)](_0x2a9369(0xc9)+_0x7e75bd[_0x2a9369(0xce)]+_0x2a9369(0xe4)+_0x46307d+'.');return _0x7e75bd;}function normalizeTarget(_0x459717){const _0x3d759e=a50_0x36a3eb,_0x176d09=_0x459717[_0x3d759e(0xb2)]??{};return{'id':_0x459717['id'],'code':_0x459717[_0x3d759e(0xd1)],'name':_0x459717[_0x3d759e(0xdb)],'description':_0x459717[_0x3d759e(0xd5)],'source':_0x459717['source'],'dbId':_0x176d09['dbId'],'dbName':_0x176d09[_0x3d759e(0xbf)],'tableName':_0x176d09[_0x3d759e(0xcf)],'relatedPageCount':Array[_0x3d759e(0xdf)](_0x459717[_0x3d759e(0xc3)])?_0x459717[_0x3d759e(0xc3)]['length']:undefined};}function a50_0x3a4e(){const _0x5345bc=['code','map','956370oetaLC','confirm','description','3996402MkpqYK','message','push','44TLiecF','Dataset\x20id','name','Deleted\x20','str','465876vxlqVp','isArray','Would\x20delete\x20','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','filter','\x20dataset(s)','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','439745GDCQze','\x20dataset(s);\x20','dbtableConfig','2214156QEOVNl','validation','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','num','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','boolean','Required\x20to\x20execute\x20dataset\x20deletion','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','dbId','dbid','97490VagjYj','40sRWHOn','dbName','\x20failed','appCode','dbid=','relationPages','high-risk-write','id=','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','/smartapi/dataset/delete-dataset','324DTvFkX','Matched\x20','expected-count','delete','number','936222cOVoJc','length','tableName','POST'];a50_0x3a4e=function(){return _0x5345bc;};return a50_0x3a4e();}
|