@lovrabet/lovrabet-cli 2.1.20-beta.1 → 2.1.20
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/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.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/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.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/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.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/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a12_0x2322ca=a12_0x251f;(function(_0x2283a1,_0x47588f){const _0x272890=a12_0x251f,_0x2504e0=_0x2283a1();while(!![]){try{const _0x21df44=parseInt(_0x272890(0x164))/0x1*(parseInt(_0x272890(0x185))/0x2)+-parseInt(_0x272890(0x15e))/0x3*(parseInt(_0x272890(0x174))/0x4)+parseInt(_0x272890(0x1a3))/0x5*(-parseInt(_0x272890(0x16f))/0x6)+-parseInt(_0x272890(0x190))/0x7+parseInt(_0x272890(0x158))/0x8*(-parseInt(_0x272890(0x186))/0x9)+parseInt(_0x272890(0x1a5))/0xa+parseInt(_0x272890(0x19f))/0xb;if(_0x21df44===_0x47588f)break;else _0x2504e0['push'](_0x2504e0['shift']());}catch(_0x24c446){_0x2504e0['push'](_0x2504e0['shift']());}}}(a12_0x7188,0x3fd39));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';import{getUserDomain}from'../../constant/domain.js';import{authDeviceDefinition,readStoredDeviceCode,deleteStoredDeviceCode,fetchDeviceToken,isStoredDeviceCodeExpired}from'../../commands/auth/device.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x5145c3=a12_0x251f;writeCliSideChannelLine(_0x5145c3(0x152)+PRODUCT_CONFIG['userCenterDisplayName']+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x5145c3(0x172)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x5145c3(0x180));}function buildAccessKeySetupGuide(){const _0xc99293=a12_0x251f;return['AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20'+PRODUCT_CONFIG[_0xc99293(0x19c)]+':',USER_ACCESS_KEY_CREATE_URL,_0xc99293(0x14e)+CLI_BIN_NAME+_0xc99293(0x14a)]['join']('\x0a');}function canPromptForAccessKey(_0x1c223a){const _0x3f63d3=a12_0x251f;return!_0x1c223a[_0x3f63d3(0x18b)]&&process[_0x3f63d3(0x193)]['isTTY']!==![]&&process[_0x3f63d3(0x171)][_0x3f63d3(0x1a1)]!==![];}function a12_0x7188(){const _0x4c90db=['Show\x20current\x20authentication\x20status','access_key','104llkqIn','authRequired','AccessKey:\x20','Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','newConfigFileName','join','envName','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','read','ClientAk','24kOabNu','\x20auth\x20status','stdout','Tip:\x20you\x20can\x20also\x20run:','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','1955212kPXNwv','AccessKey\x20cleared\x20from\x20','Missing\x20accessKey.','auth','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','production','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','yes','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','Auth\x20mode:\x20','AccessKey\x20saved\x20to\x20','\x20auth\x20login\x20--access-key\x20<ak_xxx>','write','repeat','Write\x20to\x20global\x20config\x20(default)','success','6244vwtwuQ','1093221RWcRoV','str','\x20Verify:\x20','\x20env\x20var','No\x20AccessKey\x20found\x20in\x20','nonInteractive','trim','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','length','boolean','98112yNnEUL','Clear\x20accessKey\x20from\x20config','\x20config.','stdin','development','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','\x20Current\x20env:\x20','`auth\x20login`\x20does\x20not\x20support\x20--yes.','Read\x20from\x20global\x20config\x20(default)','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','string','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','userCenterDisplayName','global\x20config','project\x20config','9638442tiNCef','Option\x20B:\x20apps\x20config\x20(','isTTY','\x20scope.','495200neGFDj','test','809710VVWQNa','accessKey','\x20config','\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`','Clear\x20from\x20global\x20config\x20(default)','init','status','ACCESS_KEY','scope','\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]','access-key','bool','global','Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20','\x20\x20export\x20','Status:\x20valid','project','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','code','Option\x20C:\x20environment\x20variable','global-default','env','push','8PAlORa','\x20(via\x20','Option\x20A:\x20','validation','\x20doctor','check','3ZojsBN','Shorthand\x20for\x20--access-key','Invalid\x20accessKey\x20format:\x20\x22','expired'];a12_0x7188=function(){return _0x4c90db;};return a12_0x7188();}function resolveAuthScopeFlags(_0x117b28){const _0x64493a=a12_0x251f;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x117b28['bool']('global'),'explicitProject':_0x117b28[_0x64493a(0x14c)](_0x64493a(0x151)),'policy':_0x64493a(0x155)}));}async function resolveAuthWriteInput(_0x309eca){const _0x37020a=a12_0x251f;let _0x1b3bb4=(_0x309eca[_0x37020a(0x187)](_0x37020a(0x14b))||_0x309eca[_0x37020a(0x187)]('ak')||'')[_0x37020a(0x18c)]();const _0x332368=(_0x309eca[_0x37020a(0x187)](_0x37020a(0x156))||'')[_0x37020a(0x18c)]();if(!_0x1b3bb4&&canPromptForAccessKey(_0x309eca))try{showAccessKeyCreateHint(),_0x1b3bb4=await promptAccessKey('');}catch(_0x4ff766){if(isAbortPrompt(_0x4ff766))throw CliErrors['cancelled']();throw _0x4ff766;}if(!_0x1b3bb4)throw CliErrors[_0x37020a(0x15b)](_0x37020a(0x176),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x37020a(0x1a4)](_0x1b3bb4))throw CliErrors[_0x37020a(0x15b)](_0x37020a(0x160)+_0x1b3bb4+'\x22',_0x37020a(0x19b));if(!_0x332368)return{'accessKey':_0x1b3bb4};const _0x244c7e=normalizeEnv(_0x332368);return{'accessKey':_0x1b3bb4,'env':isDaily(_0x244c7e)?'daily':isDev(_0x244c7e)?_0x37020a(0x194):_0x37020a(0x179)};}function a12_0x251f(_0x4bfee2,_0x41f399){_0x4bfee2=_0x4bfee2-0x14a;const _0x71886f=a12_0x7188();let _0x251f89=_0x71886f[_0x4bfee2];return _0x251f89;}export const authDefinitions=[{'service':a12_0x2322ca(0x177),'command':'login','description':a12_0x2322ca(0x173),'risk':a12_0x2322ca(0x181),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a12_0x2322ca(0x19a),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a12_0x2322ca(0x19a),'description':a12_0x2322ca(0x15f)},{'name':'global','type':a12_0x2322ca(0x18f),'description':a12_0x2322ca(0x183),'default':!![]},{'name':a12_0x2322ca(0x151),'type':'boolean','description':a12_0x2322ca(0x17d),'default':![]}],async 'execute'(_0x617096){const _0x56be3b=a12_0x2322ca;if(_0x617096['bool'](_0x56be3b(0x17c)))throw CliErrors['validation'](_0x56be3b(0x197),'Use\x20`'+CLI_BIN_NAME+_0x56be3b(0x1a8)+CLI_BIN_NAME+_0x56be3b(0x18d));const _0xffc09a=(_0x617096[_0x56be3b(0x187)](_0x56be3b(0x14b))||_0x617096[_0x56be3b(0x187)]('ak')||'')['trim']();if(!_0xffc09a&&_0x617096[_0x56be3b(0x18b)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x2e3450=await resolveAuthWriteInput(_0x617096),_0x40bed5=resolveAuthScopeFlags(_0x617096),_0x22b15e=readScopedConfig(_0x40bed5);_0x22b15e['accessKey']=_0x2e3450[_0x56be3b(0x1a6)];_0x2e3450[_0x56be3b(0x156)]&&(_0x22b15e['env']=_0x2e3450[_0x56be3b(0x156)]);writeScopedConfig(_0x22b15e,_0x40bed5);const _0x284483=_0x40bed5[_0x56be3b(0x14d)]?_0x56be3b(0x14d):_0x56be3b(0x151),_0x4d2adf=_0x22b15e[_0x56be3b(0x156)]?_0x56be3b(0x196)+_0x22b15e[_0x56be3b(0x156)]+'.':'';return{'ok':!![],'message':_0x56be3b(0x17f)+_0x284483+_0x56be3b(0x192)+_0x4d2adf+_0x56be3b(0x188)+CLI_BIN_NAME+_0x56be3b(0x170)};}},{'service':'auth','command':a12_0x2322ca(0x1aa),'description':a12_0x2322ca(0x195),'risk':a12_0x2322ca(0x181),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'access-key','type':a12_0x2322ca(0x19a),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a12_0x2322ca(0x19a),'description':'Shorthand\x20for\x20--access-key'},{'name':a12_0x2322ca(0x156),'type':a12_0x2322ca(0x19a),'description':'Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config'},{'name':a12_0x2322ca(0x14d),'type':'boolean','description':a12_0x2322ca(0x183),'default':!![]},{'name':'project','type':a12_0x2322ca(0x18f),'description':a12_0x2322ca(0x17d),'default':![]}],async 'execute'(_0x2c5236){const _0xcb944=a12_0x2322ca,_0xd81207=await resolveAuthWriteInput(_0x2c5236),_0x64fa20=resolveAuthScopeFlags(_0x2c5236),_0x1f8b03={'accessKey':_0xd81207['accessKey']};_0xd81207[_0xcb944(0x156)]&&(_0x1f8b03[_0xcb944(0x156)]=_0xd81207[_0xcb944(0x156)]);writeScopedConfig(_0x1f8b03,_0x64fa20);const _0x4b7a7f=_0x64fa20[_0xcb944(0x14d)]?_0xcb944(0x14d):_0xcb944(0x151),_0x51d559=_0x1f8b03[_0xcb944(0x156)]?_0xcb944(0x196)+_0x1f8b03[_0xcb944(0x156)]+'.':'';return{'ok':!![],'message':'Auth\x20config\x20reinitialized\x20in\x20'+_0x4b7a7f+_0xcb944(0x1a2)+_0x51d559+_0xcb944(0x188)+CLI_BIN_NAME+_0xcb944(0x170)};}},{'service':a12_0x2322ca(0x177),'command':'logout','description':a12_0x2322ca(0x191),'risk':a12_0x2322ca(0x181),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x2322ca(0x14d),'type':a12_0x2322ca(0x18f),'description':a12_0x2322ca(0x1a9),'default':!![]},{'name':a12_0x2322ca(0x151),'type':a12_0x2322ca(0x18f),'description':a12_0x2322ca(0x199),'default':![]}],async 'execute'(_0x2a48eb){const _0x12327d=a12_0x2322ca,_0x481f85=resolveAuthScopeFlags(_0x2a48eb),_0x4ab4ab=readScopedConfig(_0x481f85),_0x5536c7=!!_0x4ab4ab['accessKey'];delete _0x4ab4ab['accessKey'],writeScopedConfig(_0x4ab4ab,_0x481f85);const _0xdc8cdc=_0x481f85['global']?_0x12327d(0x14d):_0x12327d(0x151);if(_0x5536c7)return{'ok':!![],'message':_0x12327d(0x175)+_0xdc8cdc+_0x12327d(0x192)};return{'ok':!![],'message':_0x12327d(0x18a)+_0xdc8cdc+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a12_0x2322ca(0x177),'command':'status','description':a12_0x2322ca(0x162),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x2322ca(0x14d),'type':a12_0x2322ca(0x18f),'description':a12_0x2322ca(0x198),'default':!![]},{'name':a12_0x2322ca(0x151),'type':a12_0x2322ca(0x18f),'description':a12_0x2322ca(0x17b),'default':![]},{'name':a12_0x2322ca(0x15d),'type':a12_0x2322ca(0x18f),'description':'Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','default':![]}],async 'execute'(_0x43a4b8){const _0x1ab6e9=a12_0x2322ca,_0x1d9608=resolveAuthScopeFlags(_0x43a4b8),_0x1f1031=readScopedConfig(_0x1d9608),_0x2f22c1=productEnvName(_0x1ab6e9(0x1ac)),_0x4622d8=productEnv(_0x1ab6e9(0x1ac))||undefined,_0x187d7d=_0x1f1031[_0x1ab6e9(0x1a6)]||undefined,_0x25c833=_0x4622d8||_0x187d7d,_0x8e788e=_0x4622d8?_0x2f22c1+_0x1ab6e9(0x189):_0x187d7d?(_0x1d9608[_0x1ab6e9(0x14d)]?_0x1ab6e9(0x14d):_0x1ab6e9(0x151))+_0x1ab6e9(0x1a7):null,_0x342d23=[_0x1ab6e9(0x17e)+AUTH_MODE[_0x1ab6e9(0x16e)]];if(_0x25c833){const _0x2bec4b=_0x25c833[_0x1ab6e9(0x18e)]>0x8?''+_0x25c833['slice'](0x0,0x8)+'*'[_0x1ab6e9(0x182)](_0x25c833[_0x1ab6e9(0x18e)]-0x8):_0x25c833;_0x342d23[_0x1ab6e9(0x157)](_0x1ab6e9(0x166)+_0x2bec4b+(_0x8e788e?_0x1ab6e9(0x159)+_0x8e788e+')':'')),_0x342d23[_0x1ab6e9(0x157)]('Status:\x20valid');}if(!_0x25c833){_0x342d23[_0x1ab6e9(0x157)](''),_0x342d23[_0x1ab6e9(0x157)](_0x1ab6e9(0x17a)),_0x342d23[_0x1ab6e9(0x157)](''),_0x342d23[_0x1ab6e9(0x157)](_0x1ab6e9(0x15a)+CLI_BIN_NAME+_0x1ab6e9(0x16c)),_0x342d23[_0x1ab6e9(0x157)](''),_0x342d23[_0x1ab6e9(0x157)](_0x1ab6e9(0x1a0)+PRODUCT_CONFIG[_0x1ab6e9(0x168)]+')'),_0x342d23[_0x1ab6e9(0x157)](_0x1ab6e9(0x178)),_0x342d23[_0x1ab6e9(0x157)](''),_0x342d23[_0x1ab6e9(0x157)](_0x1ab6e9(0x154)),_0x342d23[_0x1ab6e9(0x157)](_0x1ab6e9(0x14f)+_0x2f22c1+'=ak_xxx'),_0x342d23[_0x1ab6e9(0x157)](''),_0x342d23['push']('Then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x1ab6e9(0x170)),_0x342d23[_0x1ab6e9(0x157)]('If\x20command\x20execution\x20still\x20fails,\x20run:\x20'+CLI_BIN_NAME+_0x1ab6e9(0x15c));if(_0x43a4b8['bool']('check')){const _0x243340=readStoredDeviceCode();if(_0x243340&&!isStoredDeviceCodeExpired(_0x243340)){const _0x3cc79a=getUserDomain(),_0x1eca80=await fetchDeviceToken(_0x3cc79a,_0x243340[_0x1ab6e9(0x153)]);if(_0x1eca80[_0x1ab6e9(0x1ab)]===_0x1ab6e9(0x184)&&_0x1eca80[_0x1ab6e9(0x163)]){const _0x5a2ac4={'global':_0x243340[_0x1ab6e9(0x1ad)]==='global'},_0x2a1274=readScopedConfig(_0x5a2ac4);_0x2a1274[_0x1ab6e9(0x1a6)]=_0x1eca80[_0x1ab6e9(0x163)],writeScopedConfig(_0x2a1274,_0x5a2ac4),deleteStoredDeviceCode();const _0xcccc2=_0x1eca80['access_key'],_0x54506f=_0xcccc2[_0x1ab6e9(0x18e)]>0x8?''+_0xcccc2['slice'](0x0,0x8)+'*'[_0x1ab6e9(0x182)](_0xcccc2[_0x1ab6e9(0x18e)]-0x8):_0xcccc2,_0x1016be=_0x243340[_0x1ab6e9(0x1ad)]===_0x1ab6e9(0x14d)?_0x1ab6e9(0x19d):_0x1ab6e9(0x19e);return{'ok':!![],'message':[_0x1ab6e9(0x17e)+AUTH_MODE[_0x1ab6e9(0x16e)],_0x1ab6e9(0x166)+_0x54506f+_0x1ab6e9(0x159)+_0x1016be+')',_0x1ab6e9(0x150)][_0x1ab6e9(0x169)]('\x0a')};}_0x1eca80['status']===_0x1ab6e9(0x161)&&deleteStoredDeviceCode();throw CliErrors[_0x1ab6e9(0x165)](_0x1ab6e9(0x16b));}throw CliErrors['authRequired'](_0x342d23[_0x1ab6e9(0x169)]('\x0a'));}}return{'ok':!![],'message':_0x342d23[_0x1ab6e9(0x169)]('\x0a')};}},{'service':a12_0x2322ca(0x177),'command':'info','description':a12_0x2322ca(0x167),'risk':a12_0x2322ca(0x16d),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x3b1c51){const _0x4ed9f9=a12_0x2322ca,_0x52c361=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x52c361,'meta':{'env':_0x3b1c51[_0x4ed9f9(0x16a)]??_0x4ed9f9(0x179)}}};}},authDeviceDefinition];
|
|
1
|
+
function a12_0x351c(_0x4f9840,_0x3367c2){_0x4f9840=_0x4f9840-0x1b1;const _0x19bf15=a12_0x19bf();let _0x351c7a=_0x19bf15[_0x4f9840];return _0x351c7a;}const a12_0x3d9810=a12_0x351c;(function(_0x52f4e3,_0x12b0ab){const _0x32f20c=a12_0x351c,_0x10091c=_0x52f4e3();while(!![]){try{const _0x428c13=parseInt(_0x32f20c(0x1c9))/0x1*(parseInt(_0x32f20c(0x1bc))/0x2)+parseInt(_0x32f20c(0x1d6))/0x3+-parseInt(_0x32f20c(0x1b9))/0x4+-parseInt(_0x32f20c(0x1e2))/0x5+parseInt(_0x32f20c(0x1cb))/0x6+parseInt(_0x32f20c(0x20a))/0x7*(parseInt(_0x32f20c(0x200))/0x8)+parseInt(_0x32f20c(0x1e0))/0x9*(-parseInt(_0x32f20c(0x1b8))/0xa);if(_0x428c13===_0x12b0ab)break;else _0x10091c['push'](_0x10091c['shift']());}catch(_0x2c84bb){_0x10091c['push'](_0x10091c['shift']());}}}(a12_0x19bf,0xe1fc9));import{readScopedConfig,writeScopedConfig}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../../constant/product.js';import{AUTH_MODE}from'../../constant/auth-mode.js';import{normalizeEnv,isDaily,isDev}from'../../constant/env.js';import{USER_ACCESS_KEY_CREATE_URL}from'../../constant/url.js';import{CliErrors}from'../../errors.js';import{promptAccessKey,isAbortPrompt}from'../../commands/auth/prompt.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';function a12_0x19bf(){const _0x2e505f=['write','string','10sJSNwQ','5693248PbefcT','global','AccessKey\x20(ak_xxx...)','1004OhuxjT','\x20config','{\x20\x22accessKey\x22:\x20\x22ak_xxx\x22\x20}','Then\x20verify\x20with:\x20','userCenterDisplayName','check','authRequired','info','\x20auth\x20status','If\x20command\x20execution\x20still\x20fails,\x20run:\x20','global\x20config','access-key','Clear\x20accessKey\x20from\x20config','3583Zalnrq','accessKey','2949666rgTQoX','slice','Status:\x20valid','AccessKey:\x20','Write\x20to\x20project\x20config\x20instead\x20of\x20global\x20config','\x20config.','join','Exit\x20non-zero\x20when\x20no\x20AccessKey\x20is\x20configured','Clear\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','auth','length','5448075AnLZIp','\x20doctor','\x20scope.','AccessKey\x20required\x20for\x20login.\x20Create\x20one\x20in\x20','validation','read','envName','No\x20credentials\x20found.\x20Configure\x20one\x20of\x20the\x20options\x20below:','yes','\x20Verify:\x20','26716491FQYMEd','login','2944170LsBPFI','push','project','env','bool','access_key','stdout','success','scope','str','Save\x20accessKey\x20to\x20config\x20(global\x20by\x20default;\x20use\x20--project\x20for\x20project\x20config)','production','Use\x20`','AccessKey\x20saved\x20to\x20','\x20Current\x20env:\x20','Auth\x20config\x20reinitialized\x20in\x20','nonInteractive','boolean','Tip:\x20you\x20can\x20also\x20run:','Shorthand\x20for\x20--access-key','Missing\x20accessKey.','daily','ACCESS_KEY','\x20auth\x20login\x20--access-key\x20<ak_xxx>','\x20auth\x20login\x20--access-key\x20<ak_xxx>`\x20to\x20save\x20credentials.','Show\x20current\x20authentication\x20status','newConfigFileName','stdin','Expected:\x20ak_\x20followed\x20by\x2016+\x20alphanumeric\x20chars','Read\x20from\x20project\x20config\x20instead\x20of\x20global\x20config','128kfpHic','Device\x20authorization\x20pending.\x20Complete\x20authorization\x20in\x20browser,\x20then\x20try\x20again.','Auth\x20mode:\x20','development','Read\x20from\x20global\x20config\x20(default)','status','\x20(via\x20','Option\x20C:\x20environment\x20variable','repeat','isTTY','787493fAHxWw','test','Write\x20to\x20global\x20config\x20(default)','trim','init','ClientAk','Clear\x20all\x20config\x20in\x20scope\x20and\x20initialize\x20auth\x20from\x20scratch','Clear\x20from\x20global\x20config\x20(default)','expired','\x20auth\x20login\x20[--global]\x20[--access-key\x20ak_xxx]','project\x20config','\x20\x20export\x20','Option\x20B:\x20apps\x20config\x20(','global-default','=ak_xxx'];a12_0x19bf=function(){return _0x2e505f;};return a12_0x19bf();}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getLoginUserInfo}from'../../core/api-client.js';import{getUserDomain}from'../../constant/domain.js';import{authDeviceDefinition,readStoredDeviceCode,deleteStoredDeviceCode,fetchDeviceToken,isStoredDeviceCodeExpired}from'../../commands/auth/device.js';const ACCESS_KEY_PATTERN=/^ak_[A-Za-z0-9]{16,}$/;function showAccessKeyCreateHint(){const _0x4f400d=a12_0x351c;writeCliSideChannelLine(_0x4f400d(0x1d9)+PRODUCT_CONFIG[_0x4f400d(0x1c0)]+':'),writeCliSideChannelLine('\x0a'+USER_ACCESS_KEY_CREATE_URL+'\x0a'),writeCliSideChannelLine(_0x4f400d(0x1f4)),writeCliSideChannelLine('\x20\x20'+CLI_BIN_NAME+_0x4f400d(0x1f9));}function buildAccessKeySetupGuide(){const _0x1dc9f7=a12_0x351c;return[_0x1dc9f7(0x1d9)+PRODUCT_CONFIG[_0x1dc9f7(0x1c0)]+':',USER_ACCESS_KEY_CREATE_URL,'Give\x20the\x20AccessKey\x20to\x20your\x20AI\x20Agent,\x20then\x20run:\x20'+CLI_BIN_NAME+'\x20auth\x20login\x20--access-key\x20<ak_xxx>\x20[--global]'][_0x1dc9f7(0x1d1)]('\x0a');}function canPromptForAccessKey(_0x46eb54){const _0x50ff80=a12_0x351c;return!_0x46eb54[_0x50ff80(0x1f2)]&&process[_0x50ff80(0x1fd)][_0x50ff80(0x209)]!==![]&&process[_0x50ff80(0x1e8)]['isTTY']!==![];}function resolveAuthScopeFlags(_0x2cba53){const _0x3c153b=a12_0x351c;return toScopeFlags(resolveConfigScope({'explicitGlobal':_0x2cba53[_0x3c153b(0x1e6)]('global'),'explicitProject':_0x2cba53[_0x3c153b(0x1e6)](_0x3c153b(0x1e4)),'policy':_0x3c153b(0x1b4)}));}async function resolveAuthWriteInput(_0x541b2e){const _0x57cf1d=a12_0x351c;let _0x10b47b=(_0x541b2e[_0x57cf1d(0x1eb)]('access-key')||_0x541b2e[_0x57cf1d(0x1eb)]('ak')||'')[_0x57cf1d(0x20d)]();const _0x225ba2=(_0x541b2e[_0x57cf1d(0x1eb)](_0x57cf1d(0x1e5))||'')['trim']();if(!_0x10b47b&&canPromptForAccessKey(_0x541b2e))try{showAccessKeyCreateHint(),_0x10b47b=await promptAccessKey('');}catch(_0x494e02){if(isAbortPrompt(_0x494e02))throw CliErrors['cancelled']();throw _0x494e02;}if(!_0x10b47b)throw CliErrors['validation'](_0x57cf1d(0x1f6),buildAccessKeySetupGuide());if(!ACCESS_KEY_PATTERN[_0x57cf1d(0x20b)](_0x10b47b))throw CliErrors[_0x57cf1d(0x1da)]('Invalid\x20accessKey\x20format:\x20\x22'+_0x10b47b+'\x22',_0x57cf1d(0x1fe));if(!_0x225ba2)return{'accessKey':_0x10b47b};const _0x585999=normalizeEnv(_0x225ba2);return{'accessKey':_0x10b47b,'env':isDaily(_0x585999)?_0x57cf1d(0x1f7):isDev(_0x585999)?_0x57cf1d(0x203):_0x57cf1d(0x1ed)};}export const authDefinitions=[{'service':a12_0x3d9810(0x1d4),'command':a12_0x3d9810(0x1e1),'description':a12_0x3d9810(0x1ec),'risk':a12_0x3d9810(0x1b6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x3d9810(0x1c7),'type':a12_0x3d9810(0x1b7),'description':'AccessKey\x20(ak_xxx...)'},{'name':'ak','type':a12_0x3d9810(0x1b7),'description':'Shorthand\x20for\x20--access-key'},{'name':a12_0x3d9810(0x1ba),'type':'boolean','description':a12_0x3d9810(0x20c),'default':!![]},{'name':a12_0x3d9810(0x1e4),'type':a12_0x3d9810(0x1f3),'description':a12_0x3d9810(0x1cf),'default':![]}],async 'execute'(_0x5992df){const _0x22f2fa=a12_0x3d9810;if(_0x5992df[_0x22f2fa(0x1e6)](_0x22f2fa(0x1de)))throw CliErrors[_0x22f2fa(0x1da)]('`auth\x20login`\x20does\x20not\x20support\x20--yes.',_0x22f2fa(0x1ee)+CLI_BIN_NAME+'\x20auth\x20login\x20--non-interactive`\x20to\x20avoid\x20prompts,\x20or\x20`'+CLI_BIN_NAME+_0x22f2fa(0x1fa));const _0x50e47d=(_0x5992df[_0x22f2fa(0x1eb)](_0x22f2fa(0x1c7))||_0x5992df[_0x22f2fa(0x1eb)]('ak')||'')[_0x22f2fa(0x20d)]();if(!_0x50e47d&&_0x5992df[_0x22f2fa(0x1f2)])return{'ok':!![],'message':buildAccessKeySetupGuide()};const _0x1080f0=await resolveAuthWriteInput(_0x5992df),_0x28be5f=resolveAuthScopeFlags(_0x5992df),_0x387c32=readScopedConfig(_0x28be5f);_0x387c32[_0x22f2fa(0x1ca)]=_0x1080f0[_0x22f2fa(0x1ca)];_0x1080f0[_0x22f2fa(0x1e5)]&&(_0x387c32[_0x22f2fa(0x1e5)]=_0x1080f0['env']);writeScopedConfig(_0x387c32,_0x28be5f);const _0x256afc=_0x28be5f[_0x22f2fa(0x1ba)]?'global':_0x22f2fa(0x1e4),_0x3d78f9=_0x387c32[_0x22f2fa(0x1e5)]?_0x22f2fa(0x1f0)+_0x387c32['env']+'.':'';return{'ok':!![],'message':_0x22f2fa(0x1ef)+_0x256afc+_0x22f2fa(0x1d0)+_0x3d78f9+'\x20Verify:\x20'+CLI_BIN_NAME+_0x22f2fa(0x1c4)};}},{'service':'auth','command':a12_0x3d9810(0x20e),'description':a12_0x3d9810(0x210),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x3d9810(0x1c7),'type':'string','description':a12_0x3d9810(0x1bb)},{'name':'ak','type':a12_0x3d9810(0x1b7),'description':a12_0x3d9810(0x1f5)},{'name':'env','type':a12_0x3d9810(0x1b7),'description':'Target\x20environment\x20to\x20persist\x20with\x20the\x20new\x20auth\x20config'},{'name':a12_0x3d9810(0x1ba),'type':a12_0x3d9810(0x1f3),'description':'Write\x20to\x20global\x20config\x20(default)','default':!![]},{'name':a12_0x3d9810(0x1e4),'type':'boolean','description':a12_0x3d9810(0x1cf),'default':![]}],async 'execute'(_0x579547){const _0x24c506=a12_0x3d9810,_0x26cd55=await resolveAuthWriteInput(_0x579547),_0x43ba76=resolveAuthScopeFlags(_0x579547),_0x1cefed={'accessKey':_0x26cd55[_0x24c506(0x1ca)]};_0x26cd55[_0x24c506(0x1e5)]&&(_0x1cefed[_0x24c506(0x1e5)]=_0x26cd55[_0x24c506(0x1e5)]);writeScopedConfig(_0x1cefed,_0x43ba76);const _0x4d55b2=_0x43ba76['global']?_0x24c506(0x1ba):_0x24c506(0x1e4),_0x2ad757=_0x1cefed[_0x24c506(0x1e5)]?'\x20Current\x20env:\x20'+_0x1cefed[_0x24c506(0x1e5)]+'.':'';return{'ok':!![],'message':_0x24c506(0x1f1)+_0x4d55b2+_0x24c506(0x1d8)+_0x2ad757+_0x24c506(0x1df)+CLI_BIN_NAME+_0x24c506(0x1c4)};}},{'service':a12_0x3d9810(0x1d4),'command':'logout','description':a12_0x3d9810(0x1c8),'risk':a12_0x3d9810(0x1b6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a12_0x3d9810(0x1ba),'type':a12_0x3d9810(0x1f3),'description':a12_0x3d9810(0x211),'default':!![]},{'name':a12_0x3d9810(0x1e4),'type':a12_0x3d9810(0x1f3),'description':a12_0x3d9810(0x1d3),'default':![]}],async 'execute'(_0xfef304){const _0x469d81=a12_0x3d9810,_0x20e6e4=resolveAuthScopeFlags(_0xfef304),_0x2b4ed7=readScopedConfig(_0x20e6e4),_0x169c59=!!_0x2b4ed7['accessKey'];delete _0x2b4ed7['accessKey'],writeScopedConfig(_0x2b4ed7,_0x20e6e4);const _0xc1df85=_0x20e6e4[_0x469d81(0x1ba)]?'global':'project';if(_0x169c59)return{'ok':!![],'message':'AccessKey\x20cleared\x20from\x20'+_0xc1df85+_0x469d81(0x1d0)};return{'ok':!![],'message':'No\x20AccessKey\x20found\x20in\x20'+_0xc1df85+'\x20config.\x20Nothing\x20to\x20clear.'};}},{'service':a12_0x3d9810(0x1d4),'command':a12_0x3d9810(0x205),'description':a12_0x3d9810(0x1fb),'risk':a12_0x3d9810(0x1db),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'global','type':a12_0x3d9810(0x1f3),'description':a12_0x3d9810(0x204),'default':!![]},{'name':'project','type':'boolean','description':a12_0x3d9810(0x1ff),'default':![]},{'name':a12_0x3d9810(0x1c1),'type':'boolean','description':a12_0x3d9810(0x1d2),'default':![]}],async 'execute'(_0x4f3f7b){const _0x5aba9b=a12_0x3d9810,_0x42bc04=resolveAuthScopeFlags(_0x4f3f7b),_0x2228a7=readScopedConfig(_0x42bc04),_0x54d37c=productEnvName('ACCESS_KEY'),_0x17d816=productEnv(_0x5aba9b(0x1f8))||undefined,_0x2a719f=_0x2228a7[_0x5aba9b(0x1ca)]||undefined,_0x19ccc8=_0x17d816||_0x2a719f,_0x43a394=_0x17d816?_0x54d37c+'\x20env\x20var':_0x2a719f?(_0x42bc04[_0x5aba9b(0x1ba)]?_0x5aba9b(0x1ba):'project')+_0x5aba9b(0x1bd):null,_0x2dafa5=[_0x5aba9b(0x202)+AUTH_MODE[_0x5aba9b(0x20f)]];if(_0x19ccc8){const _0x35fab6=_0x19ccc8[_0x5aba9b(0x1d5)]>0x8?''+_0x19ccc8[_0x5aba9b(0x1cc)](0x0,0x8)+'*'[_0x5aba9b(0x208)](_0x19ccc8[_0x5aba9b(0x1d5)]-0x8):_0x19ccc8;_0x2dafa5[_0x5aba9b(0x1e3)](_0x5aba9b(0x1ce)+_0x35fab6+(_0x43a394?'\x20(via\x20'+_0x43a394+')':'')),_0x2dafa5['push'](_0x5aba9b(0x1cd));}if(!_0x19ccc8){_0x2dafa5[_0x5aba9b(0x1e3)](''),_0x2dafa5[_0x5aba9b(0x1e3)](_0x5aba9b(0x1dd)),_0x2dafa5[_0x5aba9b(0x1e3)](''),_0x2dafa5[_0x5aba9b(0x1e3)]('Option\x20A:\x20'+CLI_BIN_NAME+_0x5aba9b(0x213)),_0x2dafa5[_0x5aba9b(0x1e3)](''),_0x2dafa5['push'](_0x5aba9b(0x1b3)+PRODUCT_CONFIG[_0x5aba9b(0x1fc)]+')'),_0x2dafa5[_0x5aba9b(0x1e3)](_0x5aba9b(0x1be)),_0x2dafa5['push'](''),_0x2dafa5['push'](_0x5aba9b(0x207)),_0x2dafa5[_0x5aba9b(0x1e3)](_0x5aba9b(0x1b2)+_0x54d37c+_0x5aba9b(0x1b5)),_0x2dafa5['push'](''),_0x2dafa5[_0x5aba9b(0x1e3)](_0x5aba9b(0x1bf)+CLI_BIN_NAME+_0x5aba9b(0x1c4)),_0x2dafa5[_0x5aba9b(0x1e3)](_0x5aba9b(0x1c5)+CLI_BIN_NAME+_0x5aba9b(0x1d7));if(_0x4f3f7b[_0x5aba9b(0x1e6)](_0x5aba9b(0x1c1))){const _0x166bd3=readStoredDeviceCode();if(_0x166bd3&&!isStoredDeviceCodeExpired(_0x166bd3)){const _0x1918f3=getUserDomain(),_0x38f68a=await fetchDeviceToken(_0x1918f3,_0x166bd3['code']);if(_0x38f68a[_0x5aba9b(0x205)]===_0x5aba9b(0x1e9)&&_0x38f68a[_0x5aba9b(0x1e7)]){const _0xcfd432={'global':_0x166bd3[_0x5aba9b(0x1ea)]===_0x5aba9b(0x1ba)},_0x5aae67=readScopedConfig(_0xcfd432);_0x5aae67[_0x5aba9b(0x1ca)]=_0x38f68a['access_key'],writeScopedConfig(_0x5aae67,_0xcfd432),deleteStoredDeviceCode();const _0x1bb84f=_0x38f68a['access_key'],_0x2f7976=_0x1bb84f[_0x5aba9b(0x1d5)]>0x8?''+_0x1bb84f[_0x5aba9b(0x1cc)](0x0,0x8)+'*'[_0x5aba9b(0x208)](_0x1bb84f[_0x5aba9b(0x1d5)]-0x8):_0x1bb84f,_0x53eb0c=_0x166bd3[_0x5aba9b(0x1ea)]==='global'?_0x5aba9b(0x1c6):_0x5aba9b(0x1b1);return{'ok':!![],'message':['Auth\x20mode:\x20'+AUTH_MODE[_0x5aba9b(0x20f)],'AccessKey:\x20'+_0x2f7976+_0x5aba9b(0x206)+_0x53eb0c+')','Status:\x20valid']['join']('\x0a')};}_0x38f68a['status']===_0x5aba9b(0x212)&&deleteStoredDeviceCode();throw CliErrors[_0x5aba9b(0x1c2)](_0x5aba9b(0x201));}throw CliErrors[_0x5aba9b(0x1c2)](_0x2dafa5[_0x5aba9b(0x1d1)]('\x0a'));}}return{'ok':!![],'message':_0x2dafa5[_0x5aba9b(0x1d1)]('\x0a')};}},{'service':a12_0x3d9810(0x1d4),'command':a12_0x3d9810(0x1c3),'description':'Fetch\x20current\x20login\x20user\x20info\x20for\x20the\x20active\x20access\x20key','risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x1822d1){const _0x4ffa3f=a12_0x3d9810,_0x1487fb=await getLoginUserInfo();return{'ok':!![],'data':{'user':_0x1487fb,'meta':{'env':_0x1822d1[_0x4ffa3f(0x1dc)]??'production'}}};}},authDeviceDefinition];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x23b7a7,_0x3beaab){const _0x44840=a13_0x53ff,_0x537ee1=_0x23b7a7();while(!![]){try{const _0x54279d=parseInt(_0x44840(0xfc))/0x1*(-parseInt(_0x44840(0x10e))/0x2)+-parseInt(_0x44840(0xff))/0x3*(parseInt(_0x44840(0x103))/0x4)+-parseInt(_0x44840(0x102))/0x5+parseInt(_0x44840(0xfb))/0x6*(-parseInt(_0x44840(0x111))/0x7)+parseInt(_0x44840(0x109))/0x8*(-parseInt(_0x44840(0xfd))/0x9)+-parseInt(_0x44840(0x106))/0xa*(parseInt(_0x44840(0x107))/0xb)+parseInt(_0x44840(0x10b))/0xc;if(_0x54279d===_0x3beaab)break;else _0x537ee1['push'](_0x537ee1['shift']());}catch(_0x25b263){_0x537ee1['push'](_0x537ee1['shift']());}}}(a13_0x4592,0xd712c));import{createInterface}from'node:readline';class AbortPrompt extends Error{constructor(){const _0x52bf11=a13_0x53ff;super(_0x52bf11(0x110)),this[_0x52bf11(0x10c)]=_0x52bf11(0x10f);}}function a13_0x4592(){const _0x3a09da=['36MMFMDZ','once','219WsCBgh','trim','removeListener','1416525AgYIpO','63708wPRbQy','AccessKey\x20(','stdout','1526450hgSwWb','77fsLSVE','AccessKey\x20(paste\x20ak_...):\x20','882584OodWlD','SIGINT','66499968dsyMBb','name','):\x20','74344jmRhYb','AbortPrompt','User\x20aborted\x20prompt','9852955tZRpvW','stdin','close','6VltCEp','8eDJqVl'];a13_0x4592=function(){return _0x3a09da;};return a13_0x4592();}function createSafeRl(){const _0x8dc447=a13_0x53ff,_0x81222=createInterface({'input':process[_0x8dc447(0xf9)],'output':process[_0x8dc447(0x105)]});let _0x26bb1a;const _0x2e67ad=new Promise((_0x590aa3,_0x2356a3)=>{const _0xbf6d99=_0x8dc447;_0x26bb1a=()=>{const _0x235127=a13_0x53ff;_0x26bb1a&&(_0x81222[_0x235127(0x101)]('SIGINT',_0x26bb1a),_0x26bb1a=undefined);try{_0x81222[_0x235127(0xfa)]();}catch{}_0x2356a3(new AbortPrompt());},_0x81222[_0xbf6d99(0xfe)]('SIGINT',_0x26bb1a);}),_0x343fc7=()=>{const _0x39c31c=_0x8dc447;_0x26bb1a&&(_0x81222[_0x39c31c(0x101)](_0x39c31c(0x10a),_0x26bb1a),_0x26bb1a=undefined);try{_0x81222[_0x39c31c(0xfa)]();}catch{}};return{'rl':_0x81222,'abortPromise':_0x2e67ad,'disposeSuccess':_0x343fc7};}function a13_0x53ff(_0x345bb9,_0x2feb55){_0x345bb9=_0x345bb9-0xf9;const _0x4592c0=a13_0x4592();let _0x53ff7d=_0x4592c0[_0x345bb9];return _0x53ff7d;}export async function promptAccessKey(_0x49dd0c=''){const {rl:_0x204b29,abortPromise:_0x40bca4,disposeSuccess:_0x43a911}=createSafeRl(),_0x5a567d=new Promise(_0x56dde6=>{const _0x513fcc=a13_0x53ff,_0x8d6b52=_0x49dd0c?_0x513fcc(0x104)+_0x49dd0c+_0x513fcc(0x10d):_0x513fcc(0x108);_0x204b29['question'](_0x8d6b52,_0x10c027=>{const _0x297e83=_0x513fcc;_0x43a911(),_0x56dde6(_0x10c027[_0x297e83(0x100)]()||_0x49dd0c);});});return Promise['race']([_0x5a567d,_0x40bca4]);}export function isAbortPrompt(_0x4c9ac5){const _0x2e5ac6=a13_0x53ff;return _0x4c9ac5 instanceof Error&&_0x4c9ac5[_0x2e5ac6(0x10c)]===_0x2e5ac6(0x10f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a14_0xd8a1(){const _0x28c824=['1285025DdpBCT','1226176CgbjGU','3077824aBWQAM','835332qhqzWe','str','appCode','54730Lopmbk','name','609tFGhqb','(none)','detail','6TQbdog','gmtModified','bff','description','1636032IgUaWn','BFF\x20function\x20name'];a14_0xd8a1=function(){return _0x28c824;};return a14_0xd8a1();}const a14_0x1f9d2a=a14_0x374b;(function(_0x2b28d7,_0x4c86d0){const _0x56f33f=a14_0x374b,_0x3d7b32=_0x2b28d7();while(!![]){try{const _0x2b0135=-parseInt(_0x56f33f(0x1a7))/0x1+parseInt(_0x56f33f(0x1a5))/0x2+parseInt(_0x56f33f(0x1aa))/0x3*(parseInt(_0x56f33f(0x1a2))/0x4)+-parseInt(_0x56f33f(0x1b0))/0x5+parseInt(_0x56f33f(0x1ae))/0x6+parseInt(_0x56f33f(0x1b1))/0x7+-parseInt(_0x56f33f(0x1b2))/0x8;if(_0x2b0135===_0x4c86d0)break;else _0x3d7b32['push'](_0x3d7b32['shift']());}catch(_0x2d56eb){_0x3d7b32['push'](_0x3d7b32['shift']());}}}(a14_0xd8a1,0x3d2a1));import{getBffEndpointContract}from'../../core/api-client.js';function a14_0x374b(_0x390426,_0x24facc){_0x390426=_0x390426-0x1a2;const _0xd8a1b2=a14_0xd8a1();let _0x374b87=_0xd8a1b2[_0x390426];return _0x374b87;}import{NAME_FLAG}from'../../commands/common/flags.js';export const bffDetail={'service':a14_0x1f9d2a(0x1ac),'command':a14_0x1f9d2a(0x1a9),'description':'Get\x20a\x20BFF\x20endpoint\x20contract\x20by\x20function\x20name','risk':'read','flags':[{...NAME_FLAG,'required':!![],'description':a14_0x1f9d2a(0x1af)}],async 'execute'(_0x15a163){const _0x383d24=a14_0x1f9d2a,_0x1ebc37=await getBffEndpointContract(_0x15a163[_0x383d24(0x1a4)],_0x15a163[_0x383d24(0x1a3)](_0x383d24(0x1a6)));return{'ok':!![],'data':{'appCode':_0x1ebc37[_0x383d24(0x1a4)],'functionName':_0x1ebc37['functionName'],'description':_0x1ebc37[_0x383d24(0x1ad)]||_0x383d24(0x1a8),'version':_0x1ebc37['version'],'gmtModified':_0x1ebc37[_0x383d24(0x1ab)]}};}};
|
package/lib/commands/bff/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x594bfd=a15_0xac73;(function(_0x2b82ea,_0x2b4db4){const _0x606473=a15_0xac73,_0x4bbe67=_0x2b82ea();while(!![]){try{const _0x402b00=parseInt(_0x606473(0x137))/0x1*(parseInt(_0x606473(0x134))/0x2)+-parseInt(_0x606473(0x132))/0x3+parseInt(_0x606473(0x13e))/0x4*(-parseInt(_0x606473(0x13f))/0x5)+-parseInt(_0x606473(0x136))/0x6+parseInt(_0x606473(0x13b))/0x7*(parseInt(_0x606473(0x12f))/0x8)+parseInt(_0x606473(0x138))/0x9+-parseInt(_0x606473(0x12e))/0xa;if(_0x402b00===_0x2b4db4)break;else _0x4bbe67['push'](_0x4bbe67['shift']());}catch(_0x4a2471){_0x4bbe67['push'](_0x4bbe67['shift']());}}}(a15_0x3c31,0x301c7));import{executeSdkBff}from'../../core/sdk-client.js';function a15_0x3c31(){const _0x5da3b2=['5bkxcYL','271430zbXghK','933464SVEhmN','read','name','165294sYPsIj','now','50BsTvMD','str','876138HPnNNC','13139PObExf','2001789OEZTkx','exec','BFF\x20function\x20name\x20to\x20execute','7ZWeslX','params','BFF\x20executed\x20in\x20','969008tfocnD'];a15_0x3c31=function(){return _0x5da3b2;};return a15_0x3c31();}import{parseJsonParams}from'../../utils/params.js';function a15_0xac73(_0x32a6a4,_0x44c2a4){_0x32a6a4=_0x32a6a4-0x12e;const _0x3c3128=a15_0x3c31();let _0xac73d9=_0x3c3128[_0x32a6a4];return _0xac73d9;}import{NAME_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';export const bffExec={'service':'bff','command':a15_0x594bfd(0x139),'description':'Execute\x20a\x20BFF\x20script\x20by\x20function\x20name','risk':a15_0x594bfd(0x130),'flags':[{...NAME_FLAG,'required':!![],'description':a15_0x594bfd(0x13a)},PARAMS_FLAG],async 'execute'(_0x4528c2){const _0x3c2483=a15_0x594bfd,_0x3f83d1=parseJsonParams(_0x4528c2[_0x3c2483(0x135)](_0x3c2483(0x13c))),_0x2e8945=Date[_0x3c2483(0x133)](),_0xc1c824=await executeSdkBff(_0x4528c2[_0x3c2483(0x135)](_0x3c2483(0x131)),_0x3f83d1),_0x5a1807=Date['now']()-_0x2e8945;return{'ok':!![],'data':{'result':_0xc1c824,'elapsed':_0x5a1807},'message':_0x3c2483(0x13d)+_0x5a1807+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a16_0x2398(_0x2daddb,_0x2085a8){_0x2daddb=_0x2daddb-0x185;const _0x2636a1=a16_0x2636();let _0x2398b9=_0x2636a1[_0x2daddb];return _0x2398b9;}(function(_0x49c7a1,_0x386354){const _0x442914=a16_0x2398,_0x400df3=_0x49c7a1();while(!![]){try{const _0x2d727d=parseInt(_0x442914(0x18c))/0x1+-parseInt(_0x442914(0x18b))/0x2*(parseInt(_0x442914(0x18d))/0x3)+-parseInt(_0x442914(0x18a))/0x4*(-parseInt(_0x442914(0x18e))/0x5)+parseInt(_0x442914(0x190))/0x6*(-parseInt(_0x442914(0x188))/0x7)+parseInt(_0x442914(0x18f))/0x8*(-parseInt(_0x442914(0x185))/0x9)+parseInt(_0x442914(0x186))/0xa*(-parseInt(_0x442914(0x189))/0xb)+parseInt(_0x442914(0x187))/0xc;if(_0x2d727d===_0x386354)break;else _0x400df3['push'](_0x400df3['shift']());}catch(_0x19ea72){_0x400df3['push'](_0x400df3['shift']());}}}(a16_0x2636,0xaf7c1));import{bffDetail}from'../../commands/bff/detail.js';import{bffExec}from'../../commands/bff/exec.js';function a16_0x2636(){const _0x15088d=['1239711yYfPbL','4QtFwDq','34QbXEtK','1198806jiJVAS','12045FWrguu','1725885YiUOHB','1720vBpBrY','1565826XlTRMa','9099rpfkOq','70LQwlds','15518556KYRYtH','28GadRff'];a16_0x2636=function(){return _0x15088d;};return a16_0x2636();}export const bffDefinitions=[bffDetail,bffExec];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x4c946a=a17_0x27da;function a17_0x27da(_0x484439,_0x38f353){_0x484439=_0x484439-0xce;const _0xc92c1c=a17_0xc92c();let _0x27dabc=_0xc92c1c[_0x484439];return _0x27dabc;}(function(_0x35c2e2,_0x7819af){const _0x42853c=a17_0x27da,_0x3103ba=_0x35c2e2();while(!![]){try{const _0x4cc0ef=-parseInt(_0x42853c(0xe6))/0x1*(parseInt(_0x42853c(0xe2))/0x2)+parseInt(_0x42853c(0xe1))/0x3*(-parseInt(_0x42853c(0xe5))/0x4)+parseInt(_0x42853c(0xd0))/0x5*(parseInt(_0x42853c(0xde))/0x6)+parseInt(_0x42853c(0xd5))/0x7+-parseInt(_0x42853c(0xce))/0x8*(-parseInt(_0x42853c(0xd1))/0x9)+-parseInt(_0x42853c(0xd4))/0xa+parseInt(_0x42853c(0xe7))/0xb;if(_0x4cc0ef===_0x7819af)break;else _0x3103ba['push'](_0x3103ba['shift']());}catch(_0x570a77){_0x3103ba['push'](_0x3103ba['shift']());}}}(a17_0xc92c,0x9bbd5));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':'install','description':a17_0x4c946a(0xd8),'risk':a17_0x4c946a(0xe9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x377f00){const _0x2d03fe=a17_0x4c946a;logger[_0x2d03fe(0xdd)](process[_0x2d03fe(0xdf)]()),logger[_0x2d03fe(0xd7)](_0x2d03fe(0xd6),_0x2d03fe(0xec));const {LOVRABET_SKILL_SOURCE:_0x20f76f,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x3e163f,runNpxSkillsAddGlobal:_0x11827f}=await import(_0x2d03fe(0xee)),_0x1059f9=_0x377f00[_0x2d03fe(0xe0)]?_0x2d03fe(0xcf):_0x2d03fe(0xe4);console[_0x2d03fe(0xe3)](_0x2d03fe(0xea)+_0x20f76f+_0x2d03fe(0xda));const _0x322e0d=_0x11827f(process[_0x2d03fe(0xdf)](),_0x20f76f,{'stdio':_0x1059f9});if(_0x322e0d[_0x2d03fe(0xe8)])console[_0x2d03fe(0xe3)](_0x2d03fe(0xdb)+_0x3e163f+_0x2d03fe(0xd3));else{if(_0x322e0d['ok'])console[_0x2d03fe(0xe3)](_0x2d03fe(0xd2));else throw CliErrors[_0x2d03fe(0xeb)](_0x2d03fe(0xdc)+(_0x322e0d['error']||_0x2d03fe(0xd9)),_0x2d03fe(0xed)+_0x20f76f+'\x20-g\x20-y');}return{'ok':!![]};}}];function a17_0xc92c(){const _0x32fbc0=['6IdGilz','cwd','nonInteractive','803877DYaxrS','2EhheNC','log','inherit','4IkLBgE','216267BGTvJI','10568591CjnGAh','skipped','write','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(npx\x20skills\x20add\x20','apiError','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20npx\x20skills\x20add\x20','../../skills/npx-skills-add.js','80728RQwVxS','pipe','2954335lpyhjG','27PDrGMn','CLI\x20Built-in\x20Skill\x20installed','=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','9047160fgHtoL','3114510fmorYJ','cli-skill-install','info','Install\x20the\x20CLI\x20Built-in\x20Skill\x20required\x20by\x20Lovrabet\x20runtime','unknown','\x20-g\x20-y)...','Skipped\x20npx\x20(','npx\x20skills\x20add\x20failed:\x20','setLogPath'];a17_0xc92c=function(){return _0x32fbc0;};return a17_0xc92c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a18_0x4dfe(){const _0x45aae1=['project-default','\x20init`\x20first.','project','3742pZOqYN','Not\x20inside\x20a\x20project\x20(no\x20','7884642UYYdeR','global','inProject','3836203FaXRMl','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','6630050ruAWCE','453QZxCpZ','1349704lbcUHs','3276176UMmlSA','2204073BNdYLR','newConfigFileName','validation','3dLjXkP','global-default','\x20(global)','Use\x20only\x20one\x20config\x20scope\x20flag.','project-or-global-explicit',',\x20or\x20run\x20`'];a18_0x4dfe=function(){return _0x45aae1;};return a18_0x4dfe();}function a18_0x1885(_0x243801,_0x4bdaa4){_0x243801=_0x243801-0x11b;const _0x4dfe9e=a18_0x4dfe();let _0x188541=_0x4dfe9e[_0x243801];return _0x188541;}(function(_0x3028cf,_0x5097c4){const _0xcc5b9d=a18_0x1885,_0x10440f=_0x3028cf();while(!![]){try{const _0x116c3d=parseInt(_0xcc5b9d(0x125))/0x1*(parseInt(_0xcc5b9d(0x11d))/0x2)+-parseInt(_0xcc5b9d(0x12b))/0x3*(-parseInt(_0xcc5b9d(0x127))/0x4)+-parseInt(_0xcc5b9d(0x124))/0x5+parseInt(_0xcc5b9d(0x11f))/0x6+-parseInt(_0xcc5b9d(0x122))/0x7+-parseInt(_0xcc5b9d(0x126))/0x8+-parseInt(_0xcc5b9d(0x128))/0x9;if(_0x116c3d===_0x5097c4)break;else _0x10440f['push'](_0x10440f['shift']());}catch(_0x10708){_0x10440f['push'](_0x10440f['shift']());}}}(a18_0x4dfe,0xa9349));import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isTopLevelConfigKey}from'../../config/schema.js';export function resolveConfigScope(_0x2bbc4f){const _0x2fbf20=a18_0x1885,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x3a28f9}=_0x2bbc4f;if(explicitGlobal&&explicitProject)throw CliErrors[_0x2fbf20(0x12a)](_0x2fbf20(0x123),_0x2fbf20(0x12e));if(explicitGlobal)return'global';if(explicitProject)return _0x2fbf20(0x11c);switch(_0x3a28f9){case _0x2fbf20(0x12c):return _0x2fbf20(0x120);case _0x2fbf20(0x131):return _0x2bbc4f[_0x2fbf20(0x121)]??isInProject()?_0x2fbf20(0x11c):_0x2fbf20(0x120);case _0x2fbf20(0x12f):if(!(_0x2bbc4f[_0x2fbf20(0x121)]??isInProject()))throw CliErrors['validation'](_0x2fbf20(0x11e)+PRODUCT_CONFIG[_0x2fbf20(0x129)]+'\x20found).','Add\x20--global\x20to\x20write\x20to\x20~/'+PRODUCT_CONFIG[_0x2fbf20(0x129)]+_0x2fbf20(0x130)+CLI_BIN_NAME+_0x2fbf20(0x11b));return _0x2fbf20(0x11c);}}export function toScopeFlags(_0x42d7eb){const _0x12f621=a18_0x1885;return{'global':_0x42d7eb===_0x12f621(0x120)};}export function formatScopeLabel(_0x96c60d){const _0x19bc70=a18_0x1885;return _0x96c60d==='global'?_0x19bc70(0x12d):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1cf845,_0x4efe96){const _0x4d194a=a19_0x4c24,_0x372497=_0x1cf845();while(!![]){try{const _0x115b4d=-parseInt(_0x4d194a(0xe9))/0x1*(parseInt(_0x4d194a(0xef))/0x2)+-parseInt(_0x4d194a(0xe4))/0x3+-parseInt(_0x4d194a(0xe2))/0x4*(parseInt(_0x4d194a(0xf1))/0x5)+parseInt(_0x4d194a(0xe7))/0x6+parseInt(_0x4d194a(0xe5))/0x7*(-parseInt(_0x4d194a(0xf6))/0x8)+-parseInt(_0x4d194a(0xf3))/0x9+parseInt(_0x4d194a(0xe1))/0xa;if(_0x115b4d===_0x4efe96)break;else _0x372497['push'](_0x372497['shift']());}catch(_0x5d9393){_0x372497['push'](_0x372497['shift']());}}}(a19_0x2a96,0xca0f1));function a19_0x4c24(_0x22eb15,_0x5b4568){_0x22eb15=_0x22eb15-0xdc;const _0x2a96af=a19_0x2a96();let _0x4c24fc=_0x2a96af[_0x22eb15];return _0x4c24fc;}import{CliErrors}from'../../errors.js';function a19_0x2a96(){const _0x3cb1aa=['Provide\x20one\x20of:\x20','\x20are\x20mutually\x20exclusive\x20for\x20`','str','Exactly\x20one\x20of\x20',':\x20expected\x20','318fqkrzv','Only\x20one\x20of\x20','600JvmfKY','join','7361343CcoofD','\x20is\x20required\x20for\x20`','Use\x20only\x20one\x20of:\x20','58592TqLoLy','Remove\x20all\x20but\x20one.','Flags\x20',',\x20got\x20\x22','length','\x20is\x20allowed,\x20found:\x20','some','41414080mwDqhb','33360oJIGRu','map','2968002NFjBlX','721PGkHVS','filter','9858528lQfsQb','validation','8770QttwDz'];a19_0x2a96=function(){return _0x3cb1aa;};return a19_0x2a96();}function isSet(_0x1766ad,_0x2ba6d6){const _0x180524=_0x1766ad['flag'](_0x2ba6d6);return _0x180524!==undefined&&_0x180524!==''&&_0x180524!==![]&&_0x180524!==0x0;}function fmtNames(_0x12c24d){const _0xd64180=a19_0x4c24;return _0x12c24d[_0xd64180(0xe3)](_0x338d38=>'--'+_0x338d38)[_0xd64180(0xf2)](',\x20');}export function requireOneOf(_0x1aa023,_0x414c75,_0x6df36b){const _0x1b6526=a19_0x4c24,_0x130757=_0x414c75[_0x1b6526(0xe6)](_0x302a66=>isSet(_0x1aa023,_0x302a66));if(_0x130757[_0x1b6526(0xde)]!==0x1)throw CliErrors[_0x1b6526(0xe8)](_0x130757[_0x1b6526(0xde)]===0x0?_0x1b6526(0xed)+fmtNames(_0x414c75)+_0x1b6526(0xf4)+_0x6df36b+'`.':_0x1b6526(0xf0)+fmtNames(_0x414c75)+_0x1b6526(0xdf)+fmtNames(_0x130757)+'.',_0x130757[_0x1b6526(0xde)]===0x0?_0x1b6526(0xea)+fmtNames(_0x414c75):_0x1b6526(0xf7));}export function requireAnyOf(_0x5a401b,_0x1e7e57,_0x4d4e4b){const _0x59d333=a19_0x4c24;if(!_0x1e7e57[_0x59d333(0xe0)](_0x1b61c2=>isSet(_0x5a401b,_0x1b61c2)))throw CliErrors[_0x59d333(0xe8)]('At\x20least\x20one\x20of\x20'+fmtNames(_0x1e7e57)+_0x59d333(0xf4)+_0x4d4e4b+'`.',_0x59d333(0xea)+fmtNames(_0x1e7e57));}export function mutuallyExclusive(_0x2cf6f9,_0x2fdd3c,_0x5693d3){const _0x4a0d96=a19_0x4c24,_0x1e590d=_0x2fdd3c[_0x4a0d96(0xe6)](_0x55bc47=>isSet(_0x2cf6f9,_0x55bc47));if(_0x1e590d[_0x4a0d96(0xde)]>0x1)throw CliErrors['validation'](_0x4a0d96(0xdc)+fmtNames(_0x1e590d)+_0x4a0d96(0xeb)+_0x5693d3+'`.',_0x4a0d96(0xf5)+fmtNames(_0x2fdd3c));}export function validatePattern(_0x5ab395,_0x2131d8,_0x24c856,_0x44e4db){const _0x1853a8=a19_0x4c24,_0x3f7317=_0x5ab395[_0x1853a8(0xec)](_0x2131d8);if(_0x3f7317&&!_0x24c856['test'](_0x3f7317))throw CliErrors[_0x1853a8(0xe8)]('Invalid\x20--'+_0x2131d8+_0x1853a8(0xee)+_0x44e4db+_0x1853a8(0xdd)+_0x3f7317+'\x22.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a20_0x78a100=a20_0x3e45;(function(_0x599e82,_0x10d12e){const _0x29e257=a20_0x3e45,_0x25c111=_0x599e82();while(!![]){try{const _0x4d5e2a=-parseInt(_0x29e257(0x12d))/0x1+-parseInt(_0x29e257(0x128))/0x2*(parseInt(_0x29e257(0x122))/0x3)+-parseInt(_0x29e257(0x127))/0x4+-parseInt(_0x29e257(0x130))/0x5*(parseInt(_0x29e257(0x124))/0x6)+-parseInt(_0x29e257(0x131))/0x7+parseInt(_0x29e257(0x12a))/0x8+parseInt(_0x29e257(0x11f))/0x9;if(_0x4d5e2a===_0x10d12e)break;else _0x25c111['push'](_0x25c111['shift']());}catch(_0x5d47a9){_0x25c111['push'](_0x25c111['shift']());}}}(a20_0x62fe,0x400e4));function a20_0x62fe(){const _0x5e294d=['241778XilMjJ','number','2328320XgLmeJ','Return\x20full\x20raw\x20response\x20object','code','399067inbuxw','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','name','89545dAbRMT','1688813NlUClA','Dataset\x20code\x20(32-char\x20hex\x20UUID)','13109760Uuqheb','Resource\x20ID','boolean','3toNQjx','string','174RsbIVt','verbose','sqlcode','818928emOqQZ'];a20_0x62fe=function(){return _0x5e294d;};return a20_0x62fe();}export const CODE_FLAG={'name':a20_0x78a100(0x12c),'type':a20_0x78a100(0x123),'required':!![],'description':a20_0x78a100(0x11e),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a20_0x78a100(0x12e)}};export const SQLCODE_FLAG={'name':a20_0x78a100(0x126),'type':a20_0x78a100(0x123),'required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const VERBOSE_FLAG={'name':a20_0x78a100(0x125),'type':a20_0x78a100(0x121),'description':a20_0x78a100(0x12b)};export const PARAMS_FLAG={'name':'params','type':a20_0x78a100(0x123),'description':'Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'};export const NAME_FLAG={'name':a20_0x78a100(0x12f),'type':'string','description':'Resource\x20name\x20for\x20lookup'};function a20_0x3e45(_0x466132,_0x436d4c){_0x466132=_0x466132-0x11e;const _0x62fee=a20_0x62fe();let _0x3e4556=_0x62fee[_0x466132];return _0x3e4556;}export const ID_FLAG={'name':'id','type':a20_0x78a100(0x129),'required':!![],'description':a20_0x78a100(0x120)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1750e4,_0x2baca2){const _0x4b9ebe=a21_0x5c9d,_0x43944a=_0x1750e4();while(!![]){try{const _0x4cb9bb=parseInt(_0x4b9ebe(0xf4))/0x1+parseInt(_0x4b9ebe(0xe8))/0x2+-parseInt(_0x4b9ebe(0xf2))/0x3+parseInt(_0x4b9ebe(0xf9))/0x4+parseInt(_0x4b9ebe(0xf0))/0x5*(parseInt(_0x4b9ebe(0xf5))/0x6)+parseInt(_0x4b9ebe(0xf8))/0x7*(-parseInt(_0x4b9ebe(0xeb))/0x8)+parseInt(_0x4b9ebe(0xf7))/0x9*(-parseInt(_0x4b9ebe(0xea))/0xa);if(_0x4cb9bb===_0x2baca2)break;else _0x43944a['push'](_0x43944a['shift']());}catch(_0x4951b7){_0x43944a['push'](_0x43944a['shift']());}}}(a21_0x3842,0x751e3));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a21_0x3842(){const _0x471093=['ceil','3177abFAUl','42vMacOL','3585580QpfJkE','size','245738nLcMPe','toFixed','33190XyOipy','198416ZkOhie','\x20path\x20is\x20required.','File\x20is\x20not\x20a\x20regular\x20file:\x20','trim','\x20MB','2903495BZojKK','validation','2101932GCYMto','File\x20not\x20found:\x20','900815RWWkin','6WPkxQK'];a21_0x3842=function(){return _0x471093;};return a21_0x3842();}export const RUNTIME_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x46a603){const _0x40e380=a21_0x5c9d;if(_0x46a603>=BYTES_PER_MB){const _0x5cd50a=Math[_0x40e380(0xf6)](_0x46a603/BYTES_PER_MB*0x64)/0x64;return _0x5cd50a[_0x40e380(0xe9)](0x2)+_0x40e380(0xef);}return _0x46a603+'\x20B';}function a21_0x5c9d(_0x282eb2,_0x152fb2){_0x282eb2=_0x282eb2-0xe8;const _0x38428f=a21_0x3842();let _0x5c9d01=_0x38428f[_0x282eb2];return _0x5c9d01;}export function requireRuntimeUploadFile(_0x2b3621,_0x19ad75){const _0x55ba8c=a21_0x5c9d,_0x2e3080=_0x2b3621[_0x55ba8c(0xee)]();if(!_0x2e3080)throw CliErrors[_0x55ba8c(0xf1)](_0x19ad75+_0x55ba8c(0xec));if(!existsSync(_0x2e3080))throw CliErrors[_0x55ba8c(0xf1)](_0x55ba8c(0xf3)+_0x2e3080);const _0x80f49a=statSync(_0x2e3080);if(!_0x80f49a['isFile']())throw CliErrors['validation'](_0x55ba8c(0xed)+_0x2e3080);if(_0x80f49a[_0x55ba8c(0xfa)]>RUNTIME_UPLOAD_MAX_BYTES)throw CliErrors[_0x55ba8c(0xf1)]('File\x20exceeds\x20the\x20runtime\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x2e3080+'\x20('+formatBytes(_0x80f49a[_0x55ba8c(0xfa)])+')');return{'path':_0x2e3080,'size':_0x80f49a[_0x55ba8c(0xfa)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a22_0x45773f=a22_0x845a;(function(_0x105040,_0x5abbfe){const _0x1107d4=a22_0x845a,_0x4d6ab9=_0x105040();while(!![]){try{const _0x446059=parseInt(_0x1107d4(0xf2))/0x1+-parseInt(_0x1107d4(0xff))/0x2+-parseInt(_0x1107d4(0xde))/0x3+parseInt(_0x1107d4(0xce))/0x4+-parseInt(_0x1107d4(0xd9))/0x5+parseInt(_0x1107d4(0xe5))/0x6*(parseInt(_0x1107d4(0xf6))/0x7)+-parseInt(_0x1107d4(0xc9))/0x8*(-parseInt(_0x1107d4(0x102))/0x9);if(_0x446059===_0x5abbfe)break;else _0x4d6ab9['push'](_0x4d6ab9['shift']());}catch(_0x32e4e){_0x4d6ab9['push'](_0x4d6ab9['shift']());}}}(a22_0x1984,0x248aa));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':'global','type':a22_0x45773f(0xd6),'description':a22_0x45773f(0xf1),'default':![]};function parseAliasAppcodeSetKey(_0x422b9e){const _0x3e9167=a22_0x45773f,_0x8cbb9c=_0x422b9e[_0x3e9167(0xdb)]('.');if(_0x8cbb9c['length']!==0x3||_0x8cbb9c[0x0]!==_0x3e9167(0xe2)||_0x8cbb9c[0x2]!==_0x3e9167(0xfa))return undefined;const _0x34732f=_0x8cbb9c[0x1]?.['trim']();return _0x34732f?_0x34732f:undefined;}function parseAliasDeleteKey(_0x5d19af){const _0x541df3=a22_0x45773f,_0x249bda=_0x5d19af[_0x541df3(0xdb)]('.');if(_0x249bda['length']===0x2&&_0x249bda[0x0]===_0x541df3(0xe2)){const _0x6580a3=_0x249bda[0x1]?.[_0x541df3(0xc8)]();return _0x6580a3?{'alias':_0x6580a3}:undefined;}if(_0x249bda[_0x541df3(0xea)]===0x3&&_0x249bda[0x0]==='apps'&&_0x249bda[0x2]===_0x541df3(0xfa)){const _0x48c2c8=_0x249bda[0x1]?.[_0x541df3(0xc8)]();return _0x48c2c8?{'alias':_0x48c2c8,'field':_0x541df3(0xfa)}:undefined;}return undefined;}function setLocalAppAlias(_0x2a63bc,_0x1e0708,_0x10d2b7){const _0x3184a2=a22_0x45773f,_0x525a08=_0x2a63bc[_0x3184a2(0xe2)]&&typeof _0x2a63bc['apps']===_0x3184a2(0xd0)&&!Array[_0x3184a2(0xef)](_0x2a63bc['apps'])?_0x2a63bc[_0x3184a2(0xe2)]:{},_0x43de87=_0x525a08[_0x1e0708]&&typeof _0x525a08[_0x1e0708]===_0x3184a2(0xd0)&&!Array[_0x3184a2(0xef)](_0x525a08[_0x1e0708])?_0x525a08[_0x1e0708]:{};_0x43de87[_0x3184a2(0xfa)]=_0x10d2b7,_0x525a08[_0x1e0708]=_0x43de87,_0x2a63bc['apps']=_0x525a08;}function deleteLocalAppAlias(_0x236bd3,_0x198325){const _0x1c8688=a22_0x45773f;if(!_0x236bd3[_0x1c8688(0xe2)]||typeof _0x236bd3[_0x1c8688(0xe2)]!==_0x1c8688(0xd0)||Array['isArray'](_0x236bd3[_0x1c8688(0xe2)]))return![];const _0x3eeebb=_0x236bd3[_0x1c8688(0xe2)],_0x3a5169=_0x3eeebb[_0x198325[_0x1c8688(0xd7)]];if(!_0x3a5169||typeof _0x3a5169!==_0x1c8688(0xd0)||Array[_0x1c8688(0xef)](_0x3a5169))return![];if(!_0x198325[_0x1c8688(0xe6)])return delete _0x3eeebb[_0x198325[_0x1c8688(0xd7)]],!![];if(!(_0x198325[_0x1c8688(0xe6)]in _0x3a5169))return![];return delete _0x3a5169[_0x198325['field']],Object[_0x1c8688(0xf5)](_0x3a5169)[_0x1c8688(0xea)]===0x0&&delete _0x3eeebb[_0x198325['alias']],!![];}function a22_0x845a(_0x41c313,_0x382ceb){_0x41c313=_0x41c313-0xc1;const _0x198424=a22_0x1984();let _0x845aa2=_0x198424[_0x41c313];return _0x845aa2;}function a22_0x1984(){const _0x3b8ed7=['Missing\x20key\x20argument.','trim','447152TtvCqr','Set\x20a\x20config\x20value','pageSize\x20must\x20be\x20a\x20positive\x20number','Key\x20\x22','args','542528wUTbKy','\x20config\x20delete\x20<key>\x20[--global]','object','Missing\x20key\x20or\x20value.','pretty','includes','Deleted\x20`','Key\x20not\x20found:\x20','boolean','alias','\x20(global)','1148275AQfrka','stringify','split','join','\x22\x20not\x20found\x20at\x20top\x20level.','3669FuTQpy','validation','global','riskLevel','apps','Set\x20`','config','928428IJQfRE','field','log','\x22\x20is\x20not\x20settable.','Delete\x20a\x20config\x20value','length','\x20config\x20set\x20<key>\x20<value>\x20[--global]','read','pageSize','Settable\x20keys:\x20','isArray','get','Write\x20to\x20global\x20config','259897hMFfVc','Value\x20to\x20assign','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','keys','7KIgcXE','(none)','\x22.\x20Allowed:\x20',';\x20apps.<alias>.appcode','appcode','../../context.js','\x20config\x20get\x20<key>','Usage:\x20','list','451218llsbAy','Top-level\x20key\x20\x22','value','9fAFZtI','\x20\x20global:\x20\x20','Get\x20a\x20config\x20value','`\x20=\x20\x22','\x20\x20project:\x20','format','raw','bool'];a22_0x1984=function(){return _0x3b8ed7;};return a22_0x1984();}const listDef={'service':a22_0x45773f(0xe4),'command':a22_0x45773f(0xfe),'description':'List\x20current\x20config','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x2c194e){const _0x4814a8=a22_0x45773f,{buildConfigFromFlags:_0x188557}=await import(_0x4814a8(0xfb)),_0x4be4fe=_0x188557({}),_0x4a48b3=getProjectConfigPath(),_0x2fc93f=resolveWriteConfigPath('global');if(_0x2c194e[_0x4814a8(0xc4)]===_0x4814a8(0xd2))return{'ok':!![],'message':_0x4814a8(0xf4)+(JSON['stringify'](_0x4be4fe[_0x4814a8(0xc5)],null,0x2)+'\x0a\x0a')+'Config\x20files:\x0a'+(_0x4814a8(0xc3)+(_0x4a48b3??_0x4814a8(0xf7))+'\x0a')+(_0x4814a8(0x103)+_0x2fc93f)};return{'ok':!![],'data':{'effective':_0x4be4fe[_0x4814a8(0xc5)],'configFiles':{'project':_0x4a48b3??null,'global':_0x2fc93f}}};}},getDef={'service':a22_0x45773f(0xe4),'command':a22_0x45773f(0xf0),'description':a22_0x45773f(0xc1),'risk':a22_0x45773f(0xec),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':'Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','required':!![]}],'flags':[],async 'execute'(_0x33786f){const _0x290191=a22_0x45773f,_0xa19aae=_0x33786f[_0x290191(0xcd)][0x0];if(!_0xa19aae)throw CliErrors[_0x290191(0xdf)](_0x290191(0xc7),_0x290191(0xfd)+CLI_BIN_NAME+_0x290191(0xfc));const {buildConfigFromFlags:_0x17db7b}=await import('../../context.js'),{raw:_0x52759e}=_0x17db7b({});if(_0xa19aae[_0x290191(0xd3)]('.')){const _0x6873d3=_0xa19aae[_0x290191(0xdb)]('.');let _0x250fac=_0x52759e;for(const _0x3a4021 of _0x6873d3){if(_0x250fac==null||typeof _0x250fac!==_0x290191(0xd0))throw CliErrors[_0x290191(0xdf)](_0x290191(0xd5)+_0xa19aae);_0x250fac=_0x250fac[_0x3a4021];}if(_0x250fac===undefined)throw CliErrors[_0x290191(0xdf)](_0x290191(0xd5)+_0xa19aae);return console[_0x290191(0xe7)](typeof _0x250fac===_0x290191(0xd0)?JSON['stringify'](_0x250fac,null,0x2):String(_0x250fac)),{'ok':!![]};}const _0x5e6a0c=_0x52759e[_0xa19aae];if(_0x5e6a0c===undefined)throw CliErrors[_0x290191(0xdf)](_0x290191(0xd5)+_0xa19aae);return console[_0x290191(0xe7)](typeof _0x5e6a0c===_0x290191(0xd0)?JSON[_0x290191(0xda)](_0x5e6a0c,null,0x2):String(_0x5e6a0c)),{'ok':!![]};}},setDef={'service':'config','command':'set','description':a22_0x45773f(0xca),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a22_0x45773f(0x101),'description':a22_0x45773f(0xf3),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x331b99){const _0x4777d8=a22_0x45773f,_0x53ccdc=_0x331b99['args'][0x0],_0x3f8196=_0x331b99['args'][0x1];if(!_0x53ccdc||_0x3f8196===undefined)throw CliErrors[_0x4777d8(0xdf)](_0x4777d8(0xd1),_0x4777d8(0xfd)+CLI_BIN_NAME+_0x4777d8(0xeb));if(ENUM_KEYS[_0x53ccdc]&&!ENUM_KEYS[_0x53ccdc][_0x4777d8(0xd3)](_0x3f8196))throw CliErrors[_0x4777d8(0xdf)]('Invalid\x20value\x20for\x20\x22'+_0x53ccdc+_0x4777d8(0xf8)+ENUM_KEYS[_0x53ccdc][_0x4777d8(0xdc)](',\x20'));if(_0x53ccdc===_0x4777d8(0xe1))throw CliErrors[_0x4777d8(0xdf)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(_0x53ccdc===_0x4777d8(0xed)){const _0x234e60=Number(_0x3f8196);if(isNaN(_0x234e60)||_0x234e60<=0x0)throw CliErrors[_0x4777d8(0xdf)](_0x4777d8(0xcb));}const _0x269b53=resolveWriteScope({'explicitGlobal':_0x331b99[_0x4777d8(0xc6)](_0x4777d8(0xe0)),'policy':'project-or-global-explicit'}),_0x5ea61a=toScopeFlags(_0x269b53),_0x2412cd=readScopedConfig(_0x5ea61a),_0xe82255=parseAliasAppcodeSetKey(_0x53ccdc);if(!_0xe82255&&!isTopLevelConfigKey(_0x53ccdc))throw CliErrors[_0x4777d8(0xdf)](_0x4777d8(0x100)+_0x53ccdc+_0x4777d8(0xe8),_0x4777d8(0xee)+getTopLevelConfigKeySummary()+_0x4777d8(0xf9));return _0xe82255?setLocalAppAlias(_0x2412cd,_0xe82255,_0x3f8196):_0x2412cd[_0x53ccdc]=_0x53ccdc===_0x4777d8(0xed)?Number(_0x3f8196):_0x3f8196,console['log'](_0x4777d8(0xe3)+_0x53ccdc+_0x4777d8(0xc2)+_0x3f8196+'\x22'+(_0x269b53===_0x4777d8(0xe0)?'\x20(global)':'')),writeScopedConfig(_0x2412cd,_0x5ea61a),{'ok':!![]};}},deleteDef={'service':a22_0x45773f(0xe4),'command':'delete','description':a22_0x45773f(0xe9),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x4f5a29){const _0x4c6f0e=a22_0x45773f,_0x54ab05=_0x4f5a29[_0x4c6f0e(0xcd)][0x0];if(!_0x54ab05)throw CliErrors[_0x4c6f0e(0xdf)](_0x4c6f0e(0xc7),'Usage:\x20'+CLI_BIN_NAME+_0x4c6f0e(0xcf));const _0x4d55a2=resolveWriteScope({'explicitGlobal':_0x4f5a29['bool'](_0x4c6f0e(0xe0)),'policy':'project-or-global-explicit'}),_0x1b12f3=toScopeFlags(_0x4d55a2),_0x32690f=readScopedConfig(_0x1b12f3),_0x46fd20=parseAliasDeleteKey(_0x54ab05);if(_0x46fd20){if(!deleteLocalAppAlias(_0x32690f,_0x46fd20))throw CliErrors[_0x4c6f0e(0xdf)](_0x4c6f0e(0xd5)+_0x54ab05);return console[_0x4c6f0e(0xe7)](_0x4c6f0e(0xd4)+_0x54ab05+'`'+(_0x4d55a2===_0x4c6f0e(0xe0)?_0x4c6f0e(0xd8):'')),writeScopedConfig(_0x32690f,_0x1b12f3),{'ok':!![]};}if(_0x32690f[_0x54ab05]===undefined)throw CliErrors['validation'](_0x4c6f0e(0xcc)+_0x54ab05+_0x4c6f0e(0xdd));return delete _0x32690f[_0x54ab05],console[_0x4c6f0e(0xe7)]('Deleted\x20`'+_0x54ab05+'`'+(_0x4d55a2===_0x4c6f0e(0xe0)?_0x4c6f0e(0xd8):'')),writeScopedConfig(_0x32690f,_0x1b12f3),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
1
|
+
const a22_0x581d54=a22_0x3226;(function(_0x3c0b7c,_0x3a6962){const _0x423d3a=a22_0x3226,_0x11ba04=_0x3c0b7c();while(!![]){try{const _0x2425e3=parseInt(_0x423d3a(0x1ae))/0x1*(parseInt(_0x423d3a(0x1ec))/0x2)+-parseInt(_0x423d3a(0x1aa))/0x3+-parseInt(_0x423d3a(0x1e4))/0x4*(parseInt(_0x423d3a(0x1c7))/0x5)+-parseInt(_0x423d3a(0x1dd))/0x6*(parseInt(_0x423d3a(0x1d2))/0x7)+-parseInt(_0x423d3a(0x1bc))/0x8*(-parseInt(_0x423d3a(0x1d8))/0x9)+parseInt(_0x423d3a(0x1b6))/0xa*(parseInt(_0x423d3a(0x1b2))/0xb)+parseInt(_0x423d3a(0x1c6))/0xc*(parseInt(_0x423d3a(0x1ac))/0xd);if(_0x2425e3===_0x3a6962)break;else _0x11ba04['push'](_0x11ba04['shift']());}catch(_0x540c54){_0x11ba04['push'](_0x11ba04['shift']());}}}(a22_0x47f9,0x210b1));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a22_0x581d54(0x1eb),'type':'boolean','description':a22_0x581d54(0x1bf),'default':![]};function parseAliasAppcodeSetKey(_0x597067){const _0x58038a=a22_0x581d54,_0x373f0e=_0x597067['split']('.');if(_0x373f0e[_0x58038a(0x1bd)]!==0x3||_0x373f0e[0x0]!==_0x58038a(0x1b7)||_0x373f0e[0x2]!==_0x58038a(0x1bb))return undefined;const _0x303e9a=_0x373f0e[0x1]?.[_0x58038a(0x1d3)]();return _0x303e9a?_0x303e9a:undefined;}function parseAliasDeleteKey(_0x48d009){const _0x58b325=a22_0x581d54,_0x31df83=_0x48d009[_0x58b325(0x1da)]('.');if(_0x31df83[_0x58b325(0x1bd)]===0x2&&_0x31df83[0x0]==='apps'){const _0x225ded=_0x31df83[0x1]?.[_0x58b325(0x1d3)]();return _0x225ded?{'alias':_0x225ded}:undefined;}if(_0x31df83[_0x58b325(0x1bd)]===0x3&&_0x31df83[0x0]===_0x58b325(0x1b7)&&_0x31df83[0x2]==='appcode'){const _0x22661e=_0x31df83[0x1]?.[_0x58b325(0x1d3)]();return _0x22661e?{'alias':_0x22661e,'field':_0x58b325(0x1bb)}:undefined;}return undefined;}function a22_0x3226(_0x239a17,_0x2111f0){_0x239a17=_0x239a17-0x1a6;const _0x47f989=a22_0x47f9();let _0x3226f8=_0x47f989[_0x239a17];return _0x3226f8;}function setLocalAppAlias(_0x25d2fe,_0x53918b,_0x47981a){const _0x21cb6c=a22_0x581d54,_0x6093de=_0x25d2fe[_0x21cb6c(0x1b7)]&&typeof _0x25d2fe[_0x21cb6c(0x1b7)]===_0x21cb6c(0x1e1)&&!Array[_0x21cb6c(0x1df)](_0x25d2fe[_0x21cb6c(0x1b7)])?_0x25d2fe['apps']:{},_0x585f22=_0x6093de[_0x53918b]&&typeof _0x6093de[_0x53918b]===_0x21cb6c(0x1e1)&&!Array[_0x21cb6c(0x1df)](_0x6093de[_0x53918b])?_0x6093de[_0x53918b]:{};_0x585f22[_0x21cb6c(0x1bb)]=_0x47981a,_0x6093de[_0x53918b]=_0x585f22,_0x25d2fe['apps']=_0x6093de;}function deleteLocalAppAlias(_0x30d51e,_0x16ca42){const _0x5b40e6=a22_0x581d54;if(!_0x30d51e['apps']||typeof _0x30d51e[_0x5b40e6(0x1b7)]!==_0x5b40e6(0x1e1)||Array[_0x5b40e6(0x1df)](_0x30d51e['apps']))return![];const _0xcb8c7f=_0x30d51e[_0x5b40e6(0x1b7)],_0x434640=_0xcb8c7f[_0x16ca42['alias']];if(!_0x434640||typeof _0x434640!==_0x5b40e6(0x1e1)||Array['isArray'](_0x434640))return![];if(!_0x16ca42['field'])return delete _0xcb8c7f[_0x16ca42['alias']],!![];if(!(_0x16ca42['field']in _0x434640))return![];return delete _0x434640[_0x16ca42[_0x5b40e6(0x1a9)]],Object[_0x5b40e6(0x1c9)](_0x434640)['length']===0x0&&delete _0xcb8c7f[_0x16ca42[_0x5b40e6(0x1e5)]],!![];}const listDef={'service':a22_0x581d54(0x1d7),'command':a22_0x581d54(0x1a6),'description':a22_0x581d54(0x1b9),'risk':a22_0x581d54(0x1d1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x158b4e){const _0x1164e0=a22_0x581d54,{buildConfigFromFlags:_0x580fb4}=await import(_0x1164e0(0x1ca)),_0x2223d5=_0x580fb4({}),_0x5edee2=getProjectConfigPath(),_0x432565=resolveWriteConfigPath(_0x1164e0(0x1eb));if(_0x158b4e[_0x1164e0(0x1b5)]===_0x1164e0(0x1dc))return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON[_0x1164e0(0x1d9)](_0x2223d5[_0x1164e0(0x1b0)],null,0x2)+'\x0a\x0a')+_0x1164e0(0x1cd)+(_0x1164e0(0x1e0)+(_0x5edee2??_0x1164e0(0x1e8))+'\x0a')+(_0x1164e0(0x1ad)+_0x432565)};return{'ok':!![],'data':{'effective':_0x2223d5[_0x1164e0(0x1b0)],'configFiles':{'project':_0x5edee2??null,'global':_0x432565}}};}},getDef={'service':'config','command':'get','description':'Get\x20a\x20config\x20value','risk':a22_0x581d54(0x1d1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x581d54(0x1d6),'description':a22_0x581d54(0x1c5),'required':!![]}],'flags':[],async 'execute'(_0x4c33e1){const _0x1c815f=a22_0x581d54,_0x2479ca=_0x4c33e1[_0x1c815f(0x1be)][0x0];if(!_0x2479ca)throw CliErrors[_0x1c815f(0x1ba)](_0x1c815f(0x1c2),'Usage:\x20'+CLI_BIN_NAME+_0x1c815f(0x1ab));const {buildConfigFromFlags:_0x1faf05}=await import(_0x1c815f(0x1ca)),{raw:_0x185d91}=_0x1faf05({});if(_0x2479ca[_0x1c815f(0x1ea)]('.')){const _0x1c3fc6=_0x2479ca['split']('.');let _0x366ead=_0x185d91;for(const _0x3cb175 of _0x1c3fc6){if(_0x366ead==null||typeof _0x366ead!=='object')throw CliErrors[_0x1c815f(0x1ba)](_0x1c815f(0x1d4)+_0x2479ca);_0x366ead=_0x366ead[_0x3cb175];}if(_0x366ead===undefined)throw CliErrors[_0x1c815f(0x1ba)]('Key\x20not\x20found:\x20'+_0x2479ca);return console[_0x1c815f(0x1cc)](typeof _0x366ead===_0x1c815f(0x1e1)?JSON[_0x1c815f(0x1d9)](_0x366ead,null,0x2):String(_0x366ead)),{'ok':!![]};}const _0x5479dd=_0x185d91[_0x2479ca];if(_0x5479dd===undefined)throw CliErrors[_0x1c815f(0x1ba)](_0x1c815f(0x1d4)+_0x2479ca);return console[_0x1c815f(0x1cc)](typeof _0x5479dd===_0x1c815f(0x1e1)?JSON[_0x1c815f(0x1d9)](_0x5479dd,null,0x2):String(_0x5479dd)),{'ok':!![]};}},setDef={'service':'config','command':a22_0x581d54(0x1af),'description':a22_0x581d54(0x1b8),'risk':a22_0x581d54(0x1b4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a22_0x581d54(0x1d6),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a22_0x581d54(0x1cf),'description':a22_0x581d54(0x1b3),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x595e38){const _0x500ca6=a22_0x581d54,_0x320a07=_0x595e38[_0x500ca6(0x1be)][0x0],_0x4e9e2a=_0x595e38[_0x500ca6(0x1be)][0x1];if(!_0x320a07||_0x4e9e2a===undefined)throw CliErrors[_0x500ca6(0x1ba)](_0x500ca6(0x1e9),'Usage:\x20'+CLI_BIN_NAME+_0x500ca6(0x1ce));if(ENUM_KEYS[_0x320a07]&&!ENUM_KEYS[_0x320a07][_0x500ca6(0x1ea)](_0x4e9e2a))throw CliErrors[_0x500ca6(0x1ba)](_0x500ca6(0x1c4)+_0x320a07+_0x500ca6(0x1de)+ENUM_KEYS[_0x320a07][_0x500ca6(0x1e6)](',\x20'));if(_0x320a07===_0x500ca6(0x1cb))throw CliErrors[_0x500ca6(0x1ba)](_0x500ca6(0x1c8));if(_0x320a07===_0x500ca6(0x1c3)){const _0x3736aa=Number(_0x4e9e2a);if(isNaN(_0x3736aa)||_0x3736aa<=0x0)throw CliErrors[_0x500ca6(0x1ba)](_0x500ca6(0x1d5));}const _0x307488=resolveWriteScope({'explicitGlobal':_0x595e38[_0x500ca6(0x1c1)](_0x500ca6(0x1eb)),'policy':'project-or-global-explicit'}),_0x51c55f=toScopeFlags(_0x307488),_0xd227f0=readScopedConfig(_0x51c55f),_0x1e16dd=parseAliasAppcodeSetKey(_0x320a07);if(!_0x1e16dd&&!isTopLevelConfigKey(_0x320a07))throw CliErrors[_0x500ca6(0x1ba)]('Top-level\x20key\x20\x22'+_0x320a07+'\x22\x20is\x20not\x20settable.',_0x500ca6(0x1b1)+getTopLevelConfigKeySummary()+_0x500ca6(0x1db));return _0x1e16dd?setLocalAppAlias(_0xd227f0,_0x1e16dd,_0x4e9e2a):_0xd227f0[_0x320a07]=_0x320a07===_0x500ca6(0x1c3)?Number(_0x4e9e2a):_0x4e9e2a,console[_0x500ca6(0x1cc)]('Set\x20`'+_0x320a07+'`\x20=\x20\x22'+_0x4e9e2a+'\x22'+(_0x307488===_0x500ca6(0x1eb)?_0x500ca6(0x1e2):'')),writeScopedConfig(_0xd227f0,_0x51c55f),{'ok':!![]};}},deleteDef={'service':a22_0x581d54(0x1d7),'command':a22_0x581d54(0x1e7),'description':a22_0x581d54(0x1c0),'risk':a22_0x581d54(0x1b4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x2ac33d){const _0x1ac819=a22_0x581d54,_0x3908f1=_0x2ac33d[_0x1ac819(0x1be)][0x0];if(!_0x3908f1)throw CliErrors[_0x1ac819(0x1ba)](_0x1ac819(0x1c2),_0x1ac819(0x1a8)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');const _0x25b0d2=resolveWriteScope({'explicitGlobal':_0x2ac33d['bool'](_0x1ac819(0x1eb)),'policy':'project-or-global-explicit'}),_0x2ea256=toScopeFlags(_0x25b0d2),_0x9dbfdb=readScopedConfig(_0x2ea256),_0x2f5713=parseAliasDeleteKey(_0x3908f1);if(_0x2f5713){if(!deleteLocalAppAlias(_0x9dbfdb,_0x2f5713))throw CliErrors['validation'](_0x1ac819(0x1d4)+_0x3908f1);return console[_0x1ac819(0x1cc)](_0x1ac819(0x1e3)+_0x3908f1+'`'+(_0x25b0d2===_0x1ac819(0x1eb)?_0x1ac819(0x1e2):'')),writeScopedConfig(_0x9dbfdb,_0x2ea256),{'ok':!![]};}if(_0x9dbfdb[_0x3908f1]===undefined)throw CliErrors[_0x1ac819(0x1ba)](_0x1ac819(0x1d0)+_0x3908f1+_0x1ac819(0x1a7));return delete _0x9dbfdb[_0x3908f1],console[_0x1ac819(0x1cc)]('Deleted\x20`'+_0x3908f1+'`'+(_0x25b0d2==='global'?'\x20(global)':'')),writeScopedConfig(_0x9dbfdb,_0x2ea256),{'ok':!![]};}};function a22_0x47f9(){const _0x390c05=['alias','join','delete','(none)','Missing\x20key\x20or\x20value.','includes','global','2Lraopo','list','\x22\x20not\x20found\x20at\x20top\x20level.','Usage:\x20','field','778287RnnUCO','\x20config\x20get\x20<key>','52nLoinJ','\x20\x20global:\x20\x20','50369ewdmYX','set','raw','Settable\x20keys:\x20','209adXTta','Value\x20to\x20assign','write','format','121390RAWBYt','apps','Set\x20a\x20config\x20value','List\x20current\x20config','validation','appcode','40qNmMeA','length','args','Write\x20to\x20global\x20config','Delete\x20a\x20config\x20value','bool','Missing\x20key\x20argument.','pageSize','Invalid\x20value\x20for\x20\x22','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','483852zmchZw','281510HbUyTx','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','keys','../../context.js','riskLevel','log','Config\x20files:\x0a','\x20config\x20set\x20<key>\x20<value>\x20[--global]','value','Key\x20\x22','read','191373BvrNYC','trim','Key\x20not\x20found:\x20','pageSize\x20must\x20be\x20a\x20positive\x20number','key','config','467469ptAZJI','stringify','split',';\x20apps.<alias>.appcode','pretty','18BylfLk','\x22.\x20Allowed:\x20','isArray','\x20\x20project:\x20','object','\x20(global)','Deleted\x20`','16ddJrog'];a22_0x47f9=function(){return _0x390c05;};return a22_0x47f9();}export const configDefinitions=[listDef,getDef,setDef,deleteDef];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x648509,_0x39e9f7){var _0x1b2432=a23_0x2fd1,_0x134036=_0x648509();while(!![]){try{var _0x161331=-parseInt(_0x1b2432(0x88))/0x1+-parseInt(_0x1b2432(0x89))/0x2*(-parseInt(_0x1b2432(0x85))/0x3)+-parseInt(_0x1b2432(0x8a))/0x4*(-parseInt(_0x1b2432(0x8c))/0x5)+-parseInt(_0x1b2432(0x8d))/0x6*(parseInt(_0x1b2432(0x8b))/0x7)+-parseInt(_0x1b2432(0x87))/0x8+-parseInt(_0x1b2432(0x84))/0x9*(-parseInt(_0x1b2432(0x83))/0xa)+-parseInt(_0x1b2432(0x86))/0xb;if(_0x161331===_0x39e9f7)break;else _0x134036['push'](_0x134036['shift']());}catch(_0x55a45c){_0x134036['push'](_0x134036['shift']());}}}(a23_0x539d,0xb6f2a));import{CLI_BIN_NAME}from'../../constant/cli.js';function a23_0x2fd1(_0x152eb0,_0x58aeed){_0x152eb0=_0x152eb0-0x83;var _0x539d7c=a23_0x539d();var _0x2fd127=_0x539d7c[_0x152eb0];return _0x2fd127;}function a23_0x539d(){var _0x5204e0=['18KerdvD','4237420VQHtVI','460408OgeIIR','535178bdKVbX','275102iDySOh','2424gODxsm','618247Ldupga','11970DVGgEl','54alhSCV','22580KOzfZw','981BNHfNc'];a23_0x539d=function(){return _0x5204e0;};return a23_0x539d();}export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,toScopeFlags}from'../../commands/common/config-policy.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a24_0xd3ef36=a24_0x52e1;function a24_0x52e1(_0x1bb7d4,_0x935b66){_0x1bb7d4=_0x1bb7d4-0x1d5;const _0x1e6cc5=a24_0x1e6c();let _0x52e1e0=_0x1e6cc5[_0x1bb7d4];return _0x52e1e0;}function a24_0x1e6c(){const _0x1f0f33=['2YlDodB','2280104UuKlKW','\x20\x20AGGREGATE\x20TYPES','\x20\x20EXAMPLES','description','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Post-aggregation\x20filters,\x20e.g.\x20[{\x22columnName\x22:\x22total\x22,\x22condition\x22:{\x22$gt\x22:1000}}]','1212480UjZvUo','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27','map','11735226HnKDuO','paramsRequired','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','aggregate','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','dryRun','\x20\x20PARAMS\x20STRUCTURE','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','now','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','batchCreate','\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}]','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','join','\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','write','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','\x20\x20WHERE\x20OPERATORS','176021IIYEjm','\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.','35sgEOfK','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','getOne','filter','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','helpExtra','\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged','POST','command','high-risk-write','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','530136fBciKJ','\x20on\x20dataset\x20','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','risk','batch','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20completed\x20in\x20','str','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','/api/{appCode}/','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','Preview:\x20data\x20','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','1412864apOSOk','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','code','\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]','create','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','data\x20','read','9729048uLopWF','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','update','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','operation','Update\x20an\x20existing\x20record','params','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20\x20PAGINATION','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','paramsHint','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','build','length','Get\x20a\x20single\x20record\x20by\x20ID','Filter\x20dataset\x20records\x20with\x20query\x20conditions','body','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','data','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','Create\x20a\x20new\x20record\x20in\x20a\x20dataset'];a24_0x1e6c=function(){return _0x1f0f33;};return a24_0x1e6c();}(function(_0x39efba,_0x1117e1){const _0x1eca9f=a24_0x52e1,_0x30f6f9=_0x39efba();while(!![]){try{const _0x2b0139=parseInt(_0x1eca9f(0x1e9))/0x1*(-parseInt(_0x1eca9f(0x223))/0x2)+parseInt(_0x1eca9f(0x1f7))/0x3+-parseInt(_0x1eca9f(0x205))/0x4+parseInt(_0x1eca9f(0x22a))/0x5+-parseInt(_0x1eca9f(0x20d))/0x6+parseInt(_0x1eca9f(0x1eb))/0x7*(parseInt(_0x1eca9f(0x224))/0x8)+parseInt(_0x1eca9f(0x22e))/0x9;if(_0x2b0139===_0x1117e1)break;else _0x30f6f9['push'](_0x30f6f9['shift']());}catch(_0x40f13e){_0x30f6f9['push'](_0x30f6f9['shift']());}}}(a24_0x1e6c,0xf3842));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a24_0xd3ef36(0x1ef),'operation':'filter','risk':a24_0xd3ef36(0x20c),'paramsRequired':![],'description':a24_0xd3ef36(0x21d),'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a24_0xd3ef36(0x214),'helpExtra':[a24_0xd3ef36(0x1e8),'\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}',a24_0xd3ef36(0x1e2),a24_0xd3ef36(0x1ff),a24_0xd3ef36(0x232),a24_0xd3ef36(0x21f),'\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}',a24_0xd3ef36(0x1f9),a24_0xd3ef36(0x1db),'',a24_0xd3ef36(0x1e1),a24_0xd3ef36(0x1e0),a24_0xd3ef36(0x202),'',a24_0xd3ef36(0x20a),a24_0xd3ef36(0x230),a24_0xd3ef36(0x208),a24_0xd3ef36(0x1dd),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a24_0xd3ef36(0x210),'',a24_0xd3ef36(0x216),a24_0xd3ef36(0x1ec),a24_0xd3ef36(0x1ea),a24_0xd3ef36(0x1f2),a24_0xd3ef36(0x1e7),a24_0xd3ef36(0x1e4),a24_0xd3ef36(0x22c),'\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.'][a24_0xd3ef36(0x1e3)]('\x0a')},{'command':a24_0xd3ef36(0x1ee),'operation':a24_0xd3ef36(0x1ee),'risk':a24_0xd3ef36(0x20c),'paramsRequired':!![],'description':a24_0xd3ef36(0x21c),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':'create','operation':a24_0xd3ef36(0x209),'risk':a24_0xd3ef36(0x1e5),'paramsRequired':!![],'description':a24_0xd3ef36(0x222),'paramsHint':a24_0xd3ef36(0x217)},{'command':a24_0xd3ef36(0x1dc),'operation':a24_0xd3ef36(0x1dc),'risk':a24_0xd3ef36(0x1e5),'paramsRequired':!![],'description':a24_0xd3ef36(0x206),'paramsHint':a24_0xd3ef36(0x1f6)},{'command':a24_0xd3ef36(0x20f),'operation':a24_0xd3ef36(0x20f),'risk':a24_0xd3ef36(0x1e5),'paramsRequired':!![],'description':a24_0xd3ef36(0x212),'paramsHint':a24_0xd3ef36(0x1d7)+a24_0xd3ef36(0x200)},{'command':'delete','operation':'delete','risk':a24_0xd3ef36(0x1f5),'paramsRequired':!![],'description':a24_0xd3ef36(0x1de),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a24_0xd3ef36(0x231),'operation':'aggregate','risk':a24_0xd3ef36(0x20c),'paramsRequired':![],'description':a24_0xd3ef36(0x22b),'paramsHint':'JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'+a24_0xd3ef36(0x1d9),'helpExtra':[a24_0xd3ef36(0x225),a24_0xd3ef36(0x221),a24_0xd3ef36(0x204),a24_0xd3ef36(0x1e6),'\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}',a24_0xd3ef36(0x228),a24_0xd3ef36(0x20e),a24_0xd3ef36(0x1da),'',a24_0xd3ef36(0x1d6),a24_0xd3ef36(0x1fc),a24_0xd3ef36(0x215),a24_0xd3ef36(0x1df),a24_0xd3ef36(0x233),a24_0xd3ef36(0x229),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','',a24_0xd3ef36(0x226),a24_0xd3ef36(0x1ed),a24_0xd3ef36(0x219),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a24_0xd3ef36(0x1f0),'','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.'][a24_0xd3ef36(0x1e3)]('\x0a')}];function makeDataCommand(_0x4ddc29){const _0x2aeff6=a24_0xd3ef36,_0x4f2856='data\x20'+_0x4ddc29[_0x2aeff6(0x1f4)],_0x16522d={'service':_0x2aeff6(0x220),'command':_0x4ddc29[_0x2aeff6(0x1f4)],'description':_0x4ddc29[_0x2aeff6(0x227)],'risk':_0x4ddc29[_0x2aeff6(0x1fa)],'helpExtra':_0x4ddc29[_0x2aeff6(0x1f1)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x4ddc29[_0x2aeff6(0x218)]}],'validate':async _0x52389f=>{const _0x554c30=_0x2aeff6;_0x4ddc29[_0x554c30(0x22f)]&&requireAnyOf(_0x52389f,[_0x554c30(0x213)],_0x4f2856),_0x4ddc29[_0x554c30(0x211)]===_0x554c30(0x1dc)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x52389f['str'](_0x554c30(0x213)))),_0x4ddc29['operation']===_0x554c30(0x20f)&&parseUpdateIdsFromParams(parseJsonParams(_0x52389f['str'](_0x554c30(0x213)))??{});},async 'execute'(_0x1d5378){const _0x36dfb7=_0x2aeff6,_0x2d9c2b=_0x1d5378[_0x36dfb7(0x1fe)](_0x36dfb7(0x207)),_0x1a0090=_0x4ddc29[_0x36dfb7(0x211)]===_0x36dfb7(0x1dc)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1d5378[_0x36dfb7(0x1fe)]('params'))):parseJsonParams(_0x1d5378['str'](_0x36dfb7(0x213)))??{},_0x2e1324=_0x4ddc29[_0x36dfb7(0x211)]===_0x36dfb7(0x20f)?parseUpdateIdsFromParams(_0x1a0090):undefined,_0x1f51e5=_0x2e1324?normalizeUpdateParamsForRuntime(_0x1a0090,_0x2e1324):_0x1a0090,_0x42280c=Date[_0x36dfb7(0x1d8)](),_0x4c0c78=await executeData(_0x2d9c2b,_0x4ddc29[_0x36dfb7(0x211)],_0x1f51e5),_0x4b61a9=Date['now']()-_0x42280c,_0x3d5900=_0x2e1324&&_0x2e1324[_0x36dfb7(0x21b)]>0x1?buildBatchUpdateResult(_0x2e1324,_0x4c0c78):_0x4c0c78;return{'ok':!![],'data':{'result':_0x3d5900,'elapsed':_0x4b61a9},'message':_0x36dfb7(0x20b)+_0x4ddc29[_0x36dfb7(0x1f4)]+_0x36dfb7(0x1fd)+_0x4b61a9+'ms'};}};return _0x4ddc29[_0x2aeff6(0x1fa)]!=='read'&&(_0x16522d[_0x2aeff6(0x1d5)]=async _0x2bfea5=>{const _0x2f2022=_0x2aeff6,_0x2ad376=_0x2bfea5['str'](_0x2f2022(0x207)),_0x14da8a=_0x4ddc29[_0x2f2022(0x211)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2bfea5[_0x2f2022(0x1fe)]('params'))):parseJsonParams(_0x2bfea5[_0x2f2022(0x1fe)](_0x2f2022(0x213)))??{};let _0x1205f9=_0x14da8a;if(_0x4ddc29[_0x2f2022(0x211)]==='update'){const _0x384af2=parseUpdateIdsFromParams(_0x14da8a);_0x1205f9=normalizeUpdateParamsForRuntime(_0x14da8a,_0x384af2);}return dryRun(_0x2f2022(0x1f3),_0x2f2022(0x201)+_0x2ad376+'/'+_0x4ddc29['operation'])[_0x2f2022(0x21e)](_0x1205f9)[_0x2f2022(0x227)](_0x2f2022(0x203)+_0x4ddc29[_0x2f2022(0x1f4)]+_0x2f2022(0x1f8)+_0x2ad376)[_0x2f2022(0x21a)]();}),_0x16522d;}export const dataDefinitions=specs[a24_0xd3ef36(0x22d)](makeDataCommand);function buildBatchUpdateResult(_0x286c9b,_0x51e130){const _0x6be3ed=a24_0xd3ef36;return{'operation':_0x6be3ed(0x20f),'mode':_0x6be3ed(0x1fb),'ids':_0x286c9b,'total':_0x286c9b[_0x6be3ed(0x21b)],'result':_0x51e130};}
|
|
1
|
+
const a24_0x547363=a24_0x2910;(function(_0x2076bf,_0x2de071){const _0x413e9a=a24_0x2910,_0x25a084=_0x2076bf();while(!![]){try{const _0x59bda3=parseInt(_0x413e9a(0x12f))/0x1*(-parseInt(_0x413e9a(0x108))/0x2)+parseInt(_0x413e9a(0xfc))/0x3+-parseInt(_0x413e9a(0x110))/0x4*(-parseInt(_0x413e9a(0xf8))/0x5)+parseInt(_0x413e9a(0x10d))/0x6*(-parseInt(_0x413e9a(0xeb))/0x7)+-parseInt(_0x413e9a(0x112))/0x8+parseInt(_0x413e9a(0x11b))/0x9+parseInt(_0x413e9a(0x127))/0xa*(parseInt(_0x413e9a(0x12c))/0xb);if(_0x59bda3===_0x2de071)break;else _0x25a084['push'](_0x25a084['shift']());}catch(_0x5c9580){_0x25a084['push'](_0x25a084['shift']());}}}(a24_0x2cc9,0x8f88a));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams,parseUpdateIdsFromParams,normalizeUpdateParamsForRuntime}from'../../utils/params.js';function a24_0x2910(_0x3a4982,_0x46be83){_0x3a4982=_0x3a4982-0xe6;const _0x2cc955=a24_0x2cc9();let _0x291083=_0x2cc955[_0x3a4982];return _0x291083;}import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a24_0x547363(0xfe),'operation':a24_0x547363(0xfe),'risk':a24_0x547363(0x117),'paramsRequired':![],'description':a24_0x547363(0x122),'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a24_0x547363(0xf1),'helpExtra':[a24_0x547363(0x138),'\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}',a24_0x547363(0x126),a24_0x547363(0xf5),a24_0x547363(0xed),a24_0x547363(0x120),a24_0x547363(0xea),a24_0x547363(0x116),a24_0x547363(0x133),a24_0x547363(0x119),a24_0x547363(0x137),'','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}',a24_0x547363(0x114),'','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a24_0x547363(0x128),a24_0x547363(0x131),a24_0x547363(0x10a),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','','\x20\x20PAGINATION',a24_0x547363(0x10e),a24_0x547363(0x12e),'\x20\x20\x20\x20Page\x20numbers\x20start\x20at\x201.\x20To\x20fetch\x20the\x20next\x20page,\x20keep\x20where/select/orderBy/pageSize\x20unchanged',a24_0x547363(0xf0),a24_0x547363(0x129),a24_0x547363(0x139),a24_0x547363(0x136)][a24_0x547363(0x10b)]('\x0a')},{'command':a24_0x547363(0xe7),'operation':a24_0x547363(0xe7),'risk':a24_0x547363(0x117),'paramsRequired':!![],'description':a24_0x547363(0x12d),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':'create','operation':a24_0x547363(0xff),'risk':'write','paramsRequired':!![],'description':'Create\x20a\x20new\x20record\x20in\x20a\x20dataset','paramsHint':a24_0x547363(0x121)},{'command':a24_0x547363(0xf6),'operation':a24_0x547363(0xf6),'risk':a24_0x547363(0x101),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','paramsHint':a24_0x547363(0x10f)},{'command':a24_0x547363(0x11c),'operation':'update','risk':a24_0x547363(0x101),'paramsRequired':!![],'description':a24_0x547363(0x102),'paramsHint':a24_0x547363(0xf4)+a24_0x547363(0x118)},{'command':a24_0x547363(0x107),'operation':'delete','risk':'high-risk-write','paramsRequired':!![],'description':a24_0x547363(0x13d),'paramsHint':a24_0x547363(0x11d)},{'command':'aggregate','operation':a24_0x547363(0x134),'risk':a24_0x547363(0x117),'paramsRequired':![],'description':a24_0x547363(0x130),'paramsHint':a24_0x547363(0x11a)+a24_0x547363(0xee),'helpExtra':['\x20\x20AGGREGATE\x20TYPES',a24_0x547363(0x132),a24_0x547363(0x100),a24_0x547363(0x104),a24_0x547363(0x124),a24_0x547363(0xfd),'\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}',a24_0x547363(0x13f),'','\x20\x20PARAMS\x20STRUCTURE',a24_0x547363(0x106),a24_0x547363(0xf2),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Post-aggregation\x20filters,\x20e.g.\x20[{\x22columnName\x22:\x22total\x22,\x22condition\x22:{\x22$gt\x22:1000}}]',a24_0x547363(0x115),'',a24_0x547363(0xef),a24_0x547363(0x10c),a24_0x547363(0x103),'','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter',a24_0x547363(0x11f),'',a24_0x547363(0x13a)][a24_0x547363(0x10b)]('\x0a')}];function makeDataCommand(_0x56af38){const _0x1016a8=a24_0x547363,_0x2bdee4=_0x1016a8(0xec)+_0x56af38[_0x1016a8(0x123)],_0x54c7c1={'service':_0x1016a8(0x13e),'command':_0x56af38[_0x1016a8(0x123)],'description':_0x56af38[_0x1016a8(0x109)],'risk':_0x56af38[_0x1016a8(0x105)],'helpExtra':_0x56af38[_0x1016a8(0x125)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x56af38[_0x1016a8(0xe8)]}],'validate':async _0x2956a9=>{const _0x30a7f7=_0x1016a8;_0x56af38[_0x30a7f7(0x11e)]&&requireAnyOf(_0x2956a9,['params'],_0x2bdee4),_0x56af38[_0x30a7f7(0x111)]==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2956a9['str'](_0x30a7f7(0x13c)))),_0x56af38[_0x30a7f7(0x111)]===_0x30a7f7(0x11c)&&parseUpdateIdsFromParams(parseJsonParams(_0x2956a9['str'](_0x30a7f7(0x13c)))??{});},async 'execute'(_0x341ff2){const _0x32eaf2=_0x1016a8,_0x4e0db2=_0x341ff2[_0x32eaf2(0x12a)]('code'),_0x5f46e5=_0x56af38['operation']==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x341ff2[_0x32eaf2(0x12a)](_0x32eaf2(0x13c)))):parseJsonParams(_0x341ff2[_0x32eaf2(0x12a)](_0x32eaf2(0x13c)))??{},_0x383c32=_0x56af38[_0x32eaf2(0x111)]===_0x32eaf2(0x11c)?parseUpdateIdsFromParams(_0x5f46e5):undefined,_0x4a956f=_0x383c32?normalizeUpdateParamsForRuntime(_0x5f46e5,_0x383c32):_0x5f46e5,_0x4f0bb8=Date[_0x32eaf2(0x12b)](),_0xd3ec1c=await executeData(_0x4e0db2,_0x56af38[_0x32eaf2(0x111)],_0x4a956f),_0x27c39a=Date[_0x32eaf2(0x12b)]()-_0x4f0bb8,_0x4bdbbe=_0x383c32&&_0x383c32[_0x32eaf2(0xf9)]>0x1?buildBatchUpdateResult(_0x383c32,_0xd3ec1c):_0xd3ec1c;return{'ok':!![],'data':{'result':_0x4bdbbe,'elapsed':_0x27c39a},'message':'data\x20'+_0x56af38['command']+_0x32eaf2(0x113)+_0x27c39a+'ms'};}};return _0x56af38[_0x1016a8(0x105)]!==_0x1016a8(0x117)&&(_0x54c7c1[_0x1016a8(0x135)]=async _0x50d198=>{const _0x2ba309=_0x1016a8,_0x4bb35f=_0x50d198[_0x2ba309(0x12a)](_0x2ba309(0xfb)),_0x9363b1=_0x56af38[_0x2ba309(0x111)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x50d198[_0x2ba309(0x12a)](_0x2ba309(0x13c)))):parseJsonParams(_0x50d198[_0x2ba309(0x12a)](_0x2ba309(0x13c)))??{};let _0x216ac9=_0x9363b1;if(_0x56af38[_0x2ba309(0x111)]===_0x2ba309(0x11c)){const _0x520788=parseUpdateIdsFromParams(_0x9363b1);_0x216ac9=normalizeUpdateParamsForRuntime(_0x9363b1,_0x520788);}return dryRun(_0x2ba309(0xe6),'/api/{appCode}/'+_0x4bb35f+'/'+_0x56af38['operation'])[_0x2ba309(0xe9)](_0x216ac9)[_0x2ba309(0x109)]('Preview:\x20data\x20'+_0x56af38[_0x2ba309(0x123)]+_0x2ba309(0xfa)+_0x4bb35f)[_0x2ba309(0xf3)]();}),_0x54c7c1;}export const dataDefinitions=specs[a24_0x547363(0xf7)](makeDataCommand);function buildBatchUpdateResult(_0x41f5e3,_0x477d9b){const _0x44aab3=a24_0x547363;return{'operation':_0x44aab3(0x11c),'mode':_0x44aab3(0x13b),'ids':_0x41f5e3,'total':_0x41f5e3[_0x44aab3(0xf9)],'result':_0x477d9b};}function a24_0x2cc9(){const _0x165e5b=['7dJjhzo','data\x20','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20EXAMPLES','\x20\x20\x20\x20and\x20increment\x20only\x20currentPage.\x20Use\x20a\x20stable\x20unique\x20orderBy\x20field\x20to\x20avoid\x20duplicates\x20or\x20gaps.','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','build','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20id\x20may\x20be\x20a\x20single\x20value\x20or\x20array.\x20','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','batchCreate','map','45610eTxSQl','length','\x20on\x20dataset\x20','code','2010300lCTGHV','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','filter','create','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','write','Update\x20an\x20existing\x20record','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','risk','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','delete','95334YouMll','description','\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}]','join','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','642714VSqzWx','\x20\x20\x20\x20Filtering\x20and\x20pagination\x20are\x20controlled\x20only\x20via\x20one\x20JSON\x20object\x20in\x20--params.','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','40qMSwwF','operation','450232OkuUPK','\x20completed\x20in\x20','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','read','Examples:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27,\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22completed\x22}\x27','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','491994negojR','update','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','paramsRequired','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','Filter\x20dataset\x20records\x20with\x20query\x20conditions','command','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','helpExtra','\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}','3966660szIqaJ','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20\x20\x20Page\x201:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','str','now','22vIkXmu','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20\x20\x20Do\x20NOT\x20use\x20--where,\x20--select,\x20--order-by,\x20--current-page,\x20--page,\x20or\x20--page-size\x20as\x20CLI\x20flags.','18wjYmUf','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','aggregate','dryRun','\x20\x20\x20\x20Verify\x20the\x20response\x20paging.currentPage/pageSize\x20and\x20that\x20tableData\x20satisfies\x20where\x20before\x20drawing\x20conclusions.','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','\x20\x20WHERE\x20OPERATORS','\x20\x20\x20\x20Page\x202:\x20--params\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22orderBy\x22:[{\x22id\x22:\x22asc\x22}],\x22currentPage\x22:2,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','batch','params','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','data','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','POST','getOne','paramsHint','body','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}'];a24_0x2cc9=function(){return _0x165e5b;};return a24_0x2cc9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a25_0x423897=a25_0xbf7b;(function(_0x41d317,_0x291c49){const _0x439cb6=a25_0xbf7b,_0x1db87a=_0x41d317();while(!![]){try{const _0x3d608c=parseInt(_0x439cb6(0x1b0))/0x1+parseInt(_0x439cb6(0x193))/0x2+parseInt(_0x439cb6(0x172))/0x3*(parseInt(_0x439cb6(0x18f))/0x4)+-parseInt(_0x439cb6(0x190))/0x5*(parseInt(_0x439cb6(0x19f))/0x6)+parseInt(_0x439cb6(0x19a))/0x7+-parseInt(_0x439cb6(0x17e))/0x8+-parseInt(_0x439cb6(0x1a1))/0x9*(-parseInt(_0x439cb6(0x174))/0xa);if(_0x3d608c===_0x291c49)break;else _0x1db87a['push'](_0x1db87a['shift']());}catch(_0x2cbbb5){_0x1db87a['push'](_0x1db87a['shift']());}}}(a25_0x5367,0xf0448));function a25_0xbf7b(_0x389464,_0x4e7423){_0x389464=_0x389464-0x170;const _0x53671d=a25_0x5367();let _0xbf7be0=_0x53671d[_0x389464];return _0xbf7be0;}import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x3fc088){const _0x4fced5=a25_0xbf7b;if(_0x3fc088[_0x4fced5(0x1a4)])return null;const _0x3fff5e=Boolean(_0x3fc088['displayName']!==undefined||_0x3fc088['doType']!==undefined);let _0x4e5914={};if(!_0x3fff5e&&typeof _0x3fc088[_0x4fced5(0x170)]===_0x4fced5(0x176))try{_0x4e5914=JSON[_0x4fced5(0x192)](_0x3fc088[_0x4fced5(0x170)]);}catch{}const _0x412974=_0x3fff5e?_0x3fc088[_0x4fced5(0x1a8)]:_0x3fc088['code'],_0x5d0a0b=_0x3fff5e?_0x3fc088['displayName']:_0x3fc088[_0x4fced5(0x1a8)],_0x586441=_0x3fff5e?_0x3fc088[_0x4fced5(0x1b6)]:_0x3fc088[_0x4fced5(0x1b2)]||_0x3fc088[_0x4fced5(0x184)],_0x20abf7=_0x3fff5e?_0x3fc088[_0x4fced5(0x177)]===!![]:_0x4e5914[_0x4fced5(0x177)]===!![],_0x2d11de=_0x3fff5e?_0x3fc088[_0x4fced5(0x1a9)]===!![]:_0x4e5914['required']===!![],_0x1f925b=_0x3fff5e?_0x3fc088[_0x4fced5(0x198)]??null:_0x4e5914[_0x4fced5(0x198)]??null,_0xe00515={'name':_0x412974,'displayName':_0x5d0a0b||_0x412974,'type':_0x586441,'dbType':_0x3fc088[_0x4fced5(0x1b4)],'pk':_0x20abf7,'required':_0x2d11de,'description':_0x3fc088[_0x4fced5(0x18d)]||undefined};return Array[_0x4fced5(0x18b)](_0x1f925b)&&_0x1f925b[_0x4fced5(0x1ac)]>0x0&&(_0xe00515[_0x4fced5(0x198)]=_0x1f925b),_0xe00515;}function parseJsonMaybe(_0x22c7cc){const _0x468f48=a25_0xbf7b;if(typeof _0x22c7cc!==_0x468f48(0x176))return _0x22c7cc;try{return JSON[_0x468f48(0x192)](_0x22c7cc);}catch{return _0x22c7cc;}}function a25_0x5367(){const _0xf36ab7=['responseBody','code','isArray','host','description','relations','1559912PwSlEa','5KJYSlU','allFields','parse','964840FkQjRM','method','trim','find','filter','options','relatedPageInfoList','10307983fNyvqS','beforeScriptId','validateRules','operations','indexes','9560412bIjKTK','push','9744885dpJhpj','object','str','deleted','tableName','dataset','requestFields','name','required','read','dbName','length','modifierIdField','Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','updateTimeField','288673WhcShv','requestBody','type','responseFields','dbType','entries','doType','path','creatorIdField','extend','formatRules','9plmVqK','dbtableConfig','10uBYyaI','split','string','pkField','map','allFieldNames','fields','tableComment','createTimeField','creatorNameField','15350584fgBAyr','modelId','datasetKey','doVersion','columnCodeListWithDeleted','logicField','dataType','dblinkInfoDTO','appCode','dbId','afterScriptId'];a25_0x5367=function(){return _0xf36ab7;};return a25_0x5367();}function normalizeOperationEntry(_0x4a007f,_0x3339b5){const _0x5a7575=a25_0xbf7b;if(!_0x3339b5||typeof _0x3339b5!==_0x5a7575(0x1a2))return null;if(!_0x3339b5['method']||!_0x3339b5['path'])return null;const _0x4d1567={'name':_0x4a007f,'method':_0x3339b5[_0x5a7575(0x194)],'path':_0x3339b5[_0x5a7575(0x1b7)]};if(_0x3339b5['host'])_0x4d1567[_0x5a7575(0x18c)]=_0x3339b5[_0x5a7575(0x18c)];if(_0x3339b5[_0x5a7575(0x1b1)]!=null)_0x4d1567[_0x5a7575(0x1b1)]=parseJsonMaybe(_0x3339b5[_0x5a7575(0x1b1)]);if(_0x3339b5[_0x5a7575(0x189)]!=null)_0x4d1567[_0x5a7575(0x189)]=parseJsonMaybe(_0x3339b5[_0x5a7575(0x189)]);if(_0x3339b5['beforeScriptId']!=null)_0x4d1567[_0x5a7575(0x19b)]=_0x3339b5[_0x5a7575(0x19b)];if(_0x3339b5[_0x5a7575(0x188)]!=null)_0x4d1567['afterScriptId']=_0x3339b5[_0x5a7575(0x188)];if(Array[_0x5a7575(0x18b)](_0x3339b5[_0x5a7575(0x1a7)]))_0x4d1567[_0x5a7575(0x1a7)]=_0x3339b5[_0x5a7575(0x1a7)];if(Array['isArray'](_0x3339b5[_0x5a7575(0x1b3)]))_0x4d1567[_0x5a7575(0x1b3)]=_0x3339b5[_0x5a7575(0x1b3)];return _0x4d1567;}function summarizeDbtable(_0x1ca215){const _0x3c8468=a25_0xbf7b,_0x11fc9c={},_0x53b18e=[_0x3c8468(0x187),'dbName',_0x3c8468(0x1a5),_0x3c8468(0x180),_0x3c8468(0x177),_0x3c8468(0x191),_0x3c8468(0x183),_0x3c8468(0x17c),_0x3c8468(0x1af),_0x3c8468(0x1b8),_0x3c8468(0x17d),_0x3c8468(0x1ad),'modifierNameField','labelField',_0x3c8468(0x185)];for(const _0x5803d5 of _0x53b18e){if(_0x1ca215[_0x5803d5]!==undefined)_0x11fc9c[_0x5803d5]=_0x1ca215[_0x5803d5];}return typeof _0x11fc9c[_0x3c8468(0x191)]===_0x3c8468(0x176)&&_0x11fc9c[_0x3c8468(0x191)][_0x3c8468(0x1ac)]>0x0&&(_0x11fc9c[_0x3c8468(0x179)]=_0x11fc9c[_0x3c8468(0x191)]['split'](',')[_0x3c8468(0x178)](_0x5645d5=>_0x5645d5[_0x3c8468(0x195)]())[_0x3c8468(0x197)](Boolean)),_0x11fc9c;}function normalizeRelatedPages(_0x465e53){const _0x7b9fdd=a25_0xbf7b;if(!Array[_0x7b9fdd(0x18b)](_0x465e53))return[];return _0x465e53[_0x7b9fdd(0x197)](_0x48301a=>_0x48301a&&typeof _0x48301a===_0x7b9fdd(0x1a2))[_0x7b9fdd(0x178)](_0x3534af=>({'id':_0x3534af['id'],'type':_0x3534af[_0x7b9fdd(0x1b2)],'code':_0x3534af[_0x7b9fdd(0x18a)],'title':_0x3534af['title'],'deleted':_0x3534af[_0x7b9fdd(0x1a4)]===!![]}));}function normalizeFallbackFieldName(_0x52bb08,_0x950b90){const _0x485650=a25_0xbf7b,_0x5f30f8=_0x52bb08[_0x485650(0x195)]();if(!_0x5f30f8)return null;return{'name':_0x5f30f8,'displayName':_0x5f30f8,'type':undefined,'dbType':undefined,'pk':_0x5f30f8===_0x950b90,'required':![],'description':undefined};}async function loadListFieldFallback(_0x4f1a69,_0x5a3c9b){const _0x7aa57f=a25_0xbf7b;if(!_0x4f1a69||!_0x5a3c9b)return[];try{const _0x54c998=await listDatasets(_0x4f1a69,{'code':_0x5a3c9b}),_0x36de53=_0x54c998[_0x7aa57f(0x196)](_0x1e9194=>_0x1e9194[_0x7aa57f(0x18a)]===_0x5a3c9b)??_0x54c998[0x0],_0x53ed4=_0x36de53?.[_0x7aa57f(0x173)]??{},_0x245021=typeof _0x53ed4[_0x7aa57f(0x191)]==='string'?_0x53ed4[_0x7aa57f(0x191)][_0x7aa57f(0x175)](','):[];return _0x245021[_0x7aa57f(0x178)](_0xf22351=>normalizeFallbackFieldName(_0xf22351,_0x53ed4[_0x7aa57f(0x177)]))[_0x7aa57f(0x197)](_0x5c2c28=>_0x5c2c28!==null);}catch{return[];}}export const datasetDetail={'service':a25_0x423897(0x1a6),'command':'detail','description':a25_0x423897(0x1ae),'risk':a25_0x423897(0x1aa),'flags':[CODE_FLAG],async 'execute'(_0x331f4b){const _0xb8aa18=a25_0x423897,_0x5cab1d=await getDatasetDetail(_0x331f4b[_0xb8aa18(0x1a3)](_0xb8aa18(0x18a))),_0x179102=Array[_0xb8aa18(0x18b)](_0x5cab1d[_0xb8aa18(0x17a)])?_0x5cab1d[_0xb8aa18(0x17a)]:Array[_0xb8aa18(0x18b)](_0x5cab1d['properties'])?_0x5cab1d['properties']:[];let _0x34c937=_0x179102['map'](_0x27b7ef=>normalizeField(_0x27b7ef))[_0xb8aa18(0x197)](_0x49432e=>_0x49432e!==null);_0x34c937[_0xb8aa18(0x1ac)]===0x0&&(_0x34c937=await loadListFieldFallback(_0x331f4b[_0xb8aa18(0x186)],_0x331f4b['str'](_0xb8aa18(0x18a))));const _0x3c21af=_0x5cab1d[_0xb8aa18(0x19d)]??{},_0xc4b937=[];for(const [_0x25bb8e,_0xe89a74]of Object[_0xb8aa18(0x1b5)](_0x3c21af)){const _0x13be5f=normalizeOperationEntry(_0x25bb8e,_0xe89a74);if(_0x13be5f)_0xc4b937[_0xb8aa18(0x1a0)](_0x13be5f);}const _0x20a4ae=_0x5cab1d[_0xb8aa18(0x173)]??{},_0x4ca89d=_0x5cab1d['dataset']??{},_0x2b83b3=_0x20a4ae[_0xb8aa18(0x187)]!=null?{'id':_0x20a4ae[_0xb8aa18(0x187)],'name':_0x20a4ae[_0xb8aa18(0x1ab)]??null}:undefined;let _0x13b53d;return typeof _0x5cab1d[_0xb8aa18(0x170)]==='string'&&(_0x13b53d=parseJsonMaybe(_0x5cab1d[_0xb8aa18(0x170)])),{'ok':!![],'data':{'id':_0x5cab1d[_0xb8aa18(0x17f)]??_0x5cab1d['id'],'name':_0x5cab1d[_0xb8aa18(0x1a8)],'code':_0x5cab1d['modelCode']||_0x5cab1d['code'],'doVersion':_0x5cab1d[_0xb8aa18(0x181)],'description':_0x5cab1d[_0xb8aa18(0x18d)]||_0x4ca89d[_0xb8aa18(0x17b)]||undefined,'source':_0x5cab1d['source']||_0x4ca89d['sourceType'],'table':_0x20a4ae[_0xb8aa18(0x1a5)]||_0x4ca89d['tableName'],'datasetKey':_0x20a4ae[_0xb8aa18(0x180)],'pk':_0x20a4ae['pkField'],'db':_0x2b83b3,'dbtable':summarizeDbtable(_0x20a4ae),'fields':_0x34c937,'operations':_0xc4b937,'indexes':Array[_0xb8aa18(0x18b)](_0x4ca89d[_0xb8aa18(0x19e)])?_0x4ca89d['indexes']:[],'relations':_0x5cab1d[_0xb8aa18(0x18e)]??null,'relatedPages':normalizeRelatedPages(_0x5cab1d[_0xb8aa18(0x199)]),...Array['isArray'](_0x5cab1d[_0xb8aa18(0x182)])?{'columnCodeListWithDeleted':_0x5cab1d[_0xb8aa18(0x182)]}:{},'formatRules':Array['isArray'](_0x5cab1d[_0xb8aa18(0x171)])?_0x5cab1d[_0xb8aa18(0x171)]:[],'validateRules':Array[_0xb8aa18(0x18b)](_0x5cab1d[_0xb8aa18(0x19c)])?_0x5cab1d['validateRules']:[],..._0x13b53d!==undefined?{'extend':_0x13b53d}:{},'stats':{'fieldCount':_0x34c937[_0xb8aa18(0x1ac)],'operationCount':_0xc4b937['length']}}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x38e647,_0x3c5031){const _0xeb2b4c=a26_0x226a,_0x58a035=_0x38e647();while(!![]){try{const _0x13560d=-parseInt(_0xeb2b4c(0x171))/0x1+-parseInt(_0xeb2b4c(0x16d))/0x2+-parseInt(_0xeb2b4c(0x16c))/0x3+-parseInt(_0xeb2b4c(0x170))/0x4+-parseInt(_0xeb2b4c(0x16f))/0x5*(-parseInt(_0xeb2b4c(0x173))/0x6)+parseInt(_0xeb2b4c(0x16e))/0x7*(parseInt(_0xeb2b4c(0x16b))/0x8)+parseInt(_0xeb2b4c(0x172))/0x9;if(_0x13560d===_0x3c5031)break;else _0x58a035['push'](_0x58a035['shift']());}catch(_0x3aaf8a){_0x58a035['push'](_0x58a035['shift']());}}}(a26_0x1f77,0xca0af));function a26_0x1f77(){const _0x276c70=['755544SyjQYD','3404601obaLqU','785438oBLRek','28HHtPBo','2830qvtjii','3080772KergAR','687677UJVYsd','30311073QtNINE','714wXhwMc'];a26_0x1f77=function(){return _0x276c70;};return a26_0x1f77();}function a26_0x226a(_0x22f395,_0x54868a){_0x22f395=_0x22f395-0x16b;const _0x1f774d=a26_0x1f77();let _0x226aff=_0x1f774d[_0x22f395];return _0x226aff;}import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a27_0x2191(){const _0x9e944d=['allFields','1071045OxSaak','8VzRUpC','dbtableConfig','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','code','1866368CZNVJd','name','88758VZDxoY','2363662fGahTd','5976558nikVRR','7168280CsstpF','dataset','string','pkField','source','91334rxYNLP','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','list','1iuFxAh','split','datasetKey','tableName','str','135mUKvOP','map'];a27_0x2191=function(){return _0x9e944d;};return a27_0x2191();}const a27_0x14e97e=a27_0x3e3a;(function(_0x31ed64,_0x4ff505){const _0x410ee8=a27_0x3e3a,_0x400b52=_0x31ed64();while(!![]){try{const _0x397109=parseInt(_0x410ee8(0x1eb))/0x1*(-parseInt(_0x410ee8(0x1e8))/0x2)+parseInt(_0x410ee8(0x1f3))/0x3*(parseInt(_0x410ee8(0x1f4))/0x4)+parseInt(_0x410ee8(0x1f0))/0x5*(-parseInt(_0x410ee8(0x1e0))/0x6)+parseInt(_0x410ee8(0x1e1))/0x7+-parseInt(_0x410ee8(0x1de))/0x8+-parseInt(_0x410ee8(0x1e2))/0x9+parseInt(_0x410ee8(0x1e3))/0xa;if(_0x397109===_0x4ff505)break;else _0x400b52['push'](_0x400b52['shift']());}catch(_0x57fe43){_0x400b52['push'](_0x400b52['shift']());}}}(a27_0x2191,0x68068));import{listDatasets}from'../../core/api-client.js';function a27_0x3e3a(_0x462128,_0x2a13f6){_0x462128=_0x462128-0x1dd;const _0x2191d6=a27_0x2191();let _0x3e3a20=_0x2191d6[_0x462128];return _0x3e3a20;}import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a27_0x14e97e(0x1e4),'command':a27_0x14e97e(0x1ea),'description':a27_0x14e97e(0x1f6),'risk':'read','flags':[{'name':'name','type':a27_0x14e97e(0x1e5),'description':'Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)'},{...CODE_FLAG,'required':![],'description':a27_0x14e97e(0x1e9)}],async 'execute'(_0x1ca3c3){const _0x421bbc=a27_0x14e97e,_0x52ea71=_0x1ca3c3[_0x421bbc(0x1ef)](_0x421bbc(0x1df)),_0x409184=_0x1ca3c3[_0x421bbc(0x1ef)](_0x421bbc(0x1dd)),_0x3be0c1=await listDatasets(_0x1ca3c3['appCode'],{..._0x52ea71&&{'name':_0x52ea71},..._0x409184&&{'code':_0x409184}});return{'ok':!![],'data':{'total':_0x3be0c1['length'],'datasets':_0x3be0c1['map'](_0x314847=>{const _0x5dff97=_0x421bbc,_0x54f45c=_0x314847[_0x5dff97(0x1f5)]??{};return{'id':_0x314847['id'],'code':_0x314847['code'],'name':_0x314847[_0x5dff97(0x1df)],'source':_0x314847[_0x5dff97(0x1e7)],'description':_0x314847['description'],'table':_0x54f45c[_0x5dff97(0x1ee)],'datasetKey':_0x54f45c[_0x5dff97(0x1ed)],'pk':_0x54f45c[_0x5dff97(0x1e6)],'fields':_0x54f45c[_0x5dff97(0x1f2)]?_0x54f45c[_0x5dff97(0x1f2)][_0x5dff97(0x1ec)](',')[_0x5dff97(0x1f1)](_0x23ecfa=>_0x23ecfa['trim']()):[]};})}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0x1fd622=a28_0x23e8;(function(_0x115ff6,_0x50080c){const _0x2f9449=a28_0x23e8,_0x1a8c02=_0x115ff6();while(!![]){try{const _0x3d39e2=-parseInt(_0x2f9449(0xed))/0x1+parseInt(_0x2f9449(0xdf))/0x2*(-parseInt(_0x2f9449(0xee))/0x3)+parseInt(_0x2f9449(0xe0))/0x4*(parseInt(_0x2f9449(0xe3))/0x5)+parseInt(_0x2f9449(0xe4))/0x6*(-parseInt(_0x2f9449(0xe8))/0x7)+-parseInt(_0x2f9449(0xe7))/0x8+parseInt(_0x2f9449(0xe9))/0x9+parseInt(_0x2f9449(0xea))/0xa;if(_0x3d39e2===_0x50080c)break;else _0x1a8c02['push'](_0x1a8c02['shift']());}catch(_0x4cb482){_0x1a8c02['push'](_0x1a8c02['shift']());}}}(a28_0x41e8,0xd71ec));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';function a28_0x41e8(){const _0x53ddb6=['Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','1387371SPiZWG','24jpRVeb','sdk-doc','appCode','210544wRhGJg','12KpdKaV','string','read','2706990IhwHNF','135606HVBunW','code','dataset','2940240kzFgxa','301CZCtGV','1455318ULxWNy','26641560BHzlyX'];a28_0x41e8=function(){return _0x53ddb6;};return a28_0x41e8();}import{CODE_FLAG}from'../../commands/common/flags.js';function a28_0x23e8(_0x35fba3,_0x3448d2){_0x35fba3=_0x35fba3-0xde;const _0x41e886=a28_0x41e8();let _0x23e864=_0x41e886[_0x35fba3];return _0x23e864;}const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档';export function formatDatasetSdkMarkdown(_0x363597){const _0x15a0b1=a28_0x23e8,_0x256fe8=typeof _0x363597===_0x15a0b1(0xe1)?_0x363597['trim']():'';return _0x256fe8||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a28_0x1fd622(0xe6),'command':a28_0x1fd622(0xef),'description':a28_0x1fd622(0xec),'risk':a28_0x1fd622(0xe2),'flags':[{...CODE_FLAG,'description':a28_0x1fd622(0xeb)}],async 'execute'(_0x1a266a){const _0x214219=a28_0x1fd622,_0x2c0483=_0x1a266a['str'](_0x214219(0xe5)),_0x43609c=await getDatasetSdkUsageDoc(_0x2c0483,_0x1a266a[_0x214219(0xde)]);return{'ok':!![],'data':{'code':_0x2c0483,'appCode':_0x1a266a[_0x214219(0xde)],'markdown':formatDatasetSdkMarkdown(_0x43609c)}};}};
|