@lovrabet/rabetbase-cli 2.1.7-beta.3 → 2.1.7-beta.5
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_0x25403d=a33_0x7d47;(function(_0x420236,_0x34bd35){const _0x233444=a33_0x7d47,_0x3a818e=_0x420236();while(!![]){try{const _0x3b0655=-parseInt(_0x233444(0x81))/0x1*(-parseInt(_0x233444(0x71))/0x2)+-parseInt(_0x233444(0x8a))/0x3+parseInt(_0x233444(0x76))/0x4*(-parseInt(_0x233444(0x7b))/0x5)+-parseInt(_0x233444(0x77))/0x6*(parseInt(_0x233444(0x6e))/0x7)+-parseInt(_0x233444(0x7e))/0x8*(-parseInt(_0x233444(0x7d))/0x9)+parseInt(_0x233444(0x89))/0xa*(parseInt(_0x233444(0x88))/0xb)+parseInt(_0x233444(0x6d))/0xc;if(_0x3b0655===_0x34bd35)break;else _0x3a818e['push'](_0x3a818e['shift']());}catch(_0x514446){_0x3a818e['push'](_0x3a818e['shift']());}}}(a33_0x5450,0xaed9b));function a33_0x7d47(_0x3a6201,_0x2dcbec){_0x3a6201=_0x3a6201-0x69;const _0x545002=a33_0x5450();let _0x7d4703=_0x545002[_0x3a6201];return _0x7d4703;}import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{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_0x5450(){const _0x13840c=['has','apiDir','bool','functions','15495084yEVVla','728SufVxq','length','bff','2roXvly','filePath','boolean','\x20remote-only','scriptsRoot','8VDqUzc','65634uEJhAE','lockFilePath','map','hash','1630945jFHtMg','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','2918961ZeJyyo','16CEslYH','read','push','1425172aVyGVW','all','\x20added,\x20','remote','\x20modified,\x20','lockKey','alias','913LcGdgS','42490KKjKpo','3634599zZSaaf','appCode'];a33_0x5450=function(){return _0x13840c;};return a33_0x5450();}export const bffStatus={'service':a33_0x25403d(0x70),'command':'status','description':'Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','risk':a33_0x25403d(0x7f),'flags':[{'name':a33_0x25403d(0x84),'type':a33_0x25403d(0x73),'description':a33_0x25403d(0x7c)}],async 'execute'(_0x35b28e){const _0x585905=a33_0x25403d,_0x595fd5=loadBffProjectConfig(_0x35b28e[_0x585905(0x8b)]),_0xff3f1=await readBffLockFile(_0x595fd5[_0x585905(0x78)]),{appLock:_0x3e728c}=ensureLockScope(_0xff3f1??createEmptyBffLock(),_0x35b28e['appCode'],_0x595fd5[_0x585905(0x75)],'status'),_0xf010ab=await scanLocalBffFunctions(_0x595fd5),_0x14b53d=[],_0x3082af=[],_0x27fe37=[];for(const _0x3f31ae of _0xf010ab){const _0x503366=await computeFileHash(_0x3f31ae[_0x585905(0x72)]),_0x16a302=_0x3e728c['functions'][_0x3f31ae[_0x585905(0x86)]];if(!_0x16a302)_0x14b53d[_0x585905(0x80)](_0x3f31ae[_0x585905(0x86)]);else _0x16a302[_0x585905(0x7a)]!==_0x503366?_0x3082af[_0x585905(0x80)](_0x3f31ae[_0x585905(0x86)]):_0x27fe37['push'](_0x3f31ae[_0x585905(0x86)]);}const _0x445749=[];if(_0x35b28e[_0x585905(0x6b)](_0x585905(0x84))){const _0x10eae1=loadAliasMap(_0x35b28e['apiDir'],undefined,resolveApiFilePath(_0x35b28e[_0x585905(0x6a)],_0x35b28e['appCode'])),_0x255eb9=new Map(_0x10eae1[_0x585905(0x79)](_0x52d43a=>[_0x52d43a['datasetCode'],_0x52d43a[_0x585905(0x87)]])),[_0x357196,_0x4a8319]=await Promise[_0x585905(0x82)]([listBffScripts(_0x35b28e[_0x585905(0x8b)]),getBffScriptStatistics(_0x35b28e['appCode'])]),_0x1fafc9=createHookLocationMap(_0x4a8319),_0x260f88=new Set(_0xf010ab[_0x585905(0x79)](_0x795da9=>_0x795da9[_0x585905(0x86)]));for(const _0x43883f of _0x357196){const _0x145332=resolveRemoteScriptTarget(_0x595fd5,_0x43883f,_0x1fafc9,_0x3e728c[_0x585905(0x6c)],_0x255eb9);_0x145332&&!_0x260f88[_0x585905(0x69)](_0x145332[_0x585905(0x86)])&&_0x445749[_0x585905(0x80)](_0x145332[_0x585905(0x86)]);}}const _0x5a4ad2=_0x14b53d[_0x585905(0x6f)]===0x0&&_0x3082af[_0x585905(0x6f)]===0x0&&_0x445749[_0x585905(0x6f)]===0x0;return{'ok':!![],'data':{'added':_0x14b53d,'modified':_0x3082af,'unchanged':_0x27fe37,'remoteOnly':_0x445749},'message':_0x5a4ad2?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x14b53d[_0x585905(0x6f)]+_0x585905(0x83)+_0x3082af['length']+_0x585905(0x85)+_0x27fe37[_0x585905(0x6f)]+'\x20unchanged'+(_0x445749['length']>0x0?',\x20'+_0x445749[_0x585905(0x6f)]+_0x585905(0x74):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a34_0x1f4ead=a34_0x3115;(function(_0x2f0598,_0x3126fd){const _0x2e8b53=a34_0x3115,_0x569cd9=_0x2f0598();while(!![]){try{const _0x29459a=-parseInt(_0x2e8b53(0xfa))/0x1+-parseInt(_0x2e8b53(0xfc))/0x2*(parseInt(_0x2e8b53(0x118))/0x3)+parseInt(_0x2e8b53(0x10f))/0x4*(-parseInt(_0x2e8b53(0xfb))/0x5)+-parseInt(_0x2e8b53(0xd6))/0x6*(-parseInt(_0x2e8b53(0xf9))/0x7)+-parseInt(_0x2e8b53(0xf4))/0x8*(-parseInt(_0x2e8b53(0x11d))/0x9)+parseInt(_0x2e8b53(0x11e))/0xa+parseInt(_0x2e8b53(0xdf))/0xb*(parseInt(_0x2e8b53(0xfe))/0xc);if(_0x29459a===_0x3126fd)break;else _0x569cd9['push'](_0x569cd9['shift']());}catch(_0x37e371){_0x569cd9['push'](_0x569cd9['shift']());}}}(a34_0x4449,0x1f349));import a34_0xd41af8 from'chalk';import a34_0x3cb225 from'ora';function a34_0x3115(_0x5c619d,_0x1c050b){_0x5c619d=_0x5c619d-0xd6;const _0x4449ca=a34_0x4449();let _0x3115aa=_0x4449ca[_0x5c619d];return _0x3115aa;}import a34_0x567a2f 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 a34_0x4449(){const _0x5977e4=['\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','validation','Update\x20failed','\x20\x20Run\x20manually:\x20','object','43340HsGciM','info','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','https://registry.npmjs.org/-/package/','Update\x20available:\x20','message','source','timeout','latest','fail','bool','valid','filter','Already\x20on\x20requested\x20version\x20(v','inherit','Beta\x20version:\x20','\x20→\x20','str','error','\x20\x20Try\x20manually:\x20','npm','748472XqSfuE','Current\x20version:\x20','write','toLowerCase','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','70XGsMrO','11405OujDUZ','101635lfBJFj','76lIpDlD','start','240iZczwP','Already\x20up\x20to\x20date\x20(v','no-skills','warn','bun','green','Updating\x20via\x20','red','run','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','version','trim','nonInteractive','length','includes','log','20jicBNt','slice','Install\x20a\x20specific\x20CLI\x20version','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','stableVersion','cwd','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Requested\x20version:\x20','yellow','5664JuGCCQ','json','skipped','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Version\x20comparison\x20failed','9IMwHQw','902720XyQmRO','gray','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','boolean','Skipping\x20official\x20skill\x20package\x20(--no-skills).','fromEntries','Checking\x20official\x20skill\x20package...','succeed','unknown','29982pgrtFI','beta','...'];a34_0x4449=function(){return _0x5977e4;};return a34_0x4449();}function getCurrentVersion(){const _0x5a59e4=a34_0x3115;return GIT_COMMIT!==_0x5a59e4(0x127)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x5a59e4(0x110)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x428dc3=a34_0x3115,_0x2f5441=process['execPath'][_0x428dc3(0xf7)]();if(_0x2f5441[_0x428dc3(0x10d)]('bun'))return _0x428dc3(0x102);return _0x428dc3(0xf3);}const updateFlags=[{'name':a34_0x1f4ead(0xd7),'type':a34_0x1f4ead(0x122),'description':a34_0x1f4ead(0x120),'default':![]},{'name':'version','type':'string','description':a34_0x1f4ead(0x111)},{'name':a34_0x1f4ead(0x100),'type':a34_0x1f4ead(0x122),'description':a34_0x1f4ead(0xf8),'default':![]}];function getRequestedVersion(_0x3653d7){const _0x350037=a34_0x1f4ead;return _0x3653d7[_0x350037(0xf0)](_0x350037(0x109))[_0x350037(0x10a)]();}async function validateUpdateFlags(_0x26c304){const _0x228a3=a34_0x1f4ead,_0x1f1536=_0x26c304[_0x228a3(0xe9)](_0x228a3(0xd7)),_0x4ac1cc=getRequestedVersion(_0x26c304);if(_0x1f1536&&_0x4ac1cc)throw CliErrors[_0x228a3(0xdb)](_0x228a3(0x115),_0x228a3(0xda));if(_0x4ac1cc&&!a34_0x567a2f[_0x228a3(0xea)](_0x4ac1cc))throw CliErrors[_0x228a3(0xdb)]('Invalid\x20version:\x20'+_0x4ac1cc,_0x228a3(0x112));}async function fetchNpmDistTags(){const _0x4a8e45=a34_0x1f4ead;try{const _0x4172c3=await fetch(_0x4a8e45(0xe2)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x4a8e45(0xe6)](0x2710)});if(!_0x4172c3['ok'])return null;const _0x18b399=await _0x4172c3[_0x4a8e45(0x119)]();if(!_0x18b399||typeof _0x18b399!==_0x4a8e45(0xde))return null;return Object[_0x4a8e45(0x124)](Object['entries'](_0x18b399)[_0x4a8e45(0xeb)](([,_0x4b0ce8])=>typeof _0x4b0ce8==='string'&&_0x4b0ce8[_0x4a8e45(0x10a)]()[_0x4a8e45(0x10c)]>0x0)['map'](([_0x271eb6,_0x4c1f0e])=>[_0x271eb6,String(_0x4c1f0e)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x27fdc3){const _0x5835f9=await fetchNpmDistTags();return _0x5835f9?.[_0x27fdc3]??null;}async function fetchLatestVersion(){const _0x2310b3=a34_0x1f4ead,_0x1916b1=await fetchNpmDistTagVersion(_0x2310b3(0xe7));if(_0x1916b1)return _0x1916b1;const _0x3bd557=await getCdnConfig();return _0x3bd557?.['cli']?.[_0x2310b3(0x113)]??null;}async function resolveTargetVersion(_0x2e5e45){const _0x2e23d0=a34_0x1f4ead,_0x3ad436=getRequestedVersion(_0x2e5e45);if(_0x3ad436)return{'version':_0x3ad436,'source':_0x2e23d0(0x109)};if(_0x2e5e45[_0x2e23d0(0xe9)](_0x2e23d0(0xd7))){const _0xaf9fa2=await fetchNpmDistTagVersion('beta');if(!_0xaf9fa2)return null;return{'version':_0xaf9fa2,'source':_0x2e23d0(0xd7)};}const _0x5c21b4=await fetchLatestVersion();if(!_0x5c21b4)return null;return{'version':_0x5c21b4,'source':_0x2e23d0(0xe7)};}function shouldInstallTarget(_0x45be97,_0x107a16){const _0x4c27ee=a34_0x1f4ead;if(_0x107a16['source']===_0x4c27ee(0x109))return!a34_0x567a2f['eq'](_0x45be97,_0x107a16[_0x4c27ee(0x109)]);return a34_0x567a2f['lt'](_0x45be97,_0x107a16[_0x4c27ee(0x109)]);}function getInstallPlanLabel(_0x3cb25f,_0x5a6d89){const _0x59ce14=a34_0x1f4ead;switch(_0x5a6d89[_0x59ce14(0xe5)]){case'beta':return _0x59ce14(0xee)+a34_0xd41af8[_0x59ce14(0x117)](_0x3cb25f)+_0x59ce14(0xef)+a34_0xd41af8[_0x59ce14(0x103)](_0x5a6d89['version']);case'version':return _0x59ce14(0x116)+a34_0xd41af8[_0x59ce14(0x117)](_0x3cb25f)+_0x59ce14(0xef)+a34_0xd41af8[_0x59ce14(0x103)](_0x5a6d89[_0x59ce14(0x109)]);case _0x59ce14(0xe7):default:return _0x59ce14(0xe3)+a34_0xd41af8[_0x59ce14(0x117)](_0x3cb25f)+'\x20→\x20'+a34_0xd41af8['green'](_0x5a6d89[_0x59ce14(0x109)]);}}async function installOfficialSkill(_0x5e2c0b){const _0xcb2fc7=a34_0x1f4ead;console[_0xcb2fc7(0x10e)](a34_0xd41af8[_0xcb2fc7(0x11f)](_0xcb2fc7(0x125)));const _0x66c640=runNpxSkillsAddGlobal(process[_0xcb2fc7(0x114)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x5e2c0b?'pipe':_0xcb2fc7(0xed)});if(_0x66c640[_0xcb2fc7(0x11a)]){console[_0xcb2fc7(0x10e)](a34_0xd41af8[_0xcb2fc7(0x11f)]('\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x66c640['ok']){console['log'](a34_0xd41af8[_0xcb2fc7(0x11f)](_0xcb2fc7(0xe1)));return;}console[_0xcb2fc7(0x101)](a34_0xd41af8[_0xcb2fc7(0x117)]('\x20\x20Official\x20skill\x20update\x20failed:\x20'+(_0x66c640[_0xcb2fc7(0xf1)]||'unknown'))),console[_0xcb2fc7(0x10e)](a34_0xd41af8[_0xcb2fc7(0x11f)](_0xcb2fc7(0xdd)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x3e7765){const _0x21e57e=a34_0x1f4ead;await validateUpdateFlags(_0x3e7765);const _0x408591=getCurrentVersion();console[_0x21e57e(0x10e)](_0x21e57e(0xf5)+_0x408591);const _0x30341f=a34_0x3cb225('Checking\x20for\x20updates...')[_0x21e57e(0xfd)](),_0x1a75f4=await resolveTargetVersion(_0x3e7765);if(!_0x1a75f4){const _0x52915a=_0x3e7765[_0x21e57e(0xe9)](_0x21e57e(0xd7))?_0x21e57e(0x121):_0x21e57e(0x11b);return _0x30341f['fail'](_0x52915a),console[_0x21e57e(0x10e)](a34_0xd41af8[_0x21e57e(0x11f)](_0x21e57e(0x108)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x52915a};}const _0x21c4c6=a34_0x567a2f[_0x21e57e(0xea)](VERSION),_0x11752c=a34_0x567a2f[_0x21e57e(0xea)](_0x1a75f4[_0x21e57e(0x109)]);if(!_0x21c4c6||!_0x11752c)return _0x30341f[_0x21e57e(0xe8)](_0x21e57e(0x11c)),{'ok':![],'message':_0x21e57e(0x11c)};if(!shouldInstallTarget(_0x21c4c6,_0x1a75f4)){const _0x265083=_0x1a75f4[_0x21e57e(0xe5)]===_0x21e57e(0x109)?_0x21e57e(0xec)+_0x1a75f4['version']+')':_0x21e57e(0xff)+_0x1a75f4[_0x21e57e(0x109)]+')';return _0x30341f['succeed'](_0x265083),!_0x3e7765[_0x21e57e(0xe9)](_0x21e57e(0x100))?await installOfficialSkill(_0x3e7765[_0x21e57e(0x10b)]):console[_0x21e57e(0x10e)](a34_0xd41af8['gray']('Skipping\x20official\x20skill\x20package\x20(--no-skills).')),{'ok':!![]};}_0x30341f[_0x21e57e(0xe0)](getInstallPlanLabel(_0x408591,_0x1a75f4));const _0x3ba0ac=detectPackageManager(),_0x358c6c=_0x3ba0ac===_0x21e57e(0xf3)?resolveNpmBin('npm'):_0x3ba0ac,_0x3a5121=a34_0x3cb225(_0x21e57e(0x104)+_0x3ba0ac+_0x21e57e(0xd8))['start']();try{return await execa(_0x358c6c,['install','-g',NPM_PACKAGE_NAME+'@'+_0x1a75f4[_0x21e57e(0x109)]],{'stdio':'pipe'}),_0x3a5121[_0x21e57e(0x126)]('Updated\x20to\x20v'+_0x1a75f4[_0x21e57e(0x109)]),console[_0x21e57e(0x10e)](a34_0xd41af8[_0x21e57e(0x11f)](_0x21e57e(0xd9))),!_0x3e7765[_0x21e57e(0xe9)](_0x21e57e(0x100))?await installOfficialSkill(_0x3e7765[_0x21e57e(0x10b)]):console[_0x21e57e(0x10e)](a34_0xd41af8['gray'](_0x21e57e(0x123))),{'ok':!![]};}catch(_0x1493f9){return _0x3a5121['fail'](_0x21e57e(0xdc)),console[_0x21e57e(0xf1)](a34_0xd41af8[_0x21e57e(0x105)]('\x20\x20'+_0x1493f9['message'])),console[_0x21e57e(0x10e)](a34_0xd41af8[_0x21e57e(0x11f)](_0x21e57e(0xf2)+_0x3ba0ac+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x1a75f4[_0x21e57e(0x109)])),{'ok':![],'message':_0x1493f9[_0x21e57e(0xe4)]};}}export const updateDefinition={'service':'update','command':a34_0x1f4ead(0x106),'description':a34_0x1f4ead(0x107),'risk':a34_0x1f4ead(0xf6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a34_0xefaf68=a34_0x159f;(function(_0x544f07,_0x3c1f18){const _0x3b9f8b=a34_0x159f,_0x25731d=_0x544f07();while(!![]){try{const _0x427a5b=parseInt(_0x3b9f8b(0xb3))/0x1+-parseInt(_0x3b9f8b(0xdf))/0x2*(-parseInt(_0x3b9f8b(0xe6))/0x3)+-parseInt(_0x3b9f8b(0xb6))/0x4+parseInt(_0x3b9f8b(0xdc))/0x5*(-parseInt(_0x3b9f8b(0xb9))/0x6)+-parseInt(_0x3b9f8b(0xcd))/0x7*(-parseInt(_0x3b9f8b(0xe4))/0x8)+parseInt(_0x3b9f8b(0xfc))/0x9*(parseInt(_0x3b9f8b(0xca))/0xa)+-parseInt(_0x3b9f8b(0xd3))/0xb;if(_0x427a5b===_0x3c1f18)break;else _0x25731d['push'](_0x25731d['shift']());}catch(_0x1a463b){_0x25731d['push'](_0x25731d['shift']());}}}(a34_0x4cb4,0xcb85b));import a34_0x530d87 from'chalk';import a34_0x252ecc from'ora';import a34_0x55b96a 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 _0x4313bc=a34_0x159f;return GIT_COMMIT!==_0x4313bc(0xf9)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x4313bc(0xc5)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x3b1669=a34_0x159f,_0x4f6320=process[_0x3b1669(0xcc)][_0x3b1669(0xba)]();if(_0x4f6320[_0x3b1669(0xde)](_0x3b1669(0xd9)))return'bun';return _0x3b1669(0xc9);}const updateFlags=[{'name':'beta','type':a34_0xefaf68(0xef),'description':a34_0xefaf68(0xc8),'default':![]},{'name':a34_0xefaf68(0xf2),'type':a34_0xefaf68(0xc2),'description':a34_0xefaf68(0xec)},{'name':'no-skills','type':a34_0xefaf68(0xef),'description':'Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','default':![]}];function getRequestedVersion(_0x16b29b){const _0x54f324=a34_0xefaf68;return _0x16b29b[_0x54f324(0xbd)]('version')[_0x54f324(0xf7)]();}async function validateUpdateFlags(_0xdac38c){const _0x45fd61=a34_0xefaf68,_0x554865=_0xdac38c[_0x45fd61(0xea)](_0x45fd61(0xce)),_0x488ffb=getRequestedVersion(_0xdac38c);if(_0x554865&&_0x488ffb)throw CliErrors['validation'](_0x45fd61(0xbf),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x488ffb&&!a34_0x55b96a[_0x45fd61(0xd0)](_0x488ffb))throw CliErrors[_0x45fd61(0xb7)](_0x45fd61(0xfa)+_0x488ffb,_0x45fd61(0xd1));}async function fetchNpmDistTags(){const _0x368db9=a34_0xefaf68;try{const _0xe93398=await fetch(_0x368db9(0xf8)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x368db9(0xf6)](0x2710)});if(!_0xe93398['ok'])return null;const _0x561262=await _0xe93398[_0x368db9(0xbc)]();if(!_0x561262||typeof _0x561262!=='object')return null;return Object['fromEntries'](Object[_0x368db9(0xc0)](_0x561262)[_0x368db9(0xe0)](([,_0x58e893])=>typeof _0x58e893===_0x368db9(0xc2)&&_0x58e893[_0x368db9(0xf7)]()['length']>0x0)['map'](([_0xf2f66b,_0x2e1bd9])=>[_0xf2f66b,String(_0x2e1bd9)[_0x368db9(0xf7)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x2b1341){const _0x11b4e3=await fetchNpmDistTags();return _0x11b4e3?.[_0x2b1341]??null;}async function fetchLatestVersion(){const _0x12a023=a34_0xefaf68,_0x515990=await fetchNpmDistTagVersion(_0x12a023(0xc7));if(_0x515990)return _0x515990;const _0x39fe43=await getCdnConfig();return _0x39fe43?.['cli']?.[_0x12a023(0xe8)]??null;}function a34_0x159f(_0x159f30,_0x19b296){_0x159f30=_0x159f30-0xb0;const _0x4cb4db=a34_0x4cb4();let _0x159fb7=_0x4cb4db[_0x159f30];return _0x159fb7;}async function resolveTargetVersion(_0x591d75){const _0x45730d=a34_0xefaf68,_0x4c337e=getRequestedVersion(_0x591d75);if(_0x4c337e)return{'version':_0x4c337e,'source':_0x45730d(0xf2)};if(_0x591d75[_0x45730d(0xea)](_0x45730d(0xce))){const _0x1ec46c=await fetchNpmDistTagVersion(_0x45730d(0xce));if(!_0x1ec46c)return null;return{'version':_0x1ec46c,'source':_0x45730d(0xce)};}const _0xb438a5=await fetchLatestVersion();if(!_0xb438a5)return null;return{'version':_0xb438a5,'source':'latest'};}function a34_0x4cb4(){const _0xfad5aa=['json','str','Current\x20version:\x20','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','entries','Version\x20comparison\x20failed','string','Checking\x20for\x20updates...','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','slice','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','latest','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','npm','3960oaYYxM','Requested\x20version:\x20','execPath','7GANiRq','beta','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','valid','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','9825024rwNmLc','pipe','Updating\x20via\x20','Already\x20up\x20to\x20date\x20(v','gray','Update\x20failed','bun','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','source','5hoEnuI','error','includes','1493286HqXMzD','filter','\x20\x20Try\x20manually:\x20','message','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','8307672lOpxhb','nonInteractive','3UhTbQo','Checking\x20official\x20skill\x20package...','stableVersion','warn','bool','inherit','Install\x20a\x20specific\x20CLI\x20version','yellow','succeed','boolean','green','\x20→\x20','version','no-skills','run','log','timeout','trim','https://registry.npmjs.org/-/package/','unknown','Invalid\x20version:\x20','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','6417rnfoIj','update','Skipping\x20official\x20skill\x20package\x20(--no-skills).','skipped','639103jRMfrC','...','start','525908EjPVuz','validation','fail','5089590tulvPT','toLowerCase','@latest'];a34_0x4cb4=function(){return _0xfad5aa;};return a34_0x4cb4();}function shouldInstallTarget(_0x4f5985,_0x2704ff){const _0x41d604=a34_0xefaf68;if(_0x2704ff['source']===_0x41d604(0xf2))return!a34_0x55b96a['eq'](_0x4f5985,_0x2704ff[_0x41d604(0xf2)]);return a34_0x55b96a['lt'](_0x4f5985,_0x2704ff[_0x41d604(0xf2)]);}function getInstallPlanLabel(_0x173ef5,_0x2cd365){const _0x2009f1=a34_0xefaf68;switch(_0x2cd365[_0x2009f1(0xdb)]){case _0x2009f1(0xce):return'Beta\x20version:\x20'+a34_0x530d87[_0x2009f1(0xed)](_0x173ef5)+_0x2009f1(0xf1)+a34_0x530d87[_0x2009f1(0xf0)](_0x2cd365[_0x2009f1(0xf2)]);case _0x2009f1(0xf2):return _0x2009f1(0xcb)+a34_0x530d87[_0x2009f1(0xed)](_0x173ef5)+_0x2009f1(0xf1)+a34_0x530d87['green'](_0x2cd365[_0x2009f1(0xf2)]);case'latest':default:return'Update\x20available:\x20'+a34_0x530d87[_0x2009f1(0xed)](_0x173ef5)+_0x2009f1(0xf1)+a34_0x530d87[_0x2009f1(0xf0)](_0x2cd365[_0x2009f1(0xf2)]);}}async function installOfficialSkill(_0x216c30){const _0x59034a=a34_0xefaf68;console[_0x59034a(0xf5)](a34_0x530d87[_0x59034a(0xd7)](_0x59034a(0xe7)));const _0xc8d9f8=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x216c30?_0x59034a(0xd4):_0x59034a(0xeb)});if(_0xc8d9f8[_0x59034a(0xb2)]){console['log'](a34_0x530d87[_0x59034a(0xd7)](_0x59034a(0xc4)));return;}if(_0xc8d9f8['ok']){console[_0x59034a(0xf5)](a34_0x530d87['gray'](_0x59034a(0xcf)));return;}console[_0x59034a(0xe9)](a34_0x530d87[_0x59034a(0xed)]('\x20\x20Official\x20skill\x20update\x20failed:\x20'+(_0xc8d9f8[_0x59034a(0xdd)]||_0x59034a(0xf9)))),console[_0x59034a(0xf5)](a34_0x530d87[_0x59034a(0xd7)]('\x20\x20Run\x20manually:\x20'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x311529){const _0x4fb196=a34_0xefaf68;await validateUpdateFlags(_0x311529);const _0x55bf10=getCurrentVersion();console[_0x4fb196(0xf5)](_0x4fb196(0xbe)+_0x55bf10);const _0x30b018=a34_0x252ecc(_0x4fb196(0xc3))[_0x4fb196(0xb5)](),_0x48c98f=await resolveTargetVersion(_0x311529);if(!_0x48c98f){const _0x45ce8e=_0x311529['bool'](_0x4fb196(0xce))?_0x4fb196(0xda):_0x4fb196(0xc6);return _0x30b018[_0x4fb196(0xb8)](_0x45ce8e),console['log'](a34_0x530d87[_0x4fb196(0xd7)](_0x4fb196(0xe3)+NPM_PACKAGE_NAME+_0x4fb196(0xbb))),{'ok':![],'message':_0x45ce8e};}const _0x39be96=a34_0x55b96a[_0x4fb196(0xd0)](VERSION),_0x5588ab=a34_0x55b96a[_0x4fb196(0xd0)](_0x48c98f[_0x4fb196(0xf2)]);if(!_0x39be96||!_0x5588ab)return _0x30b018[_0x4fb196(0xb8)](_0x4fb196(0xc1)),{'ok':![],'message':_0x4fb196(0xc1)};if(!shouldInstallTarget(_0x39be96,_0x48c98f)){const _0x1235a0=_0x48c98f[_0x4fb196(0xdb)]==='version'?'Already\x20on\x20requested\x20version\x20(v'+_0x48c98f[_0x4fb196(0xf2)]+')':_0x4fb196(0xd6)+_0x48c98f[_0x4fb196(0xf2)]+')';return _0x30b018[_0x4fb196(0xee)](_0x1235a0),!_0x311529[_0x4fb196(0xea)]('no-skills')?await installOfficialSkill(_0x311529['nonInteractive']):console[_0x4fb196(0xf5)](a34_0x530d87[_0x4fb196(0xd7)](_0x4fb196(0xb1))),{'ok':!![]};}_0x30b018['info'](getInstallPlanLabel(_0x55bf10,_0x48c98f));const _0x23d594=detectPackageManager(),_0x362141=_0x23d594===_0x4fb196(0xc9)?resolveNpmBin(_0x4fb196(0xc9)):_0x23d594,_0x1ca186=a34_0x252ecc(_0x4fb196(0xd5)+_0x23d594+_0x4fb196(0xb4))[_0x4fb196(0xb5)]();try{return await execa(_0x362141,['install','-g',NPM_PACKAGE_NAME+'@'+_0x48c98f['version']],{'stdio':_0x4fb196(0xd4)}),_0x1ca186[_0x4fb196(0xee)]('Updated\x20to\x20v'+_0x48c98f[_0x4fb196(0xf2)]),console[_0x4fb196(0xf5)](a34_0x530d87[_0x4fb196(0xd7)](_0x4fb196(0xd2))),!_0x311529[_0x4fb196(0xea)](_0x4fb196(0xf3))?await installOfficialSkill(_0x311529[_0x4fb196(0xe5)]):console[_0x4fb196(0xf5)](a34_0x530d87[_0x4fb196(0xd7)]('Skipping\x20official\x20skill\x20package\x20(--no-skills).')),{'ok':!![]};}catch(_0x325ef9){return _0x1ca186[_0x4fb196(0xb8)](_0x4fb196(0xd8)),console[_0x4fb196(0xdd)](a34_0x530d87['red']('\x20\x20'+_0x325ef9[_0x4fb196(0xe2)])),console['log'](a34_0x530d87[_0x4fb196(0xd7)](_0x4fb196(0xe1)+_0x23d594+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x48c98f['version'])),{'ok':![],'message':_0x325ef9['message']};}}export const updateDefinition={'service':a34_0xefaf68(0xb0),'command':a34_0xefaf68(0xf4),'description':a34_0xefaf68(0xfb),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x576a15,_0x1ccffd){const _0x230450=a35_0x1471,_0x9f10f0=_0x576a15();while(!![]){try{const _0x3c8c50=-parseInt(_0x230450(0x1d0))/0x1*(-parseInt(_0x230450(0x1cc))/0x2)+-parseInt(_0x230450(0x1d2))/0x3+parseInt(_0x230450(0x1ce))/0x4*(parseInt(_0x230450(0x1cb))/0x5)+-parseInt(_0x230450(0x1c9))/0x6*(-parseInt(_0x230450(0x1cd))/0x7)+parseInt(_0x230450(0x1ca))/0x8+-parseInt(_0x230450(0x1cf))/0x9+-parseInt(_0x230450(0x1d1))/0xa;if(_0x3c8c50===_0x1ccffd)break;else _0x9f10f0['push'](_0x9f10f0['shift']());}catch(_0x7c236d){_0x9f10f0['push'](_0x9f10f0['shift']());}}}(a35_0x2716,0x98125));import{codegenSdk}from'../../commands/codegen/sdk.js';function a35_0x2716(){const _0x4b05ae=['1095027PddjIt','3179028tQSYVj','9894464NAMpru','1610xpaZuH','4366LvMUAy','7EuSEWV','7044HNgmKd','5627223CXiwUt','327nlmyiG','14343880wbZUgJ'];a35_0x2716=function(){return _0x4b05ae;};return a35_0x2716();}import{codegenSql}from'../../commands/codegen/sql.js';function a35_0x1471(_0x4a299e,_0x35c3c4){_0x4a299e=_0x4a299e-0x1c9;const _0x2716bb=a35_0x2716();let _0x147157=_0x2716bb[_0x4a299e];return _0x147157;}export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a36_0x3059(){const _0x20d067=['boolean','5224AmnBGI','1393UYFSxU','operation','2436TNnZNP','Omit\x20import\x20statements\x20from\x20generated\x20code','str','name','212710akPEdN','410DpKSOB','sdk','alias','90BFTGpP','246843IpwWPG','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','code','read','bool','233629VMQOHj','codegen','586254nLUaZM','string','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','skip-imports','149568DNiezR'];a36_0x3059=function(){return _0x20d067;};return a36_0x3059();}const a36_0x5a25bc=a36_0x5ee5;function a36_0x5ee5(_0x7d72e,_0x16cc66){_0x7d72e=_0x7d72e-0x1ab;const _0x30598e=a36_0x3059();let _0x5ee530=_0x30598e[_0x7d72e];return _0x5ee530;}(function(_0x21656d,_0x289ec2){const _0x40b08e=a36_0x5ee5,_0x441970=_0x21656d();while(!![]){try{const _0x4687c5=parseInt(_0x40b08e(0x1ac))/0x1+-parseInt(_0x40b08e(0x1bb))/0x2+-parseInt(_0x40b08e(0x1ae))/0x3+parseInt(_0x40b08e(0x1b2))/0x4+-parseInt(_0x40b08e(0x1bc))/0x5*(-parseInt(_0x40b08e(0x1b7))/0x6)+parseInt(_0x40b08e(0x1b5))/0x7*(-parseInt(_0x40b08e(0x1b4))/0x8)+parseInt(_0x40b08e(0x1c0))/0x9*(parseInt(_0x40b08e(0x1bf))/0xa);if(_0x4687c5===_0x289ec2)break;else _0x441970['push'](_0x441970['shift']());}catch(_0x2a6144){_0x441970['push'](_0x441970['shift']());}}}(a36_0x3059,0x1d28c));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a36_0x5a25bc(0x1ad),'command':a36_0x5a25bc(0x1bd),'description':a36_0x5a25bc(0x1b0),'risk':a36_0x5a25bc(0x1c3),'flags':[CODE_FLAG_OPTIONAL,{'name':a36_0x5a25bc(0x1be),'type':a36_0x5a25bc(0x1af),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a36_0x5a25bc(0x1b6),'type':a36_0x5a25bc(0x1af),'required':!![],'description':a36_0x5a25bc(0x1c1)},{'name':a36_0x5a25bc(0x1b1),'type':a36_0x5a25bc(0x1b3),'description':a36_0x5a25bc(0x1b8)}],async 'execute'(_0x2a1b0d){const _0xb364ca=a36_0x5a25bc,{dataset:_0x454504,operation:_0x52ffa2}=await getOperationDetail(_0x2a1b0d['appCode'],_0x2a1b0d[_0xb364ca(0x1b9)]('code'),_0x2a1b0d['str'](_0xb364ca(0x1b6))),_0x4ea029=generateSdkCode(_0x454504,_0x52ffa2,{'includeImports':!_0x2a1b0d[_0xb364ca(0x1ab)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x454504[_0xb364ca(0x1ba)],'code':_0x454504[_0xb364ca(0x1c2)],'tableName':_0x454504['tableName']},'operation':_0x2a1b0d['str'](_0xb364ca(0x1b6)),'code':_0x4ea029}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a37_0x441d9d=a37_0x1c0c;function a37_0x11c9(){const _0x45f540=['codegen','sqlName','139274GJOiEW','target','boolean','1452260uzMvQN','394737HKfLxk','sqlcode','str','16EjswCS','no-imports','1152728PqSlLu','8XEaeog','bool','bff','sdk','appCode','1427094QDfoff','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','string','2757258uLpXAu','3119179csXKyN','read'];a37_0x11c9=function(){return _0x45f540;};return a37_0x11c9();}(function(_0x1007b8,_0x1e6938){const _0x3f3d96=a37_0x1c0c,_0x5773d2=_0x1007b8();while(!![]){try{const _0x1efef2=parseInt(_0x3f3d96(0xdf))/0x1+-parseInt(_0x3f3d96(0xd6))/0x2+-parseInt(_0x3f3d96(0xda))/0x3+parseInt(_0x3f3d96(0xe0))/0x4*(-parseInt(_0x3f3d96(0xd9))/0x5)+-parseInt(_0x3f3d96(0xd1))/0x6+parseInt(_0x3f3d96(0xd2))/0x7*(parseInt(_0x3f3d96(0xdd))/0x8)+-parseInt(_0x3f3d96(0xe5))/0x9;if(_0x1efef2===_0x1e6938)break;else _0x5773d2['push'](_0x5773d2['shift']());}catch(_0x508c12){_0x5773d2['push'](_0x5773d2['shift']());}}}(a37_0x11c9,0x9d26d));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a37_0x1c0c(_0x1039da,_0x208187){_0x1039da=_0x1039da-0xcf;const _0x11c98e=a37_0x11c9();let _0x1c0ce1=_0x11c98e[_0x1039da];return _0x1c0ce1;}export const codegenSql={'service':a37_0x441d9d(0xd4),'command':'sql','description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a37_0x441d9d(0xd3),'flags':[SQLCODE_FLAG,{'name':'target','type':a37_0x441d9d(0xd0),'description':a37_0x441d9d(0xcf),'default':'sdk','enum':[a37_0x441d9d(0xe3),a37_0x441d9d(0xe2)]},{'name':a37_0x441d9d(0xde),'type':a37_0x441d9d(0xd8),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x318a26){const _0x3d266e=a37_0x441d9d,_0x275562=await getSqlQueryInfo(_0x318a26[_0x3d266e(0xe4)],_0x318a26[_0x3d266e(0xdc)](_0x3d266e(0xdb))),_0x3f108c=_0x318a26['str'](_0x3d266e(0xd7))||_0x3d266e(0xe3),_0x542bd8=generateSqlCodeTemplate(_0x275562,{'target':_0x3f108c,'includeImports':!_0x318a26[_0x3d266e(0xe1)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x275562['sqlCode'],'sqlName':_0x275562[_0x3d266e(0xd5)],'target':_0x3f108c,'code':_0x542bd8}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x49f220,_0x2ca4bc){const _0x3cd6ac=a38_0x5e31,_0x50942f=_0x49f220();while(!![]){try{const _0x38179e=parseInt(_0x3cd6ac(0x68))/0x1*(parseInt(_0x3cd6ac(0x75))/0x2)+parseInt(_0x3cd6ac(0x70))/0x3+-parseInt(_0x3cd6ac(0x8d))/0x4*(parseInt(_0x3cd6ac(0x67))/0x5)+-parseInt(_0x3cd6ac(0x73))/0x6*(parseInt(_0x3cd6ac(0x8c))/0x7)+-parseInt(_0x3cd6ac(0x76))/0x8*(parseInt(_0x3cd6ac(0x71))/0x9)+-parseInt(_0x3cd6ac(0x84))/0xa*(parseInt(_0x3cd6ac(0x82))/0xb)+-parseInt(_0x3cd6ac(0x86))/0xc*(-parseInt(_0x3cd6ac(0x8e))/0xd);if(_0x38179e===_0x2ca4bc)break;else _0x50942f['push'](_0x50942f['shift']());}catch(_0x46c99c){_0x50942f['push'](_0x50942f['shift']());}}}(a38_0x2f08,0x3b991));import{input,checkbox,select}from'@inquirer/prompts';import a38_0x5a3216 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';function a38_0x5e31(_0xbf68a,_0x5acd6b){_0xbf68a=_0xbf68a-0x67;const _0x2f086d=a38_0x2f08();let _0x5e318d=_0x2f086d[_0xbf68a];return _0x5e318d;}import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x28832d=a38_0x5e31,_0x53d286=await input({'message':_0x28832d(0x77),'validate':_0x4ccfb5=>{const _0x47a559=_0x28832d,_0x50d02d=validateAppcode(_0x4ccfb5['trim']());return _0x50d02d[_0x47a559(0x89)]||_0x50d02d[_0x47a559(0x8a)]||_0x47a559(0x6c);}});return _0x53d286[_0x28832d(0x80)]();}export async function promptAppSelection(_0x47e4e7){const _0x3aa272=a38_0x5e31,_0x177fa6=[{'name':a38_0x5a3216[_0x3aa272(0x6b)](_0x3aa272(0x88)),'value':-0x1},..._0x47e4e7[_0x3aa272(0x78)]((_0x216e48,_0x5d7f9e)=>({'name':_0x216e48[_0x3aa272(0x79)]+'\x20\x20'+a38_0x5a3216['gray']('('+_0x216e48['appCode']+')'),'value':_0x5d7f9e}))],_0x4b02e0=await checkbox({'message':_0x3aa272(0x83)+a38_0x5a3216[_0x3aa272(0x6d)](_0x47e4e7[_0x3aa272(0x7d)])+_0x3aa272(0x7f),'choices':_0x177fa6,'loop':![]});if(_0x4b02e0['includes'](-0x1))return _0x3aa272(0x87);if(_0x4b02e0[_0x3aa272(0x7d)]===0x0)return _0x3aa272(0x87);return _0x4b02e0[_0x3aa272(0x78)](_0x45cc75=>_0x47e4e7[_0x45cc75]);}export async function promptSingleAppSelection(_0xa2fe74){const _0x1b2f56=a38_0x5e31,_0x2ebde8=[{'name':a38_0x5a3216['gray']('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x1b2f56(0x7b)},{'name':a38_0x5a3216[_0x1b2f56(0x6b)]('✎\x20自定义输入\x20appcode'),'value':'custom'},..._0xa2fe74['map'](_0x1747bf=>({'name':_0x1747bf[_0x1b2f56(0x79)]+'\x20\x20'+a38_0x5a3216['gray']('('+_0x1747bf[_0x1b2f56(0x7c)]+')'),'value':_0x1747bf[_0x1b2f56(0x7c)]}))],_0xd43104=await select({'message':_0x1b2f56(0x74),'choices':_0x2ebde8});if(_0xd43104==='skip')return _0x1b2f56(0x7b);if(_0xd43104==='custom')return _0x1b2f56(0x87);return _0xa2fe74[_0x1b2f56(0x69)](_0x11c106=>_0x11c106[_0x1b2f56(0x7c)]===_0xd43104);}export async function selectSingleAppcode(_0x4ed657){const _0x45c5c9=a38_0x5e31;if(!_0x4ed657)return writeCliSideChannelLine(a38_0x5a3216[_0x45c5c9(0x6f)](_0x45c5c9(0x72))),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x521590;try{_0x521590=await withActiveCookie(_0x4ed657,()=>listRemoteApps());}catch(_0x551bb5){writeCliSideChannelLine(a38_0x5a3216['yellow'](_0x45c5c9(0x85)));if(_0x551bb5 instanceof Error)writeCliSideChannelLine(a38_0x5a3216['gray']('\x20\x20('+_0x551bb5[_0x45c5c9(0x8a)]+')'));return _fallbackOrSkip();}if(_0x521590[_0x45c5c9(0x7d)]===0x0)return writeCliSideChannelLine(a38_0x5a3216[_0x45c5c9(0x6b)](_0x45c5c9(0x6a))),_fallbackOrSkip();const _0x2f67fb=await promptSingleAppSelection(_0x521590);if(_0x2f67fb==='skip')return'';if(_0x2f67fb==='custom')return promptCustomAppcode();return _0x2f67fb[_0x45c5c9(0x7c)];}function a38_0x2f08(){const _0x46a10b=['App\x20Code:','gray','1247289wVfLer','46233fAiSWT','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','6CzBATI','请选择要绑定的应用:','10bBwMzY','280DaEHnK','请输入\x20App\x20Code:','map','appName','正在获取可用应用列表...','skip','appCode','length','✎\x20手动输入','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','trim','\x0a无法获取远程应用列表,请手动输入。','891FSgitp','获取到\x20','34920AmFmBl','无法获取远程应用列表,请手动输入。','516RavdVY','custom','✎\x20自定义输入\x20appcode','valid','message','manual','1385041NTxZHl','236VHMmbR','214604YcmQhw','32930nKsJDc','33518exLzbS','find','未找到可用应用。','yellow','Invalid\x20App\x20Code','cyan'];a38_0x2f08=function(){return _0x46a10b;};return a38_0x2f08();}export async function selectMultipleApps(_0x18cd75){const _0x2f0ad8=a38_0x5e31;writeCliSideChannelLine(_0x2f0ad8(0x7a));let _0x13be04;try{_0x13be04=await withActiveCookie(_0x18cd75,()=>listRemoteApps());}catch(_0xaf7a9){writeCliSideChannelLine(_0x2f0ad8(0x81));if(_0xaf7a9 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0xaf7a9[_0x2f0ad8(0x8a)]+')');return _0x2f0ad8(0x87);}if(_0x13be04['length']===0x0)return writeCliSideChannelLine('\x0a未找到可用应用。'),_0x2f0ad8(0x87);return promptAppSelection(_0x13be04);}async function _fallbackOrSkip(){const _0x2d538e=a38_0x5e31,_0x1a6db0=await select({'message':_0x2d538e(0x6e),'choices':[{'name':a38_0x5a3216[_0x2d538e(0x6f)]('(跳过,稍后配置)'),'value':'skip'},{'name':a38_0x5a3216[_0x2d538e(0x6b)](_0x2d538e(0x7e)),'value':_0x2d538e(0x8b)}]});if(_0x1a6db0==='skip')return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a39_0x539d3d=a39_0x2d2d;(function(_0x30ff47,_0x22fe2d){const _0x8efa68=a39_0x2d2d,_0x2aced8=_0x30ff47();while(!![]){try{const _0x3321eb=parseInt(_0x8efa68(0xae))/0x1+parseInt(_0x8efa68(0xb7))/0x2+parseInt(_0x8efa68(0xa8))/0x3+parseInt(_0x8efa68(0xb3))/0x4+-parseInt(_0x8efa68(0xb9))/0x5+parseInt(_0x8efa68(0xaa))/0x6+-parseInt(_0x8efa68(0xab))/0x7*(parseInt(_0x8efa68(0xaf))/0x8);if(_0x3321eb===_0x22fe2d)break;else _0x2aced8['push'](_0x2aced8['shift']());}catch(_0x1a1d0a){_0x2aced8['push'](_0x2aced8['shift']());}}}(a39_0x2319,0xdf37f));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a39_0x539d3d(0xb8)};export const CODE_FLAG={'name':'code','type':a39_0x539d3d(0xa9),'required':!![],'description':a39_0x539d3d(0xba),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a39_0x539d3d(0xba)};export const SQLCODE_FLAG={'name':a39_0x539d3d(0xad),'type':'string','required':!![],'description':a39_0x539d3d(0xb2),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a39_0x539d3d(0xb4)}};export const APPCODE_FLAG_OPTIONAL={'name':a39_0x539d3d(0xb1),'type':a39_0x539d3d(0xa9),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};function a39_0x2319(){const _0x1418cf=['232560UbpcZz','string','17334nHXvhS','595rncKCD','MYSQL','sqlcode','891818ptPumm','134248cYLiyy','Database\x20product\x20type','appcode','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','5238388quWctV','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','number','dbtype','3609266iIaXtM','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','8728845MVIsxZ','Dataset\x20code\x20(32-char\x20hex\x20UUID)'];a39_0x2319=function(){return _0x1418cf;};return a39_0x2319();}export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a39_0x539d3d(0xb5),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};function a39_0x2d2d(_0x33ec41,_0x61c51d){_0x33ec41=_0x33ec41-0xa8;const _0x231921=a39_0x2319();let _0x2d2d71=_0x231921[_0x33ec41];return _0x2d2d71;}export const DB_TYPE_FLAG={'name':a39_0x539d3d(0xb6),'type':a39_0x539d3d(0xa9),'required':!![],'description':a39_0x539d3d(0xb0),'enum':[a39_0x539d3d(0xac),'POSTGRESQL']};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a40_0x90ef(){const _0xfd177e=['449920FoJQEd','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','1212CwYHEa','6auHUgQ','40453odUJeg','2393RtFEOS','trim','5102505GKuIVt','length','App\x20Code\x20cannot\x20be\x20empty','118148sXEIuZ','11047527QmCQMy','12409350BDMVjd','App\x20Code\x20cannot\x20exceed\x20100\x20characters','652iOKvDg'];a40_0x90ef=function(){return _0xfd177e;};return a40_0x90ef();}(function(_0x5ef36e,_0x3787b6){const _0x2d68da=a40_0x5443,_0x4f42a0=_0x5ef36e();while(!![]){try{const _0x3d88d8=parseInt(_0x2d68da(0x119))/0x1*(parseInt(_0x2d68da(0x113))/0x2)+parseInt(_0x2d68da(0x117))/0x3*(-parseInt(_0x2d68da(0x11e))/0x4)+parseInt(_0x2d68da(0x11b))/0x5+-parseInt(_0x2d68da(0x116))/0x6*(parseInt(_0x2d68da(0x118))/0x7)+parseInt(_0x2d68da(0x114))/0x8+parseInt(_0x2d68da(0x11f))/0x9+-parseInt(_0x2d68da(0x111))/0xa;if(_0x3d88d8===_0x3787b6)break;else _0x4f42a0['push'](_0x4f42a0['shift']());}catch(_0x21923a){_0x4f42a0['push'](_0x4f42a0['shift']());}}}(a40_0x90ef,0x96a23));function a40_0x5443(_0x1a51ba,_0x1b39c8){_0x1a51ba=_0x1a51ba-0x111;const _0x90ef4e=a40_0x90ef();let _0x544351=_0x90ef4e[_0x1a51ba];return _0x544351;}export function validateAppcode(_0x3b447f){const _0x5dd050=a40_0x5443,_0x4c9ab5=_0x3b447f[_0x5dd050(0x11a)]();if(!_0x4c9ab5)return{'valid':![],'message':_0x5dd050(0x11d)};if(_0x4c9ab5[_0x5dd050(0x11c)]>0x64)return{'valid':![],'message':_0x5dd050(0x112)};if(!/^[A-Za-z0-9_-]+$/['test'](_0x4c9ab5))return{'valid':![],'message':_0x5dd050(0x115)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a41_0x406593=a41_0x153e;(function(_0x263ece,_0x2fdd9f){const _0x549e23=a41_0x153e,_0x400575=_0x263ece();while(!![]){try{const _0x4e5aab=-parseInt(_0x549e23(0xae))/0x1+parseInt(_0x549e23(0xbd))/0x2+parseInt(_0x549e23(0xb6))/0x3+parseInt(_0x549e23(0xb9))/0x4*(parseInt(_0x549e23(0xb8))/0x5)+parseInt(_0x549e23(0xb0))/0x6*(-parseInt(_0x549e23(0xbb))/0x7)+-parseInt(_0x549e23(0xb5))/0x8+parseInt(_0x549e23(0xba))/0x9;if(_0x4e5aab===_0x2fdd9f)break;else _0x400575['push'](_0x400575['shift']());}catch(_0x19a539){_0x400575['push'](_0x400575['shift']());}}}(a41_0x4379,0x91dc2));function a41_0x4379(){const _0x499fd5=['string','validation','str','read','key','get','586933cjlTzi','Missing\x20key.','3876BcYvQG','Get\x20a\x20config\x20value\x20by\x20key','object','Usage:\x20','app','8612704qWLHay','2129175AcRAqo','config','144930dHjhsO','80GaDiuB','9376839VaVtiF','8995SVuIeS','appcode','1519514yBXWkk'];a41_0x4379=function(){return _0x499fd5;};return a41_0x4379();}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(_0x24f5c7){const _0x4c9a6d=a41_0x153e,_0x3fa578=_0x24f5c7[_0x4c9a6d(0xaa)](_0x4c9a6d(0xac));if(!_0x3fa578)throw CliErrors[_0x4c9a6d(0xa9)](_0x4c9a6d(0xaf),_0x4c9a6d(0xb3)+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x24d551=readConfig(),_0x55e956=_0x3fa578===_0x4c9a6d(0xb4)?_0x4c9a6d(0xbc):_0x3fa578,_0x27a609=_0x24d551[_0x55e956];if(_0x27a609===undefined)throw CliErrors[_0x4c9a6d(0xa9)]('Key\x20not\x20found:\x20'+_0x3fa578);return{'ok':!![],'data':typeof _0x27a609==='object'?_0x27a609:{[_0x55e956]:_0x27a609},'message':typeof _0x27a609===_0x4c9a6d(0xb2)?undefined:String(_0x27a609)};}function a41_0x153e(_0x3965ee,_0x3d64cd){_0x3965ee=_0x3965ee-0xa8;const _0x437969=a41_0x4379();let _0x153e51=_0x437969[_0x3965ee];return _0x153e51;}export const configGetDefinition={'service':a41_0x406593(0xb7),'command':a41_0x406593(0xad),'description':a41_0x406593(0xb1),'risk':a41_0x406593(0xab),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a41_0x406593(0xac),'type':a41_0x406593(0xa8),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1bab70,_0x3ee29f){const _0x5683f8=a42_0x48bd,_0x5ba295=_0x1bab70();while(!![]){try{const _0x161c0e=-parseInt(_0x5683f8(0x150))/0x1*(-parseInt(_0x5683f8(0x152))/0x2)+-parseInt(_0x5683f8(0x151))/0x3*(-parseInt(_0x5683f8(0x154))/0x4)+parseInt(_0x5683f8(0x153))/0x5+parseInt(_0x5683f8(0x14f))/0x6+-parseInt(_0x5683f8(0x159))/0x7*(-parseInt(_0x5683f8(0x157))/0x8)+parseInt(_0x5683f8(0x156))/0x9+parseInt(_0x5683f8(0x155))/0xa*(-parseInt(_0x5683f8(0x158))/0xb);if(_0x161c0e===_0x3ee29f)break;else _0x5ba295['push'](_0x5ba295['shift']());}catch(_0x2b418){_0x5ba295['push'](_0x5ba295['shift']());}}}(a42_0x7ba9,0xe06c3));function a42_0x48bd(_0x5a50ad,_0x12b4af){_0x5a50ad=_0x5a50ad-0x14f;const _0x7ba971=a42_0x7ba9();let _0x48bd91=_0x7ba971[_0x5a50ad];return _0x48bd91;}function a42_0x7ba9(){const _0x323d93=['10505151OFGYIO','1117976DTTufa','73919450PZKHwp','91EiWQIA','8324880fLwOik','79859TmNIGx','3LSENeQ','12uSmaZD','7715800LEJEZG','4981764qHDULU','10QfFmba'];a42_0x7ba9=function(){return _0x323d93;};return a42_0x7ba9();}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
|
-
const
|
|
1
|
+
const a43_0x431afa=a43_0x3f86;(function(_0x149712,_0x2d8d2c){const _0x14da9a=a43_0x3f86,_0xdae2fa=_0x149712();while(!![]){try{const _0x115f9f=-parseInt(_0x14da9a(0x17e))/0x1*(parseInt(_0x14da9a(0x170))/0x2)+parseInt(_0x14da9a(0x17c))/0x3+parseInt(_0x14da9a(0x175))/0x4+parseInt(_0x14da9a(0x178))/0x5+parseInt(_0x14da9a(0x17b))/0x6*(-parseInt(_0x14da9a(0x17d))/0x7)+-parseInt(_0x14da9a(0x174))/0x8*(parseInt(_0x14da9a(0x177))/0x9)+-parseInt(_0x14da9a(0x172))/0xa*(-parseInt(_0x14da9a(0x176))/0xb);if(_0x115f9f===_0x2d8d2c)break;else _0xdae2fa['push'](_0xdae2fa['shift']());}catch(_0x4284ac){_0xdae2fa['push'](_0xdae2fa['shift']());}}}(a43_0x1475,0x5ec59));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';function a43_0x1475(){const _0x3a5525=['read','List\x20all\x20config\x20values','698358StjPsF','401292QxmENH','14vSLkhS','376300kPiCXG','bool','config','4HfmTuJ','global','9312670pKubnI','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','16PvHmxK','2177764cOqOaP','11LSgGNh','2055051acribm','1103885XZbJwy'];a43_0x1475=function(){return _0x3a5525;};return a43_0x1475();}function a43_0x3f86(_0x36ba4a,_0x2dc20f){_0x36ba4a=_0x36ba4a-0x16e;const _0x14750e=a43_0x1475();let _0x3f863d=_0x14750e[_0x36ba4a];return _0x3f863d;}async function execute(_0x13a7b1){const _0x1bab73=a43_0x3f86,_0x1e9e30=_0x13a7b1[_0x1bab73(0x16e)]('global')?readScopedConfig(_0x1bab73(0x171)):readConfig();return{'ok':!![],'data':_0x1e9e30};}export const configListDefinition={'service':a43_0x431afa(0x16f),'command':'list','description':a43_0x431afa(0x17a),'risk':a43_0x431afa(0x179),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a43_0x431afa(0x171),'type':'boolean','description':a43_0x431afa(0x173),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a44_0x5d3020=a44_0x5420;(function(_0x14fe96,_0x4813eb){const _0x139611=a44_0x5420,_0x526f2d=_0x14fe96();while(!![]){try{const _0x3fed3e=-parseInt(_0x139611(0x1e7))/0x1+-parseInt(_0x139611(0x1d4))/0x2*(parseInt(_0x139611(0x1c5))/0x3)+-parseInt(_0x139611(0x1c1))/0x4*(-parseInt(_0x139611(0x1e6))/0x5)+parseInt(_0x139611(0x1df))/0x6+-parseInt(_0x139611(0x1c6))/0x7+-parseInt(_0x139611(0x1e0))/0x8*(-parseInt(_0x139611(0x1d0))/0x9)+-parseInt(_0x139611(0x1d2))/0xa*(parseInt(_0x139611(0x1d7))/0xb);if(_0x3fed3e===_0x4813eb)break;else _0x526f2d['push'](_0x526f2d['shift']());}catch(_0x42b800){_0x526f2d['push'](_0x526f2d['shift']());}}}(a44_0x2084,0x2d0f4));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a44_0x2084(){const _0x502009=['global','keys','value','969018coMiyh','2744paEClY','str','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','locale','Missing\x20value.','\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','30lIrVXR','165522FvmjhI','object','Missing\x20key.','env','length','validation','Config\x20value','boolean','Global','Set\x20a\x20config\x20value','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','config','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','\x22\x20is\x20not\x20settable.','includes','Top-level\x20key\x20\x22','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','key','132692WeRrpG','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','Invalid\x20value\x20for\x20\x22','string','645846vybBpH','76335EjULiK','appcode','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','\x20appcode\x20set\x20to:\x20','Project','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','\x20set\x20to:\x20','riskLevel','Usage:\x20','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','8811DFqNhj','bool','110emXJml','`,\x20`','2ITbSkE','apps','app','120065mbxPLW','write','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','\x20app\x20add\x20<name>\x20--appcode\x20','Settable\x20top-level\x20keys:\x20'];a44_0x2084=function(){return _0x502009;};return a44_0x2084();}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(_0x154012){const _0x33ba1c=a44_0x5420,_0x183f0e=_0x154012['str'](_0x33ba1c(0x1c0)),_0x5a39b0=_0x154012[_0x33ba1c(0x1e1)](_0x33ba1c(0x1de));if(!_0x183f0e)throw CliErrors[_0x33ba1c(0x1ec)](_0x33ba1c(0x1e9),_0x33ba1c(0x1ce)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x5a39b0===undefined||_0x5a39b0==='')throw CliErrors[_0x33ba1c(0x1ec)](_0x33ba1c(0x1e4),_0x33ba1c(0x1ce)+CLI_BIN_NAME+_0x33ba1c(0x1e2));if(_0x5a39b0['length']>0x1f4)throw CliErrors['validation'](_0x33ba1c(0x1c2));if(!isTopLevelConfigKey(_0x183f0e))throw CliErrors[_0x33ba1c(0x1ec)](_0x33ba1c(0x1be)+_0x183f0e+_0x33ba1c(0x1f4),_0x33ba1c(0x1db)+getTopLevelConfigKeySummary());if(_0x183f0e===_0x33ba1c(0x1cd))throw CliErrors[_0x33ba1c(0x1ec)](_0x33ba1c(0x1cf));if(CONFIG_ENUM_VALUES[_0x183f0e]&&!CONFIG_ENUM_VALUES[_0x183f0e][_0x33ba1c(0x1bd)](_0x5a39b0))throw CliErrors['validation'](_0x33ba1c(0x1c3)+_0x183f0e+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x183f0e]['join'](',\x20'));if(_0x183f0e===_0x33ba1c(0x1e3)&&!normalizeLocale(_0x5a39b0))throw CliErrors[_0x33ba1c(0x1ec)]('Invalid\x20locale\x20value.',_0x33ba1c(0x1cb));const _0x29aac9={'global':_0x154012[_0x33ba1c(0x1d1)](_0x33ba1c(0x1dc))},_0x1dffba=resolveWriteScope(_0x29aac9),_0x299b6a=readScopedConfig(_0x1dffba);let _0xf5fc61=_0x183f0e,_0x5b7ee6=_0x5a39b0;_0x183f0e===_0x33ba1c(0x1d6)&&(_0xf5fc61='appcode',delete _0x299b6a['app']);_0x183f0e===_0x33ba1c(0x1e3)&&(_0x5b7ee6=normalizeLocale(_0x5a39b0));if(_0x183f0e==='env'){_0x5b7ee6=normalizeEnv(_0x5a39b0);if(!isProduction(_0x5b7ee6)&&!isDaily(_0x5b7ee6))throw CliErrors[_0x33ba1c(0x1ec)](_0x33ba1c(0x1d9),_0x33ba1c(0x1f1));}if(_0x183f0e===_0x33ba1c(0x1c7)){const _0x1a29da=_0x299b6a[_0x33ba1c(0x1d5)]&&typeof _0x299b6a[_0x33ba1c(0x1d5)]===_0x33ba1c(0x1e8)?Object[_0x33ba1c(0x1dd)](_0x299b6a[_0x33ba1c(0x1d5)]):[];if(_0x1a29da[_0x33ba1c(0x1eb)]>0x0)throw CliErrors[_0x33ba1c(0x1ec)](_0x33ba1c(0x1c8),'Use\x20`'+CLI_BIN_NAME+_0x33ba1c(0x1da)+_0x5b7ee6+_0x33ba1c(0x1d3)+CLI_BIN_NAME+_0x33ba1c(0x1e5));const _0x1565d9=buildCanonicalProjectConfig({..._0x299b6a},{'appCodes':[_0x5b7ee6],'env':typeof _0x299b6a[_0x33ba1c(0x1ea)]===_0x33ba1c(0x1c4)?_0x299b6a[_0x33ba1c(0x1ea)]:undefined});writeScopedConfig(_0x1565d9,_0x1dffba);const _0x130893=_0x1dffba===_0x33ba1c(0x1dc)?_0x33ba1c(0x1ef):_0x33ba1c(0x1ca);return{'ok':!![],'message':'✓\x20'+_0x130893+_0x33ba1c(0x1c9)+_0x5b7ee6+_0x33ba1c(0x1bf)};}_0x299b6a[_0xf5fc61]=_0x5b7ee6,writeScopedConfig(_0x299b6a,_0x1dffba);const _0x23a1a8=_0x1dffba===_0x33ba1c(0x1dc)?_0x33ba1c(0x1ef):_0x33ba1c(0x1ca);return{'ok':!![],'message':'✓\x20'+_0x23a1a8+'\x20'+_0xf5fc61+_0x33ba1c(0x1cc)+_0x5b7ee6};}function a44_0x5420(_0x36d2d3,_0x20e403){_0x36d2d3=_0x36d2d3-0x1bd;const _0x208467=a44_0x2084();let _0x5420ee=_0x208467[_0x36d2d3];return _0x5420ee;}export const configSetDefinition={'service':a44_0x5d3020(0x1f2),'command':'set','description':a44_0x5d3020(0x1f0),'risk':a44_0x5d3020(0x1d8),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a44_0x5d3020(0x1c0),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a44_0x5d3020(0x1de),'type':a44_0x5d3020(0x1c4),'description':a44_0x5d3020(0x1ed),'required':!![]},{'name':a44_0x5d3020(0x1dc),'type':a44_0x5d3020(0x1ee),'description':a44_0x5d3020(0x1f3),'default':![]}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x515b5b,_0x10f7b0){var _0x267168=a45_0x1a31,_0x4dc62b=_0x515b5b();while(!![]){try{var _0x2bdbe7=-parseInt(_0x267168(0x1c9))/0x1*(-parseInt(_0x267168(0x1c6))/0x2)+parseInt(_0x267168(0x1cc))/0x3*(parseInt(_0x267168(0x1c5))/0x4)+-parseInt(_0x267168(0x1ca))/0x5*(parseInt(_0x267168(0x1c7))/0x6)+-parseInt(_0x267168(0x1c4))/0x7+-parseInt(_0x267168(0x1c1))/0x8+-parseInt(_0x267168(0x1c2))/0x9*(-parseInt(_0x267168(0x1bf))/0xa)+parseInt(_0x267168(0x1cd))/0xb*(parseInt(_0x267168(0x1c3))/0xc);if(_0x2bdbe7===_0x10f7b0)break;else _0x4dc62b['push'](_0x4dc62b['shift']());}catch(_0x27c979){_0x4dc62b['push'](_0x4dc62b['shift']());}}}(a45_0x24e9,0x4a56d));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_0x24e9(){var _0x34c72e=['global','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','10vjqeQH','\x20init`\x20first.','441504rFVmdO','4651209nUwSZO','12LYwXjU','1496432zlVhru','45092BcyDzn','2LxFkqz','12mZdQYT','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','308144UNGuMP','1096295uCTzqt','validation','21goAQcx','1189309METjVg'];a45_0x24e9=function(){return _0x34c72e;};return a45_0x24e9();}export{CLI_BIN_NAME};export{normalizeLocale};function a45_0x1a31(_0x42aecb,_0x1dfb6b){_0x42aecb=_0x42aecb-0x1bd;var _0x24e946=a45_0x24e9();var _0x1a3105=_0x24e946[_0x42aecb];return _0x1a3105;}export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x1cd93d){var _0x1524bf=a45_0x1a31;if(_0x1cd93d[_0x1524bf(0x1bd)])return _0x1524bf(0x1bd);if(!isInProject())throw CliErrors[_0x1524bf(0x1cb)](_0x1524bf(0x1c8),_0x1524bf(0x1be)+CLI_BIN_NAME+_0x1524bf(0x1c0));return'project';}export function readScopedConfig(_0x4dae80){return readConfigFile(resolveWriteConfigPath(_0x4dae80));}export function writeScopedConfig(_0x1285c3,_0x460ef6){writeConfigFile(resolveWriteConfigPath(_0x460ef6),_0x1285c3);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x10c513=a46_0x51b2;(function(_0x1777ca,_0x5738d4){const _0x4490a9=a46_0x51b2,_0x4ddd6c=_0x1777ca();while(!![]){try{const _0x1c58c8=-parseInt(_0x4490a9(0x17b))/0x1+-parseInt(_0x4490a9(0x179))/0x2+-parseInt(_0x4490a9(0x188))/0x3+-parseInt(_0x4490a9(0x181))/0x4+parseInt(_0x4490a9(0x184))/0x5+-parseInt(_0x4490a9(0x17a))/0x6+parseInt(_0x4490a9(0x180))/0x7*(parseInt(_0x4490a9(0x17c))/0x8);if(_0x1c58c8===_0x5738d4)break;else _0x4ddd6c['push'](_0x4ddd6c['shift']());}catch(_0x50827e){_0x4ddd6c['push'](_0x4ddd6c['shift']());}}}(a46_0xc7f8,0xe1598));import{buildDataCommand}from'../../commands/data/shared.js';function a46_0xc7f8(){const _0x2aee9d=['8jKpIEc','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\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','join','43339541LHrHyM','2480796QkrSwG','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','Filter\x20dataset\x20records\x20with\x20query\x20conditions','4348805piEhGj','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','3914910BckXVE','filter','2638430XQStPA','6782352wQgsiC','1763316bPYwnE'];a46_0xc7f8=function(){return _0x2aee9d;};return a46_0xc7f8();}function a46_0x51b2(_0x2afee8,_0x2c3961){_0x2afee8=_0x2afee8-0x178;const _0xc7f860=a46_0xc7f8();let _0x51b2d7=_0xc7f860[_0x2afee8];return _0x51b2d7;}export const dataFilter=buildDataCommand({'command':a46_0x10c513(0x178),'operation':a46_0x10c513(0x178),'description':a46_0x10c513(0x183),'paramsRequired':![],'paramsHint':a46_0x10c513(0x17d),'helpExtra':[a46_0x10c513(0x185),a46_0x10c513(0x186),'\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_0x10c513(0x182),a46_0x10c513(0x17e),a46_0x10c513(0x187)][a46_0x10c513(0x17f)]('\x0a')});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a47_0x1071(_0x2fe18b,_0x2487b1){_0x2fe18b=_0x2fe18b-0x181;const _0x3fe978=a47_0x3fe9();let _0x10718e=_0x3fe978[_0x2fe18b];return _0x10718e;}const a47_0x26b06f=a47_0x1071;(function(_0x27bc25,_0xe04db1){const _0x14bdc4=a47_0x1071,_0x554692=_0x27bc25();while(!![]){try{const _0x405020=-parseInt(_0x14bdc4(0x188))/0x1+-parseInt(_0x14bdc4(0x184))/0x2+-parseInt(_0x14bdc4(0x18c))/0x3*(parseInt(_0x14bdc4(0x187))/0x4)+-parseInt(_0x14bdc4(0x18d))/0x5*(-parseInt(_0x14bdc4(0x18a))/0x6)+parseInt(_0x14bdc4(0x185))/0x7+parseInt(_0x14bdc4(0x186))/0x8*(parseInt(_0x14bdc4(0x189))/0x9)+-parseInt(_0x14bdc4(0x18b))/0xa*(-parseInt(_0x14bdc4(0x183))/0xb);if(_0x405020===_0xe04db1)break;else _0x554692['push'](_0x554692['shift']());}catch(_0xa2ace4){_0x554692['push'](_0x554692['shift']());}}}(a47_0x3fe9,0x896a0));import{buildDataCommand}from'../../commands/data/shared.js';function a47_0x3fe9(){const _0x26b7ff=['3579716OeLlZN','256OCSLPc','1128gvrRiE','150045KwoIaJ','3789mUEaXc','3054540coMbse','3046140VNBoaL','2949chchSn','10OTxqDI','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','getOne','11zHvjMX','1715110zClcgs'];a47_0x3fe9=function(){return _0x26b7ff;};return a47_0x3fe9();}export const dataGetOne=buildDataCommand({'command':a47_0x26b06f(0x182),'operation':a47_0x26b06f(0x182),'description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsRequired':!![],'paramsHint':a47_0x26b06f(0x181)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a48_0x38d1(_0x2cc849,_0x553e9a){_0x2cc849=_0x2cc849-0xf1;const _0x1a5cf4=a48_0x1a5c();let _0x38d142=_0x1a5cf4[_0x2cc849];return _0x38d142;}(function(_0x3bc76c,_0x92ff18){const _0x20321d=a48_0x38d1,_0x4295da=_0x3bc76c();while(!![]){try{const _0x3b4691=parseInt(_0x20321d(0xf7))/0x1*(-parseInt(_0x20321d(0xfc))/0x2)+-parseInt(_0x20321d(0xf5))/0x3*(-parseInt(_0x20321d(0xfb))/0x4)+-parseInt(_0x20321d(0xfe))/0x5*(parseInt(_0x20321d(0xf8))/0x6)+-parseInt(_0x20321d(0xf1))/0x7*(parseInt(_0x20321d(0xfd))/0x8)+-parseInt(_0x20321d(0xf6))/0x9*(-parseInt(_0x20321d(0xf9))/0xa)+-parseInt(_0x20321d(0xf4))/0xb*(parseInt(_0x20321d(0xf2))/0xc)+-parseInt(_0x20321d(0xfa))/0xd*(-parseInt(_0x20321d(0xf3))/0xe);if(_0x3b4691===_0x92ff18)break;else _0x4295da['push'](_0x4295da['shift']());}catch(_0x13cce8){_0x4295da['push'](_0x4295da['shift']());}}}(a48_0x1a5c,0x32446));import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];function a48_0x1a5c(){const _0x47e135=['6nlsxuX','3680eTYeZp','13ewMcqR','19676oQiNUh','108FtgkRz','96Pxrgbb','606370LHAtcR','52073siWbgE','2160qgKqVj','948430ZMTyFW','1848OBueuk','57KRUGJG','7704McBcnv','547TEWWNY'];a48_0x1a5c=function(){return _0x47e135;};return a48_0x1a5c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4ac8d8,_0x4e0ac9){const _0x2384d3=a49_0x353c,_0x48aef4=_0x4ac8d8();while(!![]){try{const _0x2466da=-parseInt(_0x2384d3(0x185))/0x1+-parseInt(_0x2384d3(0x18c))/0x2+parseInt(_0x2384d3(0x187))/0x3+-parseInt(_0x2384d3(0x184))/0x4*(-parseInt(_0x2384d3(0x188))/0x5)+-parseInt(_0x2384d3(0x17c))/0x6*(parseInt(_0x2384d3(0x17d))/0x7)+-parseInt(_0x2384d3(0x186))/0x8+parseInt(_0x2384d3(0x18d))/0x9;if(_0x2466da===_0x4e0ac9)break;else _0x48aef4['push'](_0x48aef4['shift']());}catch(_0x1cebc0){_0x48aef4['push'](_0x48aef4['shift']());}}}(a49_0x5097,0xecb06));function a49_0x353c(_0x1f3cc0,_0x1459e7){_0x1f3cc0=_0x1f3cc0-0x177;const _0x50970b=a49_0x5097();let _0x353c3f=_0x50970b[_0x1f3cc0];return _0x353c3f;}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(_0x3a5e2a){const _0x3a4ac0=a49_0x353c;if(!_0x3a5e2a)throw CliErrors[_0x3a4ac0(0x18f)](_0x3a4ac0(0x18a),_0x3a4ac0(0x17e));const _0x5fe544=_0x3a5e2a['id'];if(_0x5fe544===undefined||_0x5fe544===null||_0x5fe544==='')throw CliErrors[_0x3a4ac0(0x191)]('data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params',_0x3a4ac0(0x183));}function parseCommandParams(_0x61471d){return parseJsonParams(_0x61471d)??{};}export function buildDataCommand(_0x76f4ec){const _0x29c1c3=a49_0x353c,_0x11ec4a='Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically';return{'service':'data','command':_0x76f4ec[_0x29c1c3(0x182)],'description':_0x76f4ec['description'],'risk':'read','defaultOutputFormat':_0x29c1c3(0x189),'helpExtra':_0x76f4ec[_0x29c1c3(0x190)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':_0x29c1c3(0x177),'description':_0x11ec4a},{'name':_0x29c1c3(0x18a),'type':_0x29c1c3(0x177),'description':_0x76f4ec[_0x29c1c3(0x181)]}],async 'validate'(_0x3f0db1){const _0x5b5c36=_0x29c1c3,_0x5efb3c=_0x3f0db1[_0x5b5c36(0x18b)](_0x5b5c36(0x18a));if(_0x76f4ec[_0x5b5c36(0x18e)]&&!_0x5efb3c)throw CliErrors['flagMissing'](_0x5b5c36(0x18a),_0x76f4ec[_0x5b5c36(0x181)]);const _0xe652fe=parseJsonParams(_0x5efb3c);_0x76f4ec[_0x5b5c36(0x178)]===_0x5b5c36(0x17a)&&assertGetOneId(_0xe652fe);},async 'execute'(_0x57e4ca){const _0x5b16c2=_0x29c1c3,_0x442fb2=parseCommandParams(_0x57e4ca[_0x5b16c2(0x18b)](_0x5b16c2(0x18a))),_0x20fc25=Date[_0x5b16c2(0x17f)](),_0x24feb1=await executeDatasetDataOperation(_0x57e4ca['appCode'],_0x57e4ca[_0x5b16c2(0x18b)](_0x5b16c2(0x179)),_0x76f4ec['operation'],_0x442fb2),_0x33dd0b=Date[_0x5b16c2(0x17f)]()-_0x20fc25;return{'ok':!![],'data':{'result':_0x24feb1,'elapsed':_0x33dd0b},'message':_0x5b16c2(0x17b)+_0x76f4ec[_0x5b16c2(0x182)]+_0x5b16c2(0x180)+_0x33dd0b+'ms'};}};}function a49_0x5097(){const _0xf21ec8=['4560360RSBvqn','2347386iJVkAF','3385IzHJsJ','compress','params','str','2674254ApuTgu','39191040gjoGHr','paramsRequired','flagMissing','helpExtra','validation','string','operation','code','getOne','data\x20','5557602HehHKK','14GMvIYH','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','now','\x20completed\x20in\x20','paramsHint','command','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','2592JSFHlV','846534mVctcd'];a49_0x5097=function(){return _0xf21ec8;};return a49_0x5097();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0xad534b=a50_0x35d3;(function(_0x56e5d6,_0x59c782){const _0x48144a=a50_0x35d3,_0x544e8d=_0x56e5d6();while(!![]){try{const _0x50d11e=parseInt(_0x48144a(0x1ee))/0x1*(parseInt(_0x48144a(0x204))/0x2)+parseInt(_0x48144a(0x216))/0x3*(parseInt(_0x48144a(0x1de))/0x4)+parseInt(_0x48144a(0x203))/0x5+-parseInt(_0x48144a(0x1fb))/0x6*(-parseInt(_0x48144a(0x211))/0x7)+-parseInt(_0x48144a(0x1e8))/0x8*(-parseInt(_0x48144a(0x212))/0x9)+parseInt(_0x48144a(0x200))/0xa+parseInt(_0x48144a(0x1fc))/0xb*(-parseInt(_0x48144a(0x20f))/0xc);if(_0x50d11e===_0x59c782)break;else _0x544e8d['push'](_0x544e8d['shift']());}catch(_0x56af31){_0x544e8d['push'](_0x544e8d['shift']());}}}(a50_0x1b37,0x6d36f));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':'number','description':a50_0xad534b(0x210)},DBID_FLAG={'name':a50_0xad534b(0x1f7),'type':'number','description':a50_0xad534b(0x20d)},CONFIRM_FLAG={'name':a50_0xad534b(0x1ed),'type':a50_0xad534b(0x1df),'description':a50_0xad534b(0x1e1)},EXPECTED_COUNT_FLAG={'name':a50_0xad534b(0x1ea),'type':a50_0xad534b(0x1e6),'description':a50_0xad534b(0x1f8)};function a50_0x1b37(){const _0x891a2c=['34398kPrfDU','map','POST','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','description','tableName','high-risk-write','No\x20undeleted\x20dataset\x20found\x20for\x20','dbtableConfig','Delete\x20all\x20datasets\x20under\x20this\x20database\x20connection\x20id','id=','12fZXAwM','Dataset\x20id','1841eIPHFh','9CFojnO','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','message','relationPages','2514CZqIai','Deleted\x20','\x20failed','524dojfgU','boolean','\x20dataset(s);\x20','Required\x20to\x20execute\x20dataset\x20deletion','bool','validation','/smartapi/dataset/delete-dataset','num','number','\x20dataset(s).\x20This\x20only\x20deletes\x20platform\x20dataset\x20metadata\x20and\x20related\x20page/menu\x20records,\x20not\x20physical\x20databases\x20or\x20tables.','5811416DXbRJI','dbid=','expected-count','push','length','confirm','5aGGNDJ','dataset','name','dbName','--confirm\x20is\x20required\x20to\x20delete\x20datasets.','str','delete','code','filter','dbid','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','appCode','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','1098lSjxAc','9929282RNKWgK','\x20dataset(s)','Matched\x20','source','3523860TIaKXp','dbId','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','136450xdYImB'];a50_0x1b37=function(){return _0x891a2c;};return a50_0x1b37();}export const datasetDelete={'service':a50_0xad534b(0x1ef),'command':a50_0xad534b(0x1f4),'description':'Delete\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20datasets\x20under\x20a\x20db\x20id','risk':a50_0xad534b(0x20a),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1f04d7){const _0x114d5c=a50_0xad534b,_0x4665d5=_0x1f04d7[_0x114d5c(0x1e5)]('id'),_0x5c857c=_0x1f04d7[_0x114d5c(0x1f3)](_0x114d5c(0x1f5)),_0x2ad1a3=_0x1f04d7['num'](_0x114d5c(0x1f7)),_0xea1cda=[_0x4665d5>0x0,Boolean(_0x5c857c),_0x2ad1a3>0x0][_0x114d5c(0x1f6)](Boolean);if(_0xea1cda[_0x114d5c(0x1ec)]===0x0)throw CliErrors['validation'](_0x114d5c(0x202));if(_0xea1cda[_0x114d5c(0x1ec)]>0x1)throw CliErrors[_0x114d5c(0x1e3)](_0x114d5c(0x207));},async 'dryRun'(_0x1895f4){const _0x257631=a50_0xad534b,_0x1bee51=await resolveTargets(_0x1895f4);return{'method':_0x257631(0x206),'url':_0x257631(0x1e4),'body':{'appCode':_0x1895f4[_0x257631(0x1f9)],'count':_0x1bee51[_0x257631(0x1ec)],'datasets':_0x1bee51},'description':'Would\x20delete\x20'+_0x1bee51[_0x257631(0x1ec)]+_0x257631(0x1e7)};},async 'execute'(_0x52601f){const _0x346323=a50_0xad534b;if(!_0x52601f[_0x346323(0x1e2)](_0x346323(0x1ed)))throw CliErrors[_0x346323(0x1e3)](_0x346323(0x1f2),_0x346323(0x1fa));const _0x1b6361=await resolveTargets(_0x52601f),_0x17d7a1=[],_0x38301d=[];for(const _0x24c27e of _0x1b6361){try{await deleteDataset(_0x52601f[_0x346323(0x1f9)],_0x24c27e['id']),_0x17d7a1[_0x346323(0x1eb)](_0x24c27e);}catch(_0xef1f16){_0x38301d['push']({..._0x24c27e,'error':_0xef1f16 instanceof Error?_0xef1f16[_0x346323(0x214)]:String(_0xef1f16)});}}if(_0x38301d[_0x346323(0x1ec)]>0x0)return{'ok':![],'data':{'requested':_0x1b6361[_0x346323(0x1ec)],'deletedCount':_0x17d7a1[_0x346323(0x1ec)],'failedCount':_0x38301d['length'],'deleted':_0x17d7a1,'failed':_0x38301d},'message':_0x346323(0x1dc)+_0x17d7a1[_0x346323(0x1ec)]+'/'+_0x1b6361[_0x346323(0x1ec)]+_0x346323(0x1e0)+_0x38301d[_0x346323(0x1ec)]+_0x346323(0x1dd)};return{'ok':!![],'data':{'requested':_0x1b6361[_0x346323(0x1ec)],'deletedCount':_0x17d7a1['length'],'deleted':_0x17d7a1},'message':'Deleted\x20'+_0x17d7a1['length']+_0x346323(0x1fd)};}};async function resolveTargets(_0x1c94fd){const _0x37f3e8=a50_0xad534b,_0x5aefa1=_0x1c94fd[_0x37f3e8(0x1e5)]('id'),_0x1c6240=_0x1c94fd['str'](_0x37f3e8(0x1f5)),_0x2d0ddc=_0x1c94fd[_0x37f3e8(0x1e5)](_0x37f3e8(0x1f7));let _0x4f5c57;_0x1c6240?(_0x4f5c57=await listDatasets(_0x1c94fd[_0x37f3e8(0x1f9)],{'code':_0x1c6240}),_0x4f5c57=_0x4f5c57['filter'](_0x5e0cc0=>_0x5e0cc0[_0x37f3e8(0x1f5)]===_0x1c6240)):(_0x4f5c57=await listDatasets(_0x1c94fd['appCode']),_0x5aefa1>0x0&&(_0x4f5c57=_0x4f5c57[_0x37f3e8(0x1f6)](_0x58ad39=>_0x58ad39['id']===_0x5aefa1)),_0x2d0ddc>0x0&&(_0x4f5c57=_0x4f5c57[_0x37f3e8(0x1f6)](_0x232404=>_0x232404[_0x37f3e8(0x20c)]?.[_0x37f3e8(0x201)]===_0x2d0ddc)));const _0x38a739=_0x4f5c57[_0x37f3e8(0x205)](normalizeTarget);if(_0x38a739[_0x37f3e8(0x1ec)]===0x0){const _0x41a89a=_0x1c6240||(_0x5aefa1>0x0?_0x37f3e8(0x20e)+_0x5aefa1:_0x37f3e8(0x1e9)+_0x2d0ddc);throw CliErrors['validation'](_0x37f3e8(0x20b)+_0x41a89a+'.');}const _0x3b29d0=_0x1c94fd[_0x37f3e8(0x1e5)](_0x37f3e8(0x1ea));if(_0x3b29d0>0x0&&_0x38a739['length']!==_0x3b29d0)throw CliErrors[_0x37f3e8(0x1e3)](_0x37f3e8(0x1fe)+_0x38a739[_0x37f3e8(0x1ec)]+_0x37f3e8(0x213)+_0x3b29d0+'.');return _0x38a739;}function a50_0x35d3(_0x269366,_0x48e759){_0x269366=_0x269366-0x1dc;const _0x1b373f=a50_0x1b37();let _0x35d35b=_0x1b373f[_0x269366];return _0x35d35b;}function normalizeTarget(_0x454bda){const _0x3a3e84=a50_0xad534b,_0x4cf346=_0x454bda[_0x3a3e84(0x20c)]??{};return{'id':_0x454bda['id'],'code':_0x454bda[_0x3a3e84(0x1f5)],'name':_0x454bda[_0x3a3e84(0x1f0)],'description':_0x454bda[_0x3a3e84(0x208)],'source':_0x454bda[_0x3a3e84(0x1ff)],'dbId':_0x4cf346[_0x3a3e84(0x201)],'dbName':_0x4cf346[_0x3a3e84(0x1f1)],'tableName':_0x4cf346[_0x3a3e84(0x209)],'relatedPageCount':Array['isArray'](_0x454bda[_0x3a3e84(0x215)])?_0x454bda[_0x3a3e84(0x215)]['length']:undefined};}
|