@lovrabet/rabetbase-cli 2.1.7-beta.7 → 2.1.7-beta.8
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/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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x59fb99=a33_0x4eea;function a33_0x50ee(){const _0x27c162=['apiDir','scriptsRoot','lockFilePath','7053016ZwlXsX','\x20unchanged','\x20remote-only','functions','boolean','10QQyrCo','push','9311076DPYzzz','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','filePath','1183707OvIWqL','159597uesYbY','\x20added,\x20','72QhQdlT','12hWXneP','all','All\x20BFF\x20scripts\x20are\x20in\x20sync.','remote','bff','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','hash','\x20modified,\x20','bool','10629311TaXPFc','map','length','2775042CSraWf','6fxOwKB','lockKey','1052135QirFmM','3lAYTIr','appCode','status'];a33_0x50ee=function(){return _0x27c162;};return a33_0x50ee();}(function(_0x745cb,_0x4f6e88){const _0x569417=a33_0x4eea,_0x44f325=_0x745cb();while(!![]){try{const _0x22b229=parseInt(_0x569417(0x1d8))/0x1*(parseInt(_0x569417(0x1e8))/0x2)+parseInt(_0x569417(0x1eb))/0x3*(-parseInt(_0x569417(0x1cd))/0x4)+-parseInt(_0x569417(0x1ea))/0x5+parseInt(_0x569417(0x1d4))/0x6+-parseInt(_0x569417(0x1d7))/0x7*(-parseInt(_0x569417(0x1da))/0x8)+parseInt(_0x569417(0x1e7))/0x9*(parseInt(_0x569417(0x1d2))/0xa)+-parseInt(_0x569417(0x1e4))/0xb*(parseInt(_0x569417(0x1db))/0xc);if(_0x22b229===_0x4f6e88)break;else _0x44f325['push'](_0x44f325['shift']());}catch(_0x16c958){_0x44f325['push'](_0x44f325['shift']());}}}(a33_0x50ee,0xe0d46));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a33_0x4eea(_0x4ba8d8,_0x266309){_0x4ba8d8=_0x4ba8d8-0x1c9;const _0x50eee4=a33_0x50ee();let _0x4eea86=_0x50eee4[_0x4ba8d8];return _0x4eea86;}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_0x59fb99(0x1df),'command':'status','description':a33_0x59fb99(0x1d5),'risk':'read','flags':[{'name':a33_0x59fb99(0x1de),'type':a33_0x59fb99(0x1d1),'description':a33_0x59fb99(0x1e0)}],async 'execute'(_0x2b43db){const _0x4aecb5=a33_0x59fb99,_0x4eec8f=loadBffProjectConfig(_0x2b43db['appCode']),_0x188d88=await readBffLockFile(_0x4eec8f[_0x4aecb5(0x1cc)]),{appLock:_0x1dbb69}=ensureLockScope(_0x188d88??createEmptyBffLock(),_0x2b43db[_0x4aecb5(0x1ec)],_0x4eec8f[_0x4aecb5(0x1cb)],_0x4aecb5(0x1c9)),_0x591f4b=await scanLocalBffFunctions(_0x4eec8f),_0x3d0124=[],_0x36a833=[],_0x2f18e4=[];for(const _0x4752d9 of _0x591f4b){const _0x31b076=await computeFileHash(_0x4752d9[_0x4aecb5(0x1d6)]),_0x10661d=_0x1dbb69[_0x4aecb5(0x1d0)][_0x4752d9[_0x4aecb5(0x1e9)]];if(!_0x10661d)_0x3d0124['push'](_0x4752d9['lockKey']);else _0x10661d[_0x4aecb5(0x1e1)]!==_0x31b076?_0x36a833[_0x4aecb5(0x1d3)](_0x4752d9['lockKey']):_0x2f18e4[_0x4aecb5(0x1d3)](_0x4752d9[_0x4aecb5(0x1e9)]);}const _0x4ca2d9=[];if(_0x2b43db[_0x4aecb5(0x1e3)]('remote')){const _0x4e15d5=loadAliasMap(_0x2b43db[_0x4aecb5(0x1ca)],undefined,resolveApiFilePath(_0x2b43db['apiDir'],_0x2b43db[_0x4aecb5(0x1ec)])),_0x1fb6cf=new Map(_0x4e15d5['map'](_0x1644fc=>[_0x1644fc['datasetCode'],_0x1644fc['alias']])),[_0x52a50f,_0x27c50a]=await Promise[_0x4aecb5(0x1dc)]([listBffScripts(_0x2b43db[_0x4aecb5(0x1ec)]),getBffScriptStatistics(_0x2b43db[_0x4aecb5(0x1ec)])]),_0xb70c10=createHookLocationMap(_0x27c50a),_0x199a85=new Set(_0x591f4b[_0x4aecb5(0x1e5)](_0x3d183f=>_0x3d183f['lockKey']));for(const _0x2a60b2 of _0x52a50f){const _0x5a2eca=resolveRemoteScriptTarget(_0x4eec8f,_0x2a60b2,_0xb70c10,_0x1dbb69['functions'],_0x1fb6cf);_0x5a2eca&&!_0x199a85['has'](_0x5a2eca[_0x4aecb5(0x1e9)])&&_0x4ca2d9[_0x4aecb5(0x1d3)](_0x5a2eca['lockKey']);}}const _0x7bfa3=_0x3d0124[_0x4aecb5(0x1e6)]===0x0&&_0x36a833[_0x4aecb5(0x1e6)]===0x0&&_0x4ca2d9[_0x4aecb5(0x1e6)]===0x0;return{'ok':!![],'data':{'added':_0x3d0124,'modified':_0x36a833,'unchanged':_0x2f18e4,'remoteOnly':_0x4ca2d9},'message':_0x7bfa3?_0x4aecb5(0x1dd):_0x3d0124[_0x4aecb5(0x1e6)]+_0x4aecb5(0x1d9)+_0x36a833[_0x4aecb5(0x1e6)]+_0x4aecb5(0x1e2)+_0x2f18e4[_0x4aecb5(0x1e6)]+_0x4aecb5(0x1ce)+(_0x4ca2d9[_0x4aecb5(0x1e6)]>0x0?',\x20'+_0x4ca2d9[_0x4aecb5(0x1e6)]+_0x4aecb5(0x1cf):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a34_0x26788a=a34_0x1742;(function(_0x37a84f,_0xcf9422){const _0x1b6ffc=a34_0x1742,_0x5cbe39=_0x37a84f();while(!![]){try{const _0x37d575=-parseInt(_0x1b6ffc(0x17e))/0x1*(-parseInt(_0x1b6ffc(0x17a))/0x2)+parseInt(_0x1b6ffc(0x15f))/0x3*(-parseInt(_0x1b6ffc(0x132))/0x4)+-parseInt(_0x1b6ffc(0x131))/0x5*(-parseInt(_0x1b6ffc(0x13a))/0x6)+parseInt(_0x1b6ffc(0x143))/0x7+parseInt(_0x1b6ffc(0x160))/0x8*(-parseInt(_0x1b6ffc(0x13d))/0x9)+parseInt(_0x1b6ffc(0x12a))/0xa*(-parseInt(_0x1b6ffc(0x151))/0xb)+-parseInt(_0x1b6ffc(0x152))/0xc*(-parseInt(_0x1b6ffc(0x16a))/0xd);if(_0x37d575===_0xcf9422)break;else _0x5cbe39['push'](_0x5cbe39['shift']());}catch(_0x52adce){_0x5cbe39['push'](_0x5cbe39['shift']());}}}(a34_0x1360,0x77ff3));import a34_0x2d5531 from'chalk';import a34_0x402c91 from'ora';import a34_0x1f059b from'semver';import{execa}from'execa';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';function a34_0x1360(){const _0x3053f3=['\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','cli','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','slice','Updated\x20to\x20v','https://registry.npmjs.org/-/package/','\x20install\x20-g\x20','11Qwhdxv','241284VXqpQu','Requested\x20version:\x20','start','timeout','Install\x20a\x20specific\x20CLI\x20version','log','latest','message','\x20\x20Official\x20skill\x20update\x20failed:\x20','Update\x20failed','yellow','Checking\x20for\x20updates...','update','3bmnvsa','8hoQlYg','red','Beta\x20version:\x20','error','str','gray','no-skills','\x20→\x20','beta','Update\x20available:\x20','377CyQerb','fromEntries','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','info','string','includes','Skipping\x20official\x20skill\x20package\x20(--no-skills).','inherit','validation','skipped','install','succeed','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','pipe','npm','\x20\x20Run\x20manually:\x20','147958vJhVGt','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','@latest','9SddERJ','Updating\x20via\x20','Version\x20comparison\x20failed','version','bool','2889390OPIXsU','fail','\x20\x20Try\x20manually:\x20','nonInteractive','filter','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','valid','460745XLvMFQ','359272hVxesm','cwd','/dist-tags','Invalid\x20version:\x20','unknown','Current\x20version:\x20','source','trim','6nOnbiw','entries','run','7960374OExBSE','bun','toLowerCase','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Checking\x20official\x20skill\x20package...','Already\x20on\x20requested\x20version\x20(v','2895809uZhPvI','map','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','green','boolean','write'];a34_0x1360=function(){return _0x3053f3;};return a34_0x1360();}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 _0x438155=a34_0x1742;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x438155(0x14d)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x1f4d2c=a34_0x1742,_0x3b809c=process['execPath'][_0x1f4d2c(0x13f)]();if(_0x3b809c[_0x1f4d2c(0x16f)](_0x1f4d2c(0x13e)))return _0x1f4d2c(0x13e);return _0x1f4d2c(0x178);}const updateFlags=[{'name':a34_0x26788a(0x168),'type':'boolean','description':a34_0x26788a(0x16c),'default':![]},{'name':a34_0x26788a(0x128),'type':'string','description':a34_0x26788a(0x156)},{'name':'no-skills','type':a34_0x26788a(0x147),'description':'Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','default':![]}];function a34_0x1742(_0x30e21b,_0x167c79){_0x30e21b=_0x30e21b-0x126;const _0x136083=a34_0x1360();let _0x174214=_0x136083[_0x30e21b];return _0x174214;}function getRequestedVersion(_0x400152){const _0x817b12=a34_0x26788a;return _0x400152[_0x817b12(0x164)]('version')[_0x817b12(0x139)]();}async function validateUpdateFlags(_0x317887){const _0x2898a4=a34_0x26788a,_0x15c93e=_0x317887['bool'](_0x2898a4(0x168)),_0x349fb6=getRequestedVersion(_0x317887);if(_0x15c93e&&_0x349fb6)throw CliErrors[_0x2898a4(0x172)](_0x2898a4(0x140),_0x2898a4(0x17c));if(_0x349fb6&&!a34_0x1f059b[_0x2898a4(0x130)](_0x349fb6))throw CliErrors[_0x2898a4(0x172)](_0x2898a4(0x135)+_0x349fb6,_0x2898a4(0x145));}async function fetchNpmDistTags(){const _0x33c242=a34_0x26788a;try{const _0x5d0dd2=await fetch(_0x33c242(0x14f)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x33c242(0x134),{'signal':AbortSignal[_0x33c242(0x155)](0x2710)});if(!_0x5d0dd2['ok'])return null;const _0x400efe=await _0x5d0dd2['json']();if(!_0x400efe||typeof _0x400efe!=='object')return null;return Object[_0x33c242(0x16b)](Object[_0x33c242(0x13b)](_0x400efe)[_0x33c242(0x12e)](([,_0x301438])=>typeof _0x301438===_0x33c242(0x16e)&&_0x301438[_0x33c242(0x139)]()['length']>0x0)[_0x33c242(0x144)](([_0x20959e,_0x2e2f85])=>[_0x20959e,String(_0x2e2f85)[_0x33c242(0x139)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x46c8cc){const _0x5f3ecf=await fetchNpmDistTags();return _0x5f3ecf?.[_0x46c8cc]??null;}async function fetchLatestVersion(){const _0x8bc1f5=a34_0x26788a,_0x5167fa=await fetchNpmDistTagVersion(_0x8bc1f5(0x158));if(_0x5167fa)return _0x5167fa;const _0x4d2db3=await getCdnConfig();return _0x4d2db3?.[_0x8bc1f5(0x14a)]?.['stableVersion']??null;}async function resolveTargetVersion(_0x110492){const _0x5bd90d=a34_0x26788a,_0x4c48c2=getRequestedVersion(_0x110492);if(_0x4c48c2)return{'version':_0x4c48c2,'source':_0x5bd90d(0x128)};if(_0x110492['bool'](_0x5bd90d(0x168))){const _0x2a5f3b=await fetchNpmDistTagVersion(_0x5bd90d(0x168));if(!_0x2a5f3b)return null;return{'version':_0x2a5f3b,'source':_0x5bd90d(0x168)};}const _0x99856=await fetchLatestVersion();if(!_0x99856)return null;return{'version':_0x99856,'source':_0x5bd90d(0x158)};}function shouldInstallTarget(_0x3323d3,_0x2be2b7){const _0x2d377d=a34_0x26788a;if(_0x2be2b7[_0x2d377d(0x138)]==='version')return!a34_0x1f059b['eq'](_0x3323d3,_0x2be2b7[_0x2d377d(0x128)]);return a34_0x1f059b['lt'](_0x3323d3,_0x2be2b7[_0x2d377d(0x128)]);}function getInstallPlanLabel(_0xabcafc,_0x54aa21){const _0x2c8fad=a34_0x26788a;switch(_0x54aa21['source']){case _0x2c8fad(0x168):return _0x2c8fad(0x162)+a34_0x2d5531['yellow'](_0xabcafc)+_0x2c8fad(0x167)+a34_0x2d5531[_0x2c8fad(0x146)](_0x54aa21['version']);case _0x2c8fad(0x128):return _0x2c8fad(0x153)+a34_0x2d5531[_0x2c8fad(0x15c)](_0xabcafc)+_0x2c8fad(0x167)+a34_0x2d5531[_0x2c8fad(0x146)](_0x54aa21[_0x2c8fad(0x128)]);case _0x2c8fad(0x158):default:return _0x2c8fad(0x169)+a34_0x2d5531[_0x2c8fad(0x15c)](_0xabcafc)+'\x20→\x20'+a34_0x2d5531[_0x2c8fad(0x146)](_0x54aa21[_0x2c8fad(0x128)]);}}async function installOfficialSkill(_0x4339af){const _0x3d09ce=a34_0x26788a;console['log'](a34_0x2d5531['gray'](_0x3d09ce(0x141)));const _0x2fdf84=runNpxSkillsAddGlobal(process[_0x3d09ce(0x133)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x4339af?_0x3d09ce(0x177):_0x3d09ce(0x171)});if(_0x2fdf84[_0x3d09ce(0x173)]){console['log'](a34_0x2d5531[_0x3d09ce(0x165)](_0x3d09ce(0x149)));return;}if(_0x2fdf84['ok']){console[_0x3d09ce(0x157)](a34_0x2d5531[_0x3d09ce(0x165)](_0x3d09ce(0x14c)));return;}console['warn'](a34_0x2d5531['yellow'](_0x3d09ce(0x15a)+(_0x2fdf84[_0x3d09ce(0x163)]||_0x3d09ce(0x136)))),console[_0x3d09ce(0x157)](a34_0x2d5531[_0x3d09ce(0x165)](_0x3d09ce(0x179)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x521bed){const _0x101262=a34_0x26788a;await validateUpdateFlags(_0x521bed);const _0x3f0153=getCurrentVersion();console[_0x101262(0x157)](_0x101262(0x137)+_0x3f0153);const _0x419cdf=a34_0x402c91(_0x101262(0x15d))[_0x101262(0x154)](),_0x3ca1fd=await resolveTargetVersion(_0x521bed);if(!_0x3ca1fd){const _0x29a224=_0x521bed[_0x101262(0x129)](_0x101262(0x168))?_0x101262(0x14b):_0x101262(0x12f);return _0x419cdf[_0x101262(0x12b)](_0x29a224),console[_0x101262(0x157)](a34_0x2d5531[_0x101262(0x165)](_0x101262(0x176)+NPM_PACKAGE_NAME+_0x101262(0x17d))),{'ok':![],'message':_0x29a224};}const _0x3f6383=a34_0x1f059b[_0x101262(0x130)](VERSION),_0x169f69=a34_0x1f059b[_0x101262(0x130)](_0x3ca1fd[_0x101262(0x128)]);if(!_0x3f6383||!_0x169f69)return _0x419cdf[_0x101262(0x12b)](_0x101262(0x127)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x3f6383,_0x3ca1fd)){const _0x3f3b2e=_0x3ca1fd[_0x101262(0x138)]===_0x101262(0x128)?_0x101262(0x142)+_0x3ca1fd[_0x101262(0x128)]+')':'Already\x20up\x20to\x20date\x20(v'+_0x3ca1fd[_0x101262(0x128)]+')';return _0x419cdf[_0x101262(0x175)](_0x3f3b2e),!_0x521bed[_0x101262(0x129)](_0x101262(0x166))?await installOfficialSkill(_0x521bed[_0x101262(0x12d)]):console['log'](a34_0x2d5531[_0x101262(0x165)](_0x101262(0x170))),{'ok':!![]};}_0x419cdf[_0x101262(0x16d)](getInstallPlanLabel(_0x3f0153,_0x3ca1fd));const _0x58b95a=detectPackageManager(),_0x3ee471=_0x58b95a===_0x101262(0x178)?resolveNpmBin(_0x101262(0x178)):_0x58b95a,_0x12726a=a34_0x402c91(_0x101262(0x126)+_0x58b95a+'...')[_0x101262(0x154)]();try{return await execa(_0x3ee471,[_0x101262(0x174),'-g',NPM_PACKAGE_NAME+'@'+_0x3ca1fd[_0x101262(0x128)]],{'stdio':_0x101262(0x177)}),_0x12726a[_0x101262(0x175)](_0x101262(0x14e)+_0x3ca1fd[_0x101262(0x128)]),console[_0x101262(0x157)](a34_0x2d5531[_0x101262(0x165)](_0x101262(0x17b))),!_0x521bed[_0x101262(0x129)](_0x101262(0x166))?await installOfficialSkill(_0x521bed[_0x101262(0x12d)]):console[_0x101262(0x157)](a34_0x2d5531[_0x101262(0x165)](_0x101262(0x170))),{'ok':!![]};}catch(_0x5dbadf){return _0x12726a[_0x101262(0x12b)](_0x101262(0x15b)),console[_0x101262(0x163)](a34_0x2d5531[_0x101262(0x161)]('\x20\x20'+_0x5dbadf[_0x101262(0x159)])),console[_0x101262(0x157)](a34_0x2d5531[_0x101262(0x165)](_0x101262(0x12c)+_0x58b95a+_0x101262(0x150)+NPM_PACKAGE_NAME+'@'+_0x3ca1fd[_0x101262(0x128)])),{'ok':![],'message':_0x5dbadf[_0x101262(0x159)]};}}export const updateDefinition={'service':a34_0x26788a(0x15e),'command':a34_0x26788a(0x13c),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a34_0x26788a(0x148),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a34_0x2068ea=a34_0xff05;function a34_0x3eb0(){const _0x212b78=['latest','toLowerCase','object','5117VfCbxs','\x20\x20Run\x20manually:\x20','\x20→\x20','126TWWNFE','Skipping\x20official\x20skill\x20package\x20(--no-skills).','update','red','Requested\x20version:\x20','9484648SmDdpi','158799LMxkxm','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','Already\x20up\x20to\x20date\x20(v','9110367DqpNML','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','\x20\x20Try\x20manually:\x20','15067635tDQnRe','start','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','354KNlFXW','bool','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','includes','valid','Update\x20available:\x20','fail','nonInteractive','error','Checking\x20official\x20skill\x20package...','Updating\x20via\x20','log','map','skipped','fromEntries','inherit','skills','10DRvOcn','Already\x20on\x20requested\x20version\x20(v','install','beta','Current\x20version:\x20','string','Beta\x20version:\x20','Update\x20failed','filter','slice','unknown','message','\x20install\x20-g\x20','/dist-tags','str','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','length','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','no-skills','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Updated\x20to\x20v','info','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','bun','...','yellow','Install\x20a\x20specific\x20CLI\x20version','Invalid\x20version:\x20','trim','warn','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','execPath','Version\x20comparison\x20failed','stableVersion','boolean','source','version','green','4hroaln','Checking\x20for\x20updates...','npm','write','gray','\x20\x20Official\x20skill\x20update\x20failed:\x20','335448uyNEsy','90045DjXkZQ'];a34_0x3eb0=function(){return _0x212b78;};return a34_0x3eb0();}(function(_0x5badc1,_0x3fa5fc){const _0x4f3903=a34_0xff05,_0x2f1343=_0x5badc1();while(!![]){try{const _0x336436=parseInt(_0x4f3903(0x82))/0x1*(parseInt(_0x4f3903(0x94))/0x2)+-parseInt(_0x4f3903(0x8b))/0x3*(parseInt(_0x4f3903(0x77))/0x4)+-parseInt(_0x4f3903(0x7e))/0x5+-parseInt(_0x4f3903(0x7d))/0x6*(-parseInt(_0x4f3903(0x85))/0x7)+parseInt(_0x4f3903(0x8a))/0x8+-parseInt(_0x4f3903(0x8e))/0x9*(parseInt(_0x4f3903(0xa5))/0xa)+-parseInt(_0x4f3903(0x91))/0xb;if(_0x336436===_0x3fa5fc)break;else _0x2f1343['push'](_0x2f1343['shift']());}catch(_0x16a31a){_0x2f1343['push'](_0x2f1343['shift']());}}}(a34_0x3eb0,0x9d624));import a34_0x377eec from'chalk';import a34_0x4751ad from'ora';import a34_0x2ee95e 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 _0x8d861b=a34_0xff05;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x8d861b(0xae)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x538e2c=a34_0xff05,_0x248ad1=process[_0x538e2c(0x70)][_0x538e2c(0x80)]();if(_0x248ad1[_0x538e2c(0x97)]('bun'))return _0x538e2c(0x68);return _0x538e2c(0x79);}const updateFlags=[{'name':a34_0x2068ea(0xa8),'type':a34_0x2068ea(0x73),'description':a34_0x2068ea(0xb8),'default':![]},{'name':a34_0x2068ea(0x75),'type':'string','description':a34_0x2068ea(0x6b)},{'name':a34_0x2068ea(0xb7),'type':a34_0x2068ea(0x73),'description':a34_0x2068ea(0x8c),'default':![]},{'name':a34_0x2068ea(0xa4),'type':a34_0x2068ea(0x73),'description':'Refresh\x20official\x20skill\x20package\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x49d1a2){const _0x231365=a34_0x2068ea;return _0x49d1a2[_0x231365(0xb3)](_0x231365(0x75))[_0x231365(0x6d)]();}function shouldSkipOfficialSkill(_0x52f584){const _0x5be758=a34_0x2068ea;return _0x52f584['bool'](_0x5be758(0xb7))||_0x52f584['flag'](_0x5be758(0xa4))===![];}async function validateUpdateFlags(_0x1f0728){const _0x2a5362=a34_0x2068ea,_0x300080=_0x1f0728[_0x2a5362(0x95)](_0x2a5362(0xa8)),_0x10ed7d=getRequestedVersion(_0x1f0728);if(_0x300080&&_0x10ed7d)throw CliErrors['validation'](_0x2a5362(0x93),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x10ed7d&&!a34_0x2ee95e[_0x2a5362(0x98)](_0x10ed7d))throw CliErrors['validation'](_0x2a5362(0x6c)+_0x10ed7d,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x3a51a5=a34_0x2068ea;try{const _0x2739c2=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x3a51a5(0xb2),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x2739c2['ok'])return null;const _0x5e0d00=await _0x2739c2['json']();if(!_0x5e0d00||typeof _0x5e0d00!==_0x3a51a5(0x81))return null;return Object[_0x3a51a5(0xa2)](Object['entries'](_0x5e0d00)[_0x3a51a5(0xad)](([,_0x5ac9d1])=>typeof _0x5ac9d1===_0x3a51a5(0xaa)&&_0x5ac9d1['trim']()[_0x3a51a5(0xb5)]>0x0)[_0x3a51a5(0xa0)](([_0x1e8b1d,_0x2309a0])=>[_0x1e8b1d,String(_0x2309a0)[_0x3a51a5(0x6d)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x2339c3){const _0x4c072b=await fetchNpmDistTags();return _0x4c072b?.[_0x2339c3]??null;}async function fetchLatestVersion(){const _0x29fd9d=a34_0x2068ea,_0x4eea5c=await fetchNpmDistTagVersion(_0x29fd9d(0x7f));if(_0x4eea5c)return _0x4eea5c;const _0x5c0490=await getCdnConfig();return _0x5c0490?.['cli']?.[_0x29fd9d(0x72)]??null;}async function resolveTargetVersion(_0x415acf){const _0x1b1589=a34_0x2068ea,_0x4cd882=getRequestedVersion(_0x415acf);if(_0x4cd882)return{'version':_0x4cd882,'source':_0x1b1589(0x75)};if(_0x415acf[_0x1b1589(0x95)](_0x1b1589(0xa8))){const _0x1ce7c9=await fetchNpmDistTagVersion(_0x1b1589(0xa8));if(!_0x1ce7c9)return null;return{'version':_0x1ce7c9,'source':_0x1b1589(0xa8)};}const _0x497199=await fetchLatestVersion();if(!_0x497199)return null;return{'version':_0x497199,'source':_0x1b1589(0x7f)};}function shouldInstallTarget(_0x2be9dd,_0x359e69){const _0x33f2af=a34_0x2068ea;if(_0x359e69[_0x33f2af(0x74)]===_0x33f2af(0x75))return!a34_0x2ee95e['eq'](_0x2be9dd,_0x359e69[_0x33f2af(0x75)]);return a34_0x2ee95e['lt'](_0x2be9dd,_0x359e69[_0x33f2af(0x75)]);}function a34_0xff05(_0x398a0e,_0x330998){_0x398a0e=_0x398a0e-0x65;const _0x3eb0cd=a34_0x3eb0();let _0xff05be=_0x3eb0cd[_0x398a0e];return _0xff05be;}function getInstallPlanLabel(_0x336140,_0x29bf6d){const _0x14c812=a34_0x2068ea;switch(_0x29bf6d[_0x14c812(0x74)]){case _0x14c812(0xa8):return _0x14c812(0xab)+a34_0x377eec[_0x14c812(0x6a)](_0x336140)+_0x14c812(0x84)+a34_0x377eec[_0x14c812(0x76)](_0x29bf6d[_0x14c812(0x75)]);case _0x14c812(0x75):return _0x14c812(0x89)+a34_0x377eec[_0x14c812(0x6a)](_0x336140)+_0x14c812(0x84)+a34_0x377eec[_0x14c812(0x76)](_0x29bf6d[_0x14c812(0x75)]);case _0x14c812(0x7f):default:return _0x14c812(0x99)+a34_0x377eec[_0x14c812(0x6a)](_0x336140)+'\x20→\x20'+a34_0x377eec[_0x14c812(0x76)](_0x29bf6d[_0x14c812(0x75)]);}}async function installOfficialSkill(_0x315e05){const _0x311594=a34_0x2068ea;console[_0x311594(0x9f)](a34_0x377eec[_0x311594(0x7b)](_0x311594(0x9d)));const _0x13f6c4=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x315e05?'pipe':_0x311594(0xa3)});if(_0x13f6c4[_0x311594(0xa1)]){console[_0x311594(0x9f)](a34_0x377eec['gray'](_0x311594(0xb4)));return;}if(_0x13f6c4['ok']){console[_0x311594(0x9f)](a34_0x377eec[_0x311594(0x7b)](_0x311594(0x6f)));return;}console[_0x311594(0x6e)](a34_0x377eec[_0x311594(0x6a)](_0x311594(0x7c)+(_0x13f6c4['error']||_0x311594(0xaf)))),console['log'](a34_0x377eec['gray'](_0x311594(0x83)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x567256){const _0x12af55=a34_0x2068ea;await validateUpdateFlags(_0x567256);const _0x333fcb=getCurrentVersion();console[_0x12af55(0x9f)](_0x12af55(0xa9)+_0x333fcb);const _0x1aac96=a34_0x4751ad(_0x12af55(0x78))[_0x12af55(0x92)](),_0x35d234=await resolveTargetVersion(_0x567256);if(!_0x35d234){const _0x3536=_0x567256[_0x12af55(0x95)]('beta')?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x12af55(0x67);return _0x1aac96[_0x12af55(0x9a)](_0x3536),console[_0x12af55(0x9f)](a34_0x377eec[_0x12af55(0x7b)](_0x12af55(0xb6)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x3536};}const _0x482d76=a34_0x2ee95e['valid'](VERSION),_0x49880f=a34_0x2ee95e['valid'](_0x35d234[_0x12af55(0x75)]);if(!_0x482d76||!_0x49880f)return _0x1aac96[_0x12af55(0x9a)](_0x12af55(0x71)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x482d76,_0x35d234)){const _0x1961c8=_0x35d234[_0x12af55(0x74)]==='version'?_0x12af55(0xa6)+_0x35d234[_0x12af55(0x75)]+')':_0x12af55(0x8d)+_0x35d234[_0x12af55(0x75)]+')';return _0x1aac96['succeed'](_0x1961c8),shouldSkipOfficialSkill(_0x567256)?console['log'](a34_0x377eec['gray'](_0x12af55(0x86))):await installOfficialSkill(_0x567256[_0x12af55(0x9b)]),{'ok':!![]};}_0x1aac96[_0x12af55(0x66)](getInstallPlanLabel(_0x333fcb,_0x35d234));const _0x17bc94=detectPackageManager(),_0x21bebc=_0x17bc94==='npm'?resolveNpmBin('npm'):_0x17bc94,_0x36532b=a34_0x4751ad(_0x12af55(0x9e)+_0x17bc94+_0x12af55(0x69))['start']();try{return await execa(_0x21bebc,[_0x12af55(0xa7),'-g',NPM_PACKAGE_NAME+'@'+_0x35d234['version']],{'stdio':'pipe'}),_0x36532b['succeed'](_0x12af55(0x65)+_0x35d234['version']),console['log'](a34_0x377eec[_0x12af55(0x7b)](_0x12af55(0x96))),shouldSkipOfficialSkill(_0x567256)?console['log'](a34_0x377eec[_0x12af55(0x7b)]('Skipping\x20official\x20skill\x20package\x20(--no-skills).')):await installOfficialSkill(_0x567256['nonInteractive']),{'ok':!![]};}catch(_0x3efbd1){return _0x36532b[_0x12af55(0x9a)](_0x12af55(0xac)),console[_0x12af55(0x9c)](a34_0x377eec[_0x12af55(0x88)]('\x20\x20'+_0x3efbd1[_0x12af55(0xb0)])),console[_0x12af55(0x9f)](a34_0x377eec[_0x12af55(0x7b)](_0x12af55(0x90)+_0x17bc94+_0x12af55(0xb1)+NPM_PACKAGE_NAME+'@'+_0x35d234[_0x12af55(0x75)])),{'ok':![],'message':_0x3efbd1[_0x12af55(0xb0)]};}}export const updateDefinition={'service':a34_0x2068ea(0x87),'command':'run','description':a34_0x2068ea(0x8f),'risk':a34_0x2068ea(0x7a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a35_0x3f5f(){const _0x4b4238=['3297ewVjbv','57222EDTBRe','2521500vwNjGi','25720134lQoJar','35Umjvvq','10448eMWJxK','40yutlXb','7158177FIfuNe','26246CkRkct','10sdbfpi','184484wNsAJM'];a35_0x3f5f=function(){return _0x4b4238;};return a35_0x3f5f();}(function(_0x40270e,_0x10639d){const _0x320e09=a35_0x312d,_0x4bdd8c=_0x40270e();while(!![]){try{const _0x2cb05e=-parseInt(_0x320e09(0x18c))/0x1*(-parseInt(_0x320e09(0x18e))/0x2)+-parseInt(_0x320e09(0x193))/0x3+parseInt(_0x320e09(0x190))/0x4*(parseInt(_0x320e09(0x195))/0x5)+parseInt(_0x320e09(0x192))/0x6+parseInt(_0x320e09(0x191))/0x7*(-parseInt(_0x320e09(0x196))/0x8)+-parseInt(_0x320e09(0x18d))/0x9*(parseInt(_0x320e09(0x18f))/0xa)+parseInt(_0x320e09(0x194))/0xb;if(_0x2cb05e===_0x10639d)break;else _0x4bdd8c['push'](_0x4bdd8c['shift']());}catch(_0x4cd4ab){_0x4bdd8c['push'](_0x4bdd8c['shift']());}}}(a35_0x3f5f,0xe6987));import{codegenSdk}from'../../commands/codegen/sdk.js';function a35_0x312d(_0x2ec8a7,_0x5afa85){_0x2ec8a7=_0x2ec8a7-0x18c;const _0x3f5fa2=a35_0x3f5f();let _0x312dbd=_0x3f5fa2[_0x2ec8a7];return _0x312dbd;}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a36_0x29d7(_0x39c312,_0x40fbbc){_0x39c312=_0x39c312-0x148;const _0x52f485=a36_0x52f4();let _0x29d7d4=_0x52f485[_0x39c312];return _0x29d7d4;}const a36_0xb684bf=a36_0x29d7;function a36_0x52f4(){const _0x1e29d8=['1659250VRRopO','skip-imports','name','422fOqazz','appCode','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','operation','string','Omit\x20import\x20statements\x20from\x20generated\x20code','786534zJOIdy','1181eAwxxI','bool','2841HkYXXA','136OOADQl','boolean','code','4864904msOrVr','931336WvipDC','alias','str','tableName','9RVuryY','294ebCyIw','read','26745wTiGQP'];a36_0x52f4=function(){return _0x1e29d8;};return a36_0x52f4();}(function(_0x3a1d42,_0x202903){const _0x3584b0=a36_0x29d7,_0x26f834=_0x3a1d42();while(!![]){try{const _0x982bdc=-parseInt(_0x3584b0(0x152))/0x1*(parseInt(_0x3584b0(0x14b))/0x2)+-parseInt(_0x3584b0(0x154))/0x3*(-parseInt(_0x3584b0(0x155))/0x4)+-parseInt(_0x3584b0(0x160))/0x5*(parseInt(_0x3584b0(0x15e))/0x6)+-parseInt(_0x3584b0(0x151))/0x7+-parseInt(_0x3584b0(0x159))/0x8*(-parseInt(_0x3584b0(0x15d))/0x9)+parseInt(_0x3584b0(0x148))/0xa+parseInt(_0x3584b0(0x158))/0xb;if(_0x982bdc===_0x202903)break;else _0x26f834['push'](_0x26f834['shift']());}catch(_0x1ecd58){_0x26f834['push'](_0x26f834['shift']());}}}(a36_0x52f4,0x2081e));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':'sdk','description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':a36_0xb684bf(0x15f),'flags':[CODE_FLAG_OPTIONAL,{'name':a36_0xb684bf(0x15a),'type':'string','description':a36_0xb684bf(0x14d)},{'name':a36_0xb684bf(0x14e),'type':a36_0xb684bf(0x14f),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a36_0xb684bf(0x149),'type':a36_0xb684bf(0x156),'description':a36_0xb684bf(0x150)}],async 'execute'(_0x3a6485){const _0x5f3f39=a36_0xb684bf,{dataset:_0x2dd5ac,operation:_0x57eb3d}=await getOperationDetail(_0x3a6485[_0x5f3f39(0x14c)],_0x3a6485[_0x5f3f39(0x15b)](_0x5f3f39(0x157)),_0x3a6485[_0x5f3f39(0x15b)]('operation')),_0x96184a=generateSdkCode(_0x2dd5ac,_0x57eb3d,{'includeImports':!_0x3a6485[_0x5f3f39(0x153)](_0x5f3f39(0x149))});return{'ok':!![],'data':{'dataset':{'name':_0x2dd5ac[_0x5f3f39(0x14a)],'code':_0x2dd5ac[_0x5f3f39(0x157)],'tableName':_0x2dd5ac[_0x5f3f39(0x15c)]},'operation':_0x3a6485[_0x5f3f39(0x15b)](_0x5f3f39(0x14e)),'code':_0x96184a}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a37_0x121085=a37_0x34ed;(function(_0x522260,_0x4796c5){const _0x5f1c42=a37_0x34ed,_0x25eeef=_0x522260();while(!![]){try{const _0x2d4578=parseInt(_0x5f1c42(0x159))/0x1*(parseInt(_0x5f1c42(0x16b))/0x2)+parseInt(_0x5f1c42(0x155))/0x3+parseInt(_0x5f1c42(0x16a))/0x4+parseInt(_0x5f1c42(0x168))/0x5*(-parseInt(_0x5f1c42(0x162))/0x6)+parseInt(_0x5f1c42(0x15b))/0x7*(parseInt(_0x5f1c42(0x169))/0x8)+-parseInt(_0x5f1c42(0x165))/0x9*(parseInt(_0x5f1c42(0x166))/0xa)+-parseInt(_0x5f1c42(0x160))/0xb;if(_0x2d4578===_0x4796c5)break;else _0x25eeef['push'](_0x25eeef['shift']());}catch(_0x576750){_0x25eeef['push'](_0x25eeef['shift']());}}}(a37_0x25f6,0x9a8a1));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a37_0x121085(0x157),'command':a37_0x121085(0x164),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':'read','flags':[SQLCODE_FLAG,{'name':a37_0x121085(0x15a),'type':'string','description':a37_0x121085(0x15f),'default':a37_0x121085(0x167),'enum':[a37_0x121085(0x167),a37_0x121085(0x15c)]},{'name':'no-imports','type':a37_0x121085(0x156),'description':a37_0x121085(0x158)}],async 'execute'(_0x19fbda){const _0x5f25f5=a37_0x121085,_0x2371b2=await getSqlQueryInfo(_0x19fbda['appCode'],_0x19fbda[_0x5f25f5(0x163)](_0x5f25f5(0x161))),_0x278516=_0x19fbda['str']('target')||_0x5f25f5(0x167),_0x586177=generateSqlCodeTemplate(_0x2371b2,{'target':_0x278516,'includeImports':!_0x19fbda[_0x5f25f5(0x15e)](_0x5f25f5(0x15d))});return{'ok':!![],'data':{'sqlCode':_0x2371b2[_0x5f25f5(0x16c)],'sqlName':_0x2371b2['sqlName'],'target':_0x278516,'code':_0x586177}};}};function a37_0x34ed(_0x597835,_0x46a482){_0x597835=_0x597835-0x155;const _0x25f645=a37_0x25f6();let _0x34ed8c=_0x25f645[_0x597835];return _0x34ed8c;}function a37_0x25f6(){const _0xaa240e=['no-imports','bool','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','8524318oMHaSa','sqlcode','1933464FNMlBt','str','sql','162vNQCez','283770aRhbgS','sdk','5FatVtD','40088eGaxta','3425780uvvrhp','4EglmBE','sqlCode','1621815JQAuma','boolean','codegen','Omit\x20import\x20statements\x20from\x20generated\x20code','374351vetkFH','target','133NniRKy','bff'];a37_0x25f6=function(){return _0xaa240e;};return a37_0x25f6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x32852f,_0x1795c6){const _0x1b268c=a38_0x4105,_0x53307a=_0x32852f();while(!![]){try{const _0x192b13=-parseInt(_0x1b268c(0xeb))/0x1+parseInt(_0x1b268c(0x102))/0x2*(-parseInt(_0x1b268c(0xef))/0x3)+parseInt(_0x1b268c(0xe8))/0x4+-parseInt(_0x1b268c(0xf2))/0x5+parseInt(_0x1b268c(0x101))/0x6*(parseInt(_0x1b268c(0x100))/0x7)+parseInt(_0x1b268c(0xf8))/0x8*(parseInt(_0x1b268c(0xe6))/0x9)+-parseInt(_0x1b268c(0x104))/0xa*(parseInt(_0x1b268c(0xe7))/0xb);if(_0x192b13===_0x1795c6)break;else _0x53307a['push'](_0x53307a['shift']());}catch(_0x2e33a9){_0x53307a['push'](_0x53307a['shift']());}}}(a38_0x5d0a,0x2b3d6));import{input,checkbox,select}from'@inquirer/prompts';import a38_0x58aa42 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 _0x53dbb9=a38_0x4105,_0x574c45=await input({'message':_0x53dbb9(0xf0),'validate':_0x389fbf=>{const _0x5d5627=_0x53dbb9,_0x3d9e0f=validateAppcode(_0x389fbf[_0x5d5627(0xed)]());return _0x3d9e0f['valid']||_0x3d9e0f[_0x5d5627(0xf9)]||_0x5d5627(0xf7);}});return _0x574c45['trim']();}export async function promptAppSelection(_0x170637){const _0x4c3ab3=a38_0x4105,_0x5910b1=[{'name':a38_0x58aa42[_0x4c3ab3(0xf3)](_0x4c3ab3(0xea)),'value':-0x1},..._0x170637[_0x4c3ab3(0xff)]((_0x4e14dc,_0x259d25)=>({'name':_0x4e14dc[_0x4c3ab3(0x108)]+'\x20\x20'+a38_0x58aa42[_0x4c3ab3(0xf4)]('('+_0x4e14dc[_0x4c3ab3(0xf6)]+')'),'value':_0x259d25}))],_0x2bd9fc=await checkbox({'message':_0x4c3ab3(0xf1)+a38_0x58aa42['cyan'](_0x170637['length'])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x5910b1,'loop':![]});if(_0x2bd9fc[_0x4c3ab3(0xec)](-0x1))return _0x4c3ab3(0xfe);if(_0x2bd9fc[_0x4c3ab3(0x103)]===0x0)return _0x4c3ab3(0xfe);return _0x2bd9fc[_0x4c3ab3(0xff)](_0x4a31b0=>_0x170637[_0x4a31b0]);}export async function promptSingleAppSelection(_0x23c411){const _0x2d805e=a38_0x4105,_0x47229d=[{'name':a38_0x58aa42[_0x2d805e(0xf4)](_0x2d805e(0x107)),'value':_0x2d805e(0xfb)},{'name':a38_0x58aa42['yellow'](_0x2d805e(0xea)),'value':_0x2d805e(0xfe)},..._0x23c411[_0x2d805e(0xff)](_0x1893e6=>({'name':_0x1893e6[_0x2d805e(0x108)]+'\x20\x20'+a38_0x58aa42['gray']('('+_0x1893e6[_0x2d805e(0xf6)]+')'),'value':_0x1893e6[_0x2d805e(0xf6)]}))],_0xed0113=await select({'message':'请选择要绑定的应用:','choices':_0x47229d});if(_0xed0113==='skip')return'skip';if(_0xed0113===_0x2d805e(0xfe))return _0x2d805e(0xfe);return _0x23c411[_0x2d805e(0x106)](_0xb28fae=>_0xb28fae[_0x2d805e(0xf6)]===_0xed0113);}export async function selectSingleAppcode(_0x40c58f){const _0xfc5d96=a38_0x4105;if(!_0x40c58f)return writeCliSideChannelLine(a38_0x58aa42[_0xfc5d96(0xf4)](_0xfc5d96(0xfc))),_fallbackOrSkip();writeCliSideChannelLine(_0xfc5d96(0xee));let _0x3ab088;try{_0x3ab088=await withActiveCookie(_0x40c58f,()=>listRemoteApps());}catch(_0x329313){writeCliSideChannelLine(a38_0x58aa42[_0xfc5d96(0xf3)]('无法获取远程应用列表,请手动输入。'));if(_0x329313 instanceof Error)writeCliSideChannelLine(a38_0x58aa42[_0xfc5d96(0xf4)](_0xfc5d96(0x105)+_0x329313['message']+')'));return _fallbackOrSkip();}if(_0x3ab088[_0xfc5d96(0x103)]===0x0)return writeCliSideChannelLine(a38_0x58aa42[_0xfc5d96(0xf3)]('未找到可用应用。')),_fallbackOrSkip();const _0x20cdda=await promptSingleAppSelection(_0x3ab088);if(_0x20cdda===_0xfc5d96(0xfb))return'';if(_0x20cdda===_0xfc5d96(0xfe))return promptCustomAppcode();return _0x20cdda[_0xfc5d96(0xf6)];}export async function selectMultipleApps(_0x27a1af){const _0x19bcd0=a38_0x4105;writeCliSideChannelLine(_0x19bcd0(0xee));let _0x5a9277;try{_0x5a9277=await withActiveCookie(_0x27a1af,()=>listRemoteApps());}catch(_0x48bc35){writeCliSideChannelLine(_0x19bcd0(0xf5));if(_0x48bc35 instanceof Error)writeCliSideChannelLine(_0x19bcd0(0x105)+_0x48bc35[_0x19bcd0(0xf9)]+')');return _0x19bcd0(0xfe);}if(_0x5a9277[_0x19bcd0(0x103)]===0x0)return writeCliSideChannelLine(_0x19bcd0(0xfa)),_0x19bcd0(0xfe);return promptAppSelection(_0x5a9277);}async function _fallbackOrSkip(){const _0x3c0696=a38_0x4105,_0xe817c5=await select({'message':_0x3c0696(0xe9),'choices':[{'name':a38_0x58aa42['gray'](_0x3c0696(0xfd)),'value':_0x3c0696(0xfb)},{'name':a38_0x58aa42[_0x3c0696(0xf3)]('✎\x20手动输入'),'value':'manual'}]});if(_0xe817c5==='skip')return'';return promptCustomAppcode();}function a38_0x4105(_0x130a84,_0x29d5e3){_0x130a84=_0x130a84-0xe6;const _0x5d0a35=a38_0x5d0a();let _0x410519=_0x5d0a35[_0x130a84];return _0x410519;}function a38_0x5d0a(){const _0x1a5f70=['custom','map','42qwOPOq','322548iRxZRr','147362cVjYvj','length','12170bMHJlp','\x20\x20(','find','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','appName','90PpeFTu','275POGhpM','414528pMIPhV','App\x20Code:','✎\x20自定义输入\x20appcode','71701xuxCOw','includes','trim','正在获取可用应用列表...','3ikxkLM','请输入\x20App\x20Code:','获取到\x20','844615wQmkQJ','yellow','gray','\x0a无法获取远程应用列表,请手动输入。','appCode','Invalid\x20App\x20Code','76528RAthNx','message','\x0a未找到可用应用。','skip','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','(跳过,稍后配置)'];a38_0x5d0a=function(){return _0x1a5f70;};return a38_0x5d0a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a39_0x4eccff=a39_0x1e5b;(function(_0x3af511,_0x485e39){const _0x5cbb09=a39_0x1e5b,_0x40570a=_0x3af511();while(!![]){try{const _0x48f1cc=-parseInt(_0x5cbb09(0x1a1))/0x1+-parseInt(_0x5cbb09(0x1a8))/0x2*(parseInt(_0x5cbb09(0x1a2))/0x3)+-parseInt(_0x5cbb09(0x19f))/0x4+-parseInt(_0x5cbb09(0x193))/0x5*(parseInt(_0x5cbb09(0x194))/0x6)+parseInt(_0x5cbb09(0x1a6))/0x7+parseInt(_0x5cbb09(0x1a9))/0x8*(-parseInt(_0x5cbb09(0x196))/0x9)+parseInt(_0x5cbb09(0x1a0))/0xa;if(_0x48f1cc===_0x485e39)break;else _0x40570a['push'](_0x40570a['shift']());}catch(_0x2d79d2){_0x40570a['push'](_0x40570a['shift']());}}}(a39_0xbafa,0xc9f12));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a39_0x4eccff(0x19a)};export const CODE_FLAG={'name':a39_0x4eccff(0x198),'type':a39_0x4eccff(0x1a7),'required':!![],'description':a39_0x4eccff(0x19b),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};function a39_0xbafa(){const _0x37925b=['1467464zEJdMF','11316kvyUva','Database\x20product\x20type','MYSQL','datasetcode','10592120PTMksS','string','142vITrEj','2072pUOaNT','dbtype','2209685RlBUhG','6uLagaj','sqlcode','33903GQCjGK','POSTGRESQL','code','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','Dataset\x20code\x20(32-char\x20hex\x20UUID)','appcode','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','4622404ICDzPe','36224610JEswXS'];a39_0xbafa=function(){return _0x37925b;};return a39_0xbafa();}export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a39_0x4eccff(0x1a5),'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)'};export const SQLCODE_FLAG={'name':a39_0x4eccff(0x195),'type':a39_0x4eccff(0x1a7),'required':!![],'description':a39_0x4eccff(0x199),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a39_0x4eccff(0x19e)}};function a39_0x1e5b(_0x1a5fce,_0x893c1a){_0x1a5fce=_0x1a5fce-0x193;const _0xbafa1d=a39_0xbafa();let _0x1e5bd2=_0xbafa1d[_0x1a5fce];return _0x1e5bd2;}export const APPCODE_FLAG_OPTIONAL={'name':a39_0x4eccff(0x19c),'type':a39_0x4eccff(0x1a7),'required':![],'description':a39_0x4eccff(0x19d)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':a39_0x4eccff(0x1aa),'type':a39_0x4eccff(0x1a7),'required':!![],'description':a39_0x4eccff(0x1a3),'enum':[a39_0x4eccff(0x1a4),a39_0x4eccff(0x197)]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a40_0x1064(_0x52c9e9,_0x432a8c){_0x52c9e9=_0x52c9e9-0xf2;const _0x18bfa7=a40_0x18bf();let _0x1064b0=_0x18bfa7[_0x52c9e9];return _0x1064b0;}(function(_0x4604a3,_0x539926){const _0x2398d6=a40_0x1064,_0x5f3719=_0x4604a3();while(!![]){try{const _0x5dd434=parseInt(_0x2398d6(0xfa))/0x1+-parseInt(_0x2398d6(0xf2))/0x2*(-parseInt(_0x2398d6(0xf7))/0x3)+-parseInt(_0x2398d6(0xfe))/0x4+-parseInt(_0x2398d6(0xf4))/0x5*(-parseInt(_0x2398d6(0xfd))/0x6)+parseInt(_0x2398d6(0xf8))/0x7*(-parseInt(_0x2398d6(0xf3))/0x8)+parseInt(_0x2398d6(0xf9))/0x9+-parseInt(_0x2398d6(0xf5))/0xa;if(_0x5dd434===_0x539926)break;else _0x5f3719['push'](_0x5f3719['shift']());}catch(_0x2a15d0){_0x5f3719['push'](_0x5f3719['shift']());}}}(a40_0x18bf,0xdb775));export function validateAppcode(_0x3a0a2a){const _0x3b25e7=a40_0x1064,_0x4ae843=_0x3a0a2a[_0x3b25e7(0xfb)]();if(!_0x4ae843)return{'valid':![],'message':_0x3b25e7(0xf6)};if(_0x4ae843[_0x3b25e7(0xff)]>0x64)return{'valid':![],'message':_0x3b25e7(0xfc)};if(!/^[A-Za-z0-9_-]+$/['test'](_0x4ae843))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}function a40_0x18bf(){const _0x23186c=['14339565NIqsSv','34635HtmwsB','trim','App\x20Code\x20cannot\x20exceed\x20100\x20characters','108JNZGwl','157984wQgQtl','length','15598JbvkmZ','7816RTlGuR','293415CkcYSj','19759230jiQisC','App\x20Code\x20cannot\x20be\x20empty','249aeOgvZ','2989vmkcqj'];a40_0x18bf=function(){return _0x23186c;};return a40_0x18bf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a41_0x20fe83=a41_0x5a72;(function(_0x101c20,_0x22d6b7){const _0x23e74c=a41_0x5a72,_0x5650f3=_0x101c20();while(!![]){try{const _0x32676f=parseInt(_0x23e74c(0x14c))/0x1+-parseInt(_0x23e74c(0x148))/0x2*(-parseInt(_0x23e74c(0x151))/0x3)+-parseInt(_0x23e74c(0x15a))/0x4+parseInt(_0x23e74c(0x14d))/0x5+parseInt(_0x23e74c(0x155))/0x6*(-parseInt(_0x23e74c(0x147))/0x7)+parseInt(_0x23e74c(0x149))/0x8+-parseInt(_0x23e74c(0x150))/0x9;if(_0x32676f===_0x22d6b7)break;else _0x5650f3['push'](_0x5650f3['shift']());}catch(_0x246245){_0x5650f3['push'](_0x5650f3['shift']());}}}(a41_0x2156,0xa4a6e));import{CliErrors}from'../../errors.js';function a41_0x5a72(_0x565709,_0x2b0a99){_0x565709=_0x565709-0x147;const _0x215658=a41_0x2156();let _0x5a72e6=_0x215658[_0x565709];return _0x5a72e6;}import{readConfig}from'../../utils/config.js';function a41_0x2156(){const _0x55c9e6=['873982aeFppo','6236035oHqPhL','app','validation','14863662EUKBEw','1392gQFgNJ','key','config','Missing\x20key.','7807218RlUsbX','string','object','appcode','\x20config\x20get\x20--key\x20<key>','3088748TUJmYM','Get\x20a\x20config\x20value\x20by\x20key','7joozVI','4480cEbbIY','9910184TunNkv','get','Key\x20not\x20found:\x20'];a41_0x2156=function(){return _0x55c9e6;};return a41_0x2156();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x21b4dc){const _0x3b8523=a41_0x5a72,_0x41960e=_0x21b4dc['str'](_0x3b8523(0x152));if(!_0x41960e)throw CliErrors['validation'](_0x3b8523(0x154),'Usage:\x20'+CLI_BIN_NAME+_0x3b8523(0x159));const _0xcb9565=readConfig(),_0x11ce2e=_0x41960e===_0x3b8523(0x14e)?_0x3b8523(0x158):_0x41960e,_0x172366=_0xcb9565[_0x11ce2e];if(_0x172366===undefined)throw CliErrors[_0x3b8523(0x14f)](_0x3b8523(0x14b)+_0x41960e);return{'ok':!![],'data':typeof _0x172366===_0x3b8523(0x157)?_0x172366:{[_0x11ce2e]:_0x172366},'message':typeof _0x172366===_0x3b8523(0x157)?undefined:String(_0x172366)};}export const configGetDefinition={'service':a41_0x20fe83(0x153),'command':a41_0x20fe83(0x14a),'description':a41_0x20fe83(0x15b),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a41_0x20fe83(0x156),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d52dd,_0x12d21d){const _0x1c690f=a42_0x3369,_0x175353=_0x2d52dd();while(!![]){try{const _0x3d2fb1=-parseInt(_0x1c690f(0x97))/0x1+parseInt(_0x1c690f(0x93))/0x2+parseInt(_0x1c690f(0x91))/0x3+parseInt(_0x1c690f(0x99))/0x4*(-parseInt(_0x1c690f(0x95))/0x5)+-parseInt(_0x1c690f(0x94))/0x6*(parseInt(_0x1c690f(0x9b))/0x7)+-parseInt(_0x1c690f(0x92))/0x8*(-parseInt(_0x1c690f(0x96))/0x9)+parseInt(_0x1c690f(0x9a))/0xa*(parseInt(_0x1c690f(0x98))/0xb);if(_0x3d2fb1===_0x12d21d)break;else _0x175353['push'](_0x175353['shift']());}catch(_0x290878){_0x175353['push'](_0x175353['shift']());}}}(a42_0x5a6f,0x96c63));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a42_0x3369(_0x4ba93d,_0x55e184){_0x4ba93d=_0x4ba93d-0x91;const _0x5a6f71=a42_0x5a6f();let _0x336947=_0x5a6f71[_0x4ba93d];return _0x336947;}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];function a42_0x5a6f(){const _0x192ae5=['11777510HnhJyN','3129nNQvNT','946254JFxUWx','1353032ocKbSN','30378HZypTN','426KvAUNL','21985YXwclZ','27QXxAJk','1159778WPdGDK','11MWQuSu','188MQmYNd'];a42_0x5a6f=function(){return _0x192ae5;};return a42_0x5a6f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x278eb1=a43_0x2f07;(function(_0x42a7cf,_0x2f6ddd){const _0x57c506=a43_0x2f07,_0x1b0481=_0x42a7cf();while(!![]){try{const _0x38a4d6=parseInt(_0x57c506(0xc6))/0x1*(parseInt(_0x57c506(0xce))/0x2)+-parseInt(_0x57c506(0xcd))/0x3+-parseInt(_0x57c506(0xd4))/0x4*(-parseInt(_0x57c506(0xd3))/0x5)+-parseInt(_0x57c506(0xc3))/0x6*(parseInt(_0x57c506(0xcc))/0x7)+-parseInt(_0x57c506(0xc7))/0x8*(parseInt(_0x57c506(0xd0))/0x9)+-parseInt(_0x57c506(0xc8))/0xa+parseInt(_0x57c506(0xc4))/0xb;if(_0x38a4d6===_0x2f6ddd)break;else _0x1b0481['push'](_0x1b0481['shift']());}catch(_0x571890){_0x1b0481['push'](_0x1b0481['shift']());}}}(a43_0x46bd,0x991d4));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';function a43_0x2f07(_0x474ac5,_0x1d5b9a){_0x474ac5=_0x474ac5-0xc3;const _0x46bd96=a43_0x46bd();let _0x2f0780=_0x46bd96[_0x474ac5];return _0x2f0780;}async function execute(_0x251fc5){const _0x14ece8=a43_0x2f07,_0x2d2e19=_0x251fc5[_0x14ece8(0xc9)](_0x14ece8(0xc5))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x2d2e19};}function a43_0x46bd(){const _0x144ad6=['1778658GvDDWQ','32lsNLuV','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','9279yvgFle','config','boolean','10wlswet','2301616jqTaJu','212130hlogzu','13813316LQbvyI','global','1615VRlhMQ','4184LXOVMm','5670840jgWQKE','bool','read','list','21HEIymg'];a43_0x46bd=function(){return _0x144ad6;};return a43_0x46bd();}export const configListDefinition={'service':a43_0x278eb1(0xd1),'command':a43_0x278eb1(0xcb),'description':'List\x20all\x20config\x20values','risk':a43_0x278eb1(0xca),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'global','type':a43_0x278eb1(0xd2),'description':a43_0x278eb1(0xcf),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a44_0x569e(){const _0x500430=['Invalid\x20locale\x20value.','\x20set\x20to:\x20','36UvhpnB','object','apps','string','Global','Use\x20`','\x20app\x20add\x20<name>\x20--appcode\x20','Set\x20a\x20config\x20value','28147kWLDtn','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','bool','Invalid\x20value\x20for\x20\x22','61624hnYmrs','Missing\x20key.','keys','18891qvbtgP','app','length','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','config','set','`,\x20`','join','env','282QKOKHk','Project','Top-level\x20key\x20\x22','value','riskLevel','27693wZjwLx','str','global','\x22.\x20Allowed:\x20','126GFkUvm','278820PUfDbw','boolean','\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','appcode','locale','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','\x22\x20is\x20not\x20settable.','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','Usage:\x20','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','1966980ybvLEK','631496cjoTxx','validation','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.'];a44_0x569e=function(){return _0x500430;};return a44_0x569e();}const a44_0x21cd85=a44_0x3954;(function(_0x404019,_0x47beee){const _0x4d9e54=a44_0x3954,_0x2d38d9=_0x404019();while(!![]){try{const _0xfd0c1a=-parseInt(_0x4d9e54(0x13e))/0x1+parseInt(_0x4d9e54(0x121))/0x2*(-parseInt(_0x4d9e54(0x130))/0x3)+parseInt(_0x4d9e54(0x11c))/0x4+parseInt(_0x4d9e54(0x143))/0x5+parseInt(_0x4d9e54(0x139))/0x6*(parseInt(_0x4d9e54(0x129))/0x7)+-parseInt(_0x4d9e54(0x12d))/0x8*(-parseInt(_0x4d9e54(0x142))/0x9)+-parseInt(_0x4d9e54(0x11b))/0xa;if(_0xfd0c1a===_0x47beee)break;else _0x2d38d9['push'](_0x2d38d9['shift']());}catch(_0x1adc11){_0x2d38d9['push'](_0x2d38d9['shift']());}}}(a44_0x569e,0x2a2ba));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a44_0x3954(_0x4d35a0,_0x4e2c64){_0x4d35a0=_0x4d35a0-0x119;const _0x569e90=a44_0x569e();let _0x395400=_0x569e90[_0x4d35a0];return _0x395400;}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(_0x3eea5c){const _0x94560f=a44_0x3954,_0x1f288f=_0x3eea5c[_0x94560f(0x13f)]('key'),_0x113caa=_0x3eea5c[_0x94560f(0x13f)](_0x94560f(0x13c));if(!_0x1f288f)throw CliErrors[_0x94560f(0x11d)](_0x94560f(0x12e),_0x94560f(0x119)+CLI_BIN_NAME+_0x94560f(0x12a));if(_0x113caa===undefined||_0x113caa==='')throw CliErrors['validation']('Missing\x20value.',_0x94560f(0x119)+CLI_BIN_NAME+_0x94560f(0x12a));if(_0x113caa['length']>0x1f4)throw CliErrors['validation'](_0x94560f(0x14b));if(!isTopLevelConfigKey(_0x1f288f))throw CliErrors[_0x94560f(0x11d)](_0x94560f(0x13b)+_0x1f288f+_0x94560f(0x14a),'Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(_0x1f288f===_0x94560f(0x13d))throw CliErrors['validation'](_0x94560f(0x11a));if(CONFIG_ENUM_VALUES[_0x1f288f]&&!CONFIG_ENUM_VALUES[_0x1f288f]['includes'](_0x113caa))throw CliErrors['validation'](_0x94560f(0x12c)+_0x1f288f+_0x94560f(0x141)+CONFIG_ENUM_VALUES[_0x1f288f][_0x94560f(0x137)](',\x20'));if(_0x1f288f==='locale'&&!normalizeLocale(_0x113caa))throw CliErrors['validation'](_0x94560f(0x11f),_0x94560f(0x148));const _0x5e4ec4={'global':_0x3eea5c[_0x94560f(0x12b)](_0x94560f(0x140))},_0x3e0a79=resolveWriteScope(_0x5e4ec4),_0x57dbcd=readScopedConfig(_0x3e0a79);let _0xa394c3=_0x1f288f,_0x48adea=_0x113caa;_0x1f288f===_0x94560f(0x131)&&(_0xa394c3=_0x94560f(0x146),delete _0x57dbcd[_0x94560f(0x131)]);_0x1f288f===_0x94560f(0x147)&&(_0x48adea=normalizeLocale(_0x113caa));if(_0x1f288f===_0x94560f(0x138)){_0x48adea=normalizeEnv(_0x113caa);if(!isProduction(_0x48adea)&&!isDaily(_0x48adea))throw CliErrors[_0x94560f(0x11d)](_0x94560f(0x133),'Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x1f288f===_0x94560f(0x146)){const _0x2d5cce=_0x57dbcd[_0x94560f(0x123)]&&typeof _0x57dbcd['apps']===_0x94560f(0x122)?Object[_0x94560f(0x12f)](_0x57dbcd['apps']):[];if(_0x2d5cce[_0x94560f(0x132)]>0x0)throw CliErrors[_0x94560f(0x11d)](_0x94560f(0x11e),_0x94560f(0x126)+CLI_BIN_NAME+_0x94560f(0x127)+_0x48adea+_0x94560f(0x136)+CLI_BIN_NAME+_0x94560f(0x145));const _0x5ef3e5=buildCanonicalProjectConfig({..._0x57dbcd},{'appCodes':[_0x48adea],'env':typeof _0x57dbcd[_0x94560f(0x138)]===_0x94560f(0x124)?_0x57dbcd[_0x94560f(0x138)]:undefined});writeScopedConfig(_0x5ef3e5,_0x3e0a79);const _0x462855=_0x3e0a79===_0x94560f(0x140)?_0x94560f(0x125):'Project';return{'ok':!![],'message':'✓\x20'+_0x462855+'\x20appcode\x20set\x20to:\x20'+_0x48adea+_0x94560f(0x149)};}_0x57dbcd[_0xa394c3]=_0x48adea,writeScopedConfig(_0x57dbcd,_0x3e0a79);const _0x3dc9da=_0x3e0a79===_0x94560f(0x140)?_0x94560f(0x125):_0x94560f(0x13a);return{'ok':!![],'message':'✓\x20'+_0x3dc9da+'\x20'+_0xa394c3+_0x94560f(0x120)+_0x48adea};}export const configSetDefinition={'service':a44_0x21cd85(0x134),'command':a44_0x21cd85(0x135),'description':a44_0x21cd85(0x128),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a44_0x21cd85(0x124),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a44_0x21cd85(0x13c),'type':a44_0x21cd85(0x124),'description':'Config\x20value','required':!![]},{'name':a44_0x21cd85(0x140),'type':a44_0x21cd85(0x144),'description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a45_0x329e(){var _0x4b4419=['1589817DVNnLA','3076518FPURCW','37820ZHPlYa','project','12004929KmSNhS','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','global','2mDZqVU','11308PLnyFb','75bPUErc','304LcuoUk','349352XeQucX','77917RTSqlQ','1450737nVxSRz'];a45_0x329e=function(){return _0x4b4419;};return a45_0x329e();}(function(_0x6ca42d,_0x256157){var _0x49566a=a45_0x3041,_0x29b4f2=_0x6ca42d();while(!![]){try{var _0x445b74=parseInt(_0x49566a(0x10a))/0x1+-parseInt(_0x49566a(0x112))/0x2*(-parseInt(_0x49566a(0x10b))/0x3)+parseInt(_0x49566a(0x116))/0x4*(parseInt(_0x49566a(0x114))/0x5)+parseInt(_0x49566a(0x10c))/0x6+parseInt(_0x49566a(0x109))/0x7*(-parseInt(_0x49566a(0x115))/0x8)+parseInt(_0x49566a(0x10f))/0x9+parseInt(_0x49566a(0x10d))/0xa*(-parseInt(_0x49566a(0x113))/0xb);if(_0x445b74===_0x256157)break;else _0x29b4f2['push'](_0x29b4f2['shift']());}catch(_0x2b2b5d){_0x29b4f2['push'](_0x29b4f2['shift']());}}}(a45_0x329e,0xc9c8a));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_0x3041(_0x420521,_0x21bdb4){_0x420521=_0x420521-0x109;var _0x329e55=a45_0x329e();var _0x304133=_0x329e55[_0x420521];return _0x304133;}export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x3a4829){var _0x23689c=a45_0x3041;if(_0x3a4829[_0x23689c(0x111)])return'global';if(!isInProject())throw CliErrors['validation'](_0x23689c(0x110),'Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+'\x20init`\x20first.');return _0x23689c(0x10e);}export function readScopedConfig(_0x3f88de){return readConfigFile(resolveWriteConfigPath(_0x3f88de));}export function writeScopedConfig(_0x22aefb,_0x164bda){writeConfigFile(resolveWriteConfigPath(_0x164bda),_0x22aefb);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a46_0x352a(){const _0x24e303=['\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','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','2272932oTXOwS','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','11574lRqRIF','\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}]','925880ZuLEXJ','filter','793080xarOaJ','79796BOgeyc','138zLqDHK','9DDSyHP','\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]','Filter\x20dataset\x20records\x20with\x20query\x20conditions','119XPhRrr','2136flyzxq','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','4078240fnyyjd'];a46_0x352a=function(){return _0x24e303;};return a46_0x352a();}const a46_0x55db7e=a46_0x1c88;(function(_0x5540c9,_0x5b5bc5){const _0x100ffd=a46_0x1c88,_0x18c22d=_0x5540c9();while(!![]){try{const _0x14f7d9=-parseInt(_0x100ffd(0x1a5))/0x1*(-parseInt(_0x100ffd(0x1aa))/0x2)+parseInt(_0x100ffd(0x1a6))/0x3*(-parseInt(_0x100ffd(0x1a4))/0x4)+parseInt(_0x100ffd(0x1a1))/0x5+parseInt(_0x100ffd(0x19f))/0x6*(-parseInt(_0x100ffd(0x1a9))/0x7)+parseInt(_0x100ffd(0x1a3))/0x8+parseInt(_0x100ffd(0x1af))/0x9+-parseInt(_0x100ffd(0x1ac))/0xa;if(_0x14f7d9===_0x5b5bc5)break;else _0x18c22d['push'](_0x18c22d['shift']());}catch(_0x1f379a){_0x18c22d['push'](_0x18c22d['shift']());}}}(a46_0x352a,0x2cde3));import{buildDataCommand}from'../../commands/data/shared.js';function a46_0x1c88(_0x459c1c,_0x386f9b){_0x459c1c=_0x459c1c-0x19e;const _0x352ad8=a46_0x352a();let _0x1c88b2=_0x352ad8[_0x459c1c];return _0x1c88b2;}export const dataFilter=buildDataCommand({'command':a46_0x55db7e(0x1a2),'operation':'filter','description':a46_0x55db7e(0x1a8),'paramsRequired':![],'paramsHint':a46_0x55db7e(0x1ae),'helpExtra':[a46_0x55db7e(0x19e),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions',a46_0x55db7e(0x1a7),a46_0x55db7e(0x1a0),a46_0x55db7e(0x1ad),a46_0x55db7e(0x1ab)]['join']('\x0a')});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x14aa5d=a47_0x2aa5;(function(_0x1ac9e4,_0x26911f){const _0x181517=a47_0x2aa5,_0x2dc23e=_0x1ac9e4();while(!![]){try{const _0x36af78=-parseInt(_0x181517(0x1b6))/0x1*(parseInt(_0x181517(0x1b8))/0x2)+-parseInt(_0x181517(0x1bd))/0x3+parseInt(_0x181517(0x1bc))/0x4+parseInt(_0x181517(0x1b4))/0x5*(parseInt(_0x181517(0x1b5))/0x6)+parseInt(_0x181517(0x1be))/0x7*(-parseInt(_0x181517(0x1b9))/0x8)+parseInt(_0x181517(0x1ba))/0x9+parseInt(_0x181517(0x1b7))/0xa*(parseInt(_0x181517(0x1bb))/0xb);if(_0x36af78===_0x26911f)break;else _0x2dc23e['push'](_0x2dc23e['shift']());}catch(_0x1d3d4f){_0x2dc23e['push'](_0x2dc23e['shift']());}}}(a47_0x5e9c,0x47ddf));import{buildDataCommand}from'../../commands/data/shared.js';function a47_0x2aa5(_0x2f89de,_0x504dab){_0x2f89de=_0x2f89de-0x1b2;const _0x5e9cc7=a47_0x5e9c();let _0x2aa577=_0x5e9cc7[_0x2f89de];return _0x2aa577;}export const dataGetOne=buildDataCommand({'command':a47_0x14aa5d(0x1bf),'operation':a47_0x14aa5d(0x1bf),'description':a47_0x14aa5d(0x1b2),'paramsRequired':!![],'paramsHint':a47_0x14aa5d(0x1b3)});function a47_0x5e9c(){const _0x5cfd40=['Get\x20a\x20single\x20record\x20by\x20ID','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','245WqgFBB','39870rgiFgA','5454YPlSgk','7059370ezHkhW','172zJeFMZ','2329840xJMPdM','4459734MdNGRx','11RdJhtK','1531468dtxzSw','1692192EfpmKw','14cssQOu','getOne'];a47_0x5e9c=function(){return _0x5cfd40;};return a47_0x5e9c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ec062,_0x4832fa){const _0x3c3d89=a48_0xacf2,_0x213122=_0x1ec062();while(!![]){try{const _0x5f4c34=parseInt(_0x3c3d89(0xfa))/0x1*(parseInt(_0x3c3d89(0xf8))/0x2)+parseInt(_0x3c3d89(0x102))/0x3*(parseInt(_0x3c3d89(0xff))/0x4)+parseInt(_0x3c3d89(0x103))/0x5+-parseInt(_0x3c3d89(0x100))/0x6*(parseInt(_0x3c3d89(0xfb))/0x7)+-parseInt(_0x3c3d89(0xfd))/0x8*(parseInt(_0x3c3d89(0xfc))/0x9)+parseInt(_0x3c3d89(0x101))/0xa*(parseInt(_0x3c3d89(0xfe))/0xb)+-parseInt(_0x3c3d89(0xf9))/0xc;if(_0x5f4c34===_0x4832fa)break;else _0x213122['push'](_0x213122['shift']());}catch(_0x3f717b){_0x213122['push'](_0x213122['shift']());}}}(a48_0x3622,0x3c5c3));import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';function a48_0x3622(){const _0xe681a3=['40ojURXh','11NAwgxq','4kGGVXn','72XwKLjE','748450NXOpZO','503703geIdye','718765RvtdIj','5158voknHO','2992128mXXtqF','101CTvtVh','81599MXKiYf','18927nKiTwy'];a48_0x3622=function(){return _0xe681a3;};return a48_0x3622();}function a48_0xacf2(_0x4c4ce6,_0x26e97a){_0x4c4ce6=_0x4c4ce6-0xf8;const _0x36228d=a48_0x3622();let _0xacf2b2=_0x36228d[_0x4c4ce6];return _0xacf2b2;}export const dataDefinitions=[dataFilter,dataGetOne];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a49_0x50da(_0x290697,_0x1bbc5e){_0x290697=_0x290697-0x11f;const _0xaacdbc=a49_0xaacd();let _0x50dabb=_0xaacdbc[_0x290697];return _0x50dabb;}(function(_0x5051e5,_0x59513f){const _0x6e0892=a49_0x50da,_0x529e8d=_0x5051e5();while(!![]){try{const _0x280b48=parseInt(_0x6e0892(0x126))/0x1*(parseInt(_0x6e0892(0x139))/0x2)+parseInt(_0x6e0892(0x122))/0x3*(parseInt(_0x6e0892(0x129))/0x4)+parseInt(_0x6e0892(0x12c))/0x5*(parseInt(_0x6e0892(0x124))/0x6)+-parseInt(_0x6e0892(0x137))/0x7+parseInt(_0x6e0892(0x11f))/0x8*(parseInt(_0x6e0892(0x13a))/0x9)+parseInt(_0x6e0892(0x12a))/0xa*(-parseInt(_0x6e0892(0x12b))/0xb)+-parseInt(_0x6e0892(0x131))/0xc;if(_0x280b48===_0x59513f)break;else _0x529e8d['push'](_0x529e8d['shift']());}catch(_0x49d836){_0x529e8d['push'](_0x529e8d['shift']());}}}(a49_0xaacd,0xec980));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 a49_0xaacd(){const _0x44d1fa=['26345hyneBX','80XYwOQe','flagMissing','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','getOne','paramsHint','6444060SxaNGV','validation','operation','compress','command','appCode','8309511xMgEGe','data\x20','4LsZzjo','9YzHuZb','params','paramsRequired','5485904UMSBNv','description','helpExtra','579wpvdKU','alias','170502EvHHiE','data','336157shULzS','string','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','34876XHIScB','3350lMeFFT'];a49_0xaacd=function(){return _0x44d1fa;};return a49_0xaacd();}function assertGetOneId(_0x33f72f){const _0x425a9e=a49_0x50da;if(!_0x33f72f)throw CliErrors['flagMissing'](_0x425a9e(0x13b),_0x425a9e(0x128));const _0x50308f=_0x33f72f['id'];if(_0x50308f===undefined||_0x50308f===null||_0x50308f==='')throw CliErrors[_0x425a9e(0x132)]('data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','Example:\x20--params\x20\x27{\x22id\x22:123}\x27');}function parseCommandParams(_0x2cee88){return parseJsonParams(_0x2cee88)??{};}export function buildDataCommand(_0xcd1ec5){const _0x4220a0=a49_0x50da,_0x3296bc=_0x4220a0(0x12e);return{'service':_0x4220a0(0x125),'command':_0xcd1ec5[_0x4220a0(0x135)],'description':_0xcd1ec5[_0x4220a0(0x120)],'risk':'read','defaultOutputFormat':_0x4220a0(0x134),'helpExtra':_0xcd1ec5[_0x4220a0(0x121)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x4220a0(0x123),'type':_0x4220a0(0x127),'description':_0x3296bc},{'name':_0x4220a0(0x13b),'type':_0x4220a0(0x127),'description':_0xcd1ec5[_0x4220a0(0x130)]}],async 'validate'(_0xc54e10){const _0x318d82=_0x4220a0,_0x5f287a=_0xc54e10['str'](_0x318d82(0x13b));if(_0xcd1ec5[_0x318d82(0x13c)]&&!_0x5f287a)throw CliErrors[_0x318d82(0x12d)](_0x318d82(0x13b),_0xcd1ec5[_0x318d82(0x130)]);const _0x318288=parseJsonParams(_0x5f287a);_0xcd1ec5[_0x318d82(0x133)]===_0x318d82(0x12f)&&assertGetOneId(_0x318288);},async 'execute'(_0x96e3f3){const _0x1c7c5f=_0x4220a0,_0x857461=parseCommandParams(_0x96e3f3['str']('params')),_0x4d3e2a=Date['now'](),_0x20f029=await executeDatasetDataOperation(_0x96e3f3[_0x1c7c5f(0x136)],_0x96e3f3['str']('code'),_0xcd1ec5['operation'],_0x857461),_0x3b5e05=Date['now']()-_0x4d3e2a;return{'ok':!![],'data':{'result':_0x20f029,'elapsed':_0x3b5e05},'message':_0x1c7c5f(0x138)+_0xcd1ec5[_0x1c7c5f(0x135)]+'\x20completed\x20in\x20'+_0x3b5e05+'ms'};}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x6425fe=a50_0x2e2c;function a50_0x17fb(){const _0x1b2243=['message','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','No\x20undeleted\x20dataset\x20found\x20for\x20','name','length','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','expected-count','tableName','boolean','772566NotIFv','9LWbwSI','bool','684216wzWCun','id=','Dataset\x20id','str','filter','444232MzDLbr','dbid','code','appCode','map','number','validation','Would\x20delete\x20','5hSrpjg','7APzFlK','num','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','push','Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','Required\x20to\x20execute\x20dataset\x20deletion','dbId','Matched\x20','\x20dataset(s);\x20','dbtableConfig','description','62nTDldk','18658dmMXZP','1768812yiGWBj','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','POST','400OgLBhM','high-risk-write','174636NyAWro','\x20failed','Deleted\x20','isArray','355728amsuKl'];a50_0x17fb=function(){return _0x1b2243;};return a50_0x17fb();}(function(_0x4475e5,_0x2b7c58){const _0x5be4cb=a50_0x2e2c,_0x3f1dcb=_0x4475e5();while(!![]){try{const _0x22c402=parseInt(_0x5be4cb(0x1ec))/0x1*(parseInt(_0x5be4cb(0x1eb))/0x2)+-parseInt(_0x5be4cb(0x205))/0x3+parseInt(_0x5be4cb(0x1ed))/0x4*(parseInt(_0x5be4cb(0x212))/0x5)+-parseInt(_0x5be4cb(0x202))/0x6*(-parseInt(_0x5be4cb(0x213))/0x7)+parseInt(_0x5be4cb(0x20a))/0x8*(parseInt(_0x5be4cb(0x203))/0x9)+-parseInt(_0x5be4cb(0x1f0))/0xa*(parseInt(_0x5be4cb(0x1f2))/0xb)+parseInt(_0x5be4cb(0x1f6))/0xc;if(_0x22c402===_0x2b7c58)break;else _0x3f1dcb['push'](_0x3f1dcb['shift']());}catch(_0x9697e2){_0x3f1dcb['push'](_0x3f1dcb['shift']());}}}(a50_0x17fb,0x5aadf));import{deleteDataset,listDatasets}from'../../core/api-client.js';function a50_0x2e2c(_0x21ce92,_0x510319){_0x21ce92=_0x21ce92-0x1e5;const _0x17fbff=a50_0x17fb();let _0x2e2c98=_0x17fbff[_0x21ce92];return _0x2e2c98;}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_0x6425fe(0x20f),'description':a50_0x6425fe(0x207)},DBID_FLAG={'name':a50_0x6425fe(0x20b),'type':'number','description':a50_0x6425fe(0x1ee)},CONFIRM_FLAG={'name':'confirm','type':a50_0x6425fe(0x201),'description':a50_0x6425fe(0x1e5)},EXPECTED_COUNT_FLAG={'name':a50_0x6425fe(0x1ff),'type':a50_0x6425fe(0x20f),'description':'Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value'};export const datasetDelete={'service':'dataset','command':'delete','description':a50_0x6425fe(0x217),'risk':a50_0x6425fe(0x1f1),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2f3b73){const _0xf010ff=a50_0x6425fe,_0x19a559=_0x2f3b73[_0xf010ff(0x214)]('id'),_0xcd992=_0x2f3b73[_0xf010ff(0x208)](_0xf010ff(0x20c)),_0x44fbc2=_0x2f3b73[_0xf010ff(0x214)]('dbid'),_0x3b921b=[_0x19a559>0x0,Boolean(_0xcd992),_0x44fbc2>0x0]['filter'](Boolean);if(_0x3b921b[_0xf010ff(0x1fd)]===0x0)throw CliErrors[_0xf010ff(0x210)](_0xf010ff(0x1fa));if(_0x3b921b[_0xf010ff(0x1fd)]>0x1)throw CliErrors['validation'](_0xf010ff(0x1f9));},async 'dryRun'(_0x3a134a){const _0x3949ba=a50_0x6425fe,_0x5a6ec4=await resolveTargets(_0x3a134a);return{'method':_0x3949ba(0x1ef),'url':'/smartapi/dataset/delete-dataset','body':{'appCode':_0x3a134a[_0x3949ba(0x20d)],'count':_0x5a6ec4['length'],'datasets':_0x5a6ec4},'description':_0x3949ba(0x211)+_0x5a6ec4['length']+_0x3949ba(0x215)};},async 'execute'(_0x207e2e){const _0x55c388=a50_0x6425fe;if(!_0x207e2e[_0x55c388(0x204)]('confirm'))throw CliErrors[_0x55c388(0x210)](_0x55c388(0x1f8),_0x55c388(0x1fe));const _0x57aee9=await resolveTargets(_0x207e2e),_0x590e38=[],_0x2678e3=[];for(const _0x556a58 of _0x57aee9){try{await deleteDataset(_0x207e2e[_0x55c388(0x20d)],_0x556a58['id']),_0x590e38[_0x55c388(0x216)](_0x556a58);}catch(_0x523914){_0x2678e3[_0x55c388(0x216)]({..._0x556a58,'error':_0x523914 instanceof Error?_0x523914[_0x55c388(0x1f7)]:String(_0x523914)});}}if(_0x2678e3['length']>0x0)return{'ok':![],'data':{'requested':_0x57aee9[_0x55c388(0x1fd)],'deletedCount':_0x590e38['length'],'failedCount':_0x2678e3[_0x55c388(0x1fd)],'deleted':_0x590e38,'failed':_0x2678e3},'message':_0x55c388(0x1f4)+_0x590e38[_0x55c388(0x1fd)]+'/'+_0x57aee9[_0x55c388(0x1fd)]+_0x55c388(0x1e8)+_0x2678e3['length']+_0x55c388(0x1f3)};return{'ok':!![],'data':{'requested':_0x57aee9[_0x55c388(0x1fd)],'deletedCount':_0x590e38[_0x55c388(0x1fd)],'deleted':_0x590e38},'message':_0x55c388(0x1f4)+_0x590e38[_0x55c388(0x1fd)]+'\x20dataset(s)'};}};async function resolveTargets(_0x217322){const _0x2aeea2=a50_0x6425fe,_0x352a7b=_0x217322[_0x2aeea2(0x214)]('id'),_0x217872=_0x217322[_0x2aeea2(0x208)](_0x2aeea2(0x20c)),_0x426f63=_0x217322[_0x2aeea2(0x214)](_0x2aeea2(0x20b));let _0x2b7609;_0x217872?(_0x2b7609=await listDatasets(_0x217322['appCode'],{'code':_0x217872}),_0x2b7609=_0x2b7609[_0x2aeea2(0x209)](_0x24faad=>_0x24faad['code']===_0x217872)):(_0x2b7609=await listDatasets(_0x217322['appCode']),_0x352a7b>0x0&&(_0x2b7609=_0x2b7609[_0x2aeea2(0x209)](_0x4089db=>_0x4089db['id']===_0x352a7b)),_0x426f63>0x0&&(_0x2b7609=_0x2b7609[_0x2aeea2(0x209)](_0xc3b4d9=>_0xc3b4d9[_0x2aeea2(0x1e9)]?.[_0x2aeea2(0x1e6)]===_0x426f63)));const _0x599edb=_0x2b7609[_0x2aeea2(0x20e)](normalizeTarget);if(_0x599edb['length']===0x0){const _0x164628=_0x217872||(_0x352a7b>0x0?_0x2aeea2(0x206)+_0x352a7b:'dbid='+_0x426f63);throw CliErrors[_0x2aeea2(0x210)](_0x2aeea2(0x1fb)+_0x164628+'.');}const _0x3e51aa=_0x217322[_0x2aeea2(0x214)]('expected-count');if(_0x3e51aa>0x0&&_0x599edb[_0x2aeea2(0x1fd)]!==_0x3e51aa)throw CliErrors[_0x2aeea2(0x210)](_0x2aeea2(0x1e7)+_0x599edb[_0x2aeea2(0x1fd)]+'\x20dataset(s),\x20but\x20--expected-count\x20is\x20'+_0x3e51aa+'.');return _0x599edb;}function normalizeTarget(_0x57caf4){const _0x5e9bdf=a50_0x6425fe,_0x25fa56=_0x57caf4[_0x5e9bdf(0x1e9)]??{};return{'id':_0x57caf4['id'],'code':_0x57caf4[_0x5e9bdf(0x20c)],'name':_0x57caf4[_0x5e9bdf(0x1fc)],'description':_0x57caf4[_0x5e9bdf(0x1ea)],'source':_0x57caf4['source'],'dbId':_0x25fa56[_0x5e9bdf(0x1e6)],'dbName':_0x25fa56['dbName'],'tableName':_0x25fa56[_0x5e9bdf(0x200)],'relatedPageCount':Array[_0x5e9bdf(0x1f5)](_0x57caf4['relationPages'])?_0x57caf4['relationPages']['length']:undefined};}
|