@lovrabet/lovrabet-cli 2.3.7 → 2.3.8-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- 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/approval/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/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.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/diagram.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/diagram.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/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.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/region.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/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.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/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.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/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/skills/builtin-skill.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/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.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/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.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 +2 -2
- package/skills/lovrabet/SKILL.md +2 -2
- package/skills/lovrabet.manifest.json +3 -3
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x357f71,_0x2a46f4){const _0x1241bd=a124_0x5002,_0x3b588a=_0x357f71();while(!![]){try{const _0x36d7c8=parseInt(_0x1241bd(0xbb))/0x1+-parseInt(_0x1241bd(0xb9))/0x2*(parseInt(_0x1241bd(0xa4))/0x3)+-parseInt(_0x1241bd(0xb5))/0x4+parseInt(_0x1241bd(0x80))/0x5*(-parseInt(_0x1241bd(0x85))/0x6)+parseInt(_0x1241bd(0x96))/0x7*(parseInt(_0x1241bd(0x84))/0x8)+-parseInt(_0x1241bd(0x97))/0x9+parseInt(_0x1241bd(0x99))/0xa*(parseInt(_0x1241bd(0x9c))/0xb);if(_0x36d7c8===_0x2a46f4)break;else _0x3b588a['push'](_0x3b588a['shift']());}catch(_0x498fcb){_0x3b588a['push'](_0x3b588a['shift']());}}}(a124_0x5e5b,0x8cf2e));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{assertKnownCommandFlags}from'../framework/raw-flags.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{assertCliVersionSupported,checkCliVersion}from'../utils/cli-version-check.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x2ec503){const _0x137709=a124_0x5002;return void _0x2ec503,AUTH_MODE[_0x137709(0x7c)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x296ea9,_0x369df5){const _0xa9bd8a=a124_0x5002,_0x3299fb=typeof _0x369df5[_0xa9bd8a(0x8f)]===_0xa9bd8a(0x92)&&_0x369df5['app'][_0xa9bd8a(0xa8)]();return{'rawFlags':_0x369df5,'appCode':_0x296ea9[_0xa9bd8a(0x83)]||productEnv(_0xa9bd8a(0xb8))||(_0x3299fb?undefined:readAppCodeFromConfig()),'appCodeSource':_0x296ea9['appCodeSource'],'apiDomain':getApiDomain(),'runtimeDomain':getRuntimeDomain(),'isNonInteractive':isNonInteractiveMode(_0x369df5),'defaultFormat':_0x296ea9['format'],'defaultPageSize':_0x296ea9[_0xa9bd8a(0xb6)],'defaultVerbose':_0x296ea9[_0xa9bd8a(0xaa)],'riskLevel':_0x296ea9['riskLevel'],'nativeToolAvailable':_0x296ea9[_0xa9bd8a(0x82)],'accessKey':_0x296ea9[_0xa9bd8a(0xa6)],'env':_0x296ea9[_0xa9bd8a(0x9d)],'mergedCli':{'defaultApp':_0x296ea9[_0xa9bd8a(0x93)],'currentApp':_0x296ea9['currentApp'],'appCode':_0x296ea9[_0xa9bd8a(0x83)]}};}export function createLovrabetRunnerAdapter(_0x3a0834={}){const _0x2fcdb3=a124_0x5002,_0x46f950={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x2fcdb3(0xb0)](_0x484523=>PIPELINE_FLAG_NAMES[_0x2fcdb3(0x90)](_0x484523[_0x2fcdb3(0x7a)]))[_0x2fcdb3(0x7d)](({name:_0x1feb78,type:_0x1a6b96,description:_0x166613})=>({'name':_0x1feb78,'type':_0x1a6b96,'description':_0x166613})),'formatOutput':_0x3a0834['formatOutput']??formatOutput,'getCommandLabel'(_0x584d54){const _0x25af4f=_0x2fcdb3;return CLI_BIN_NAME+'\x20'+_0x584d54[_0x25af4f(0x8d)]+'\x20'+_0x584d54[_0x25af4f(0x9a)];},'riskPolicy':{'onViolation'(_0x866cdd,{def:_0x3b3efe,env:_0x435c41}){const _0x2286e6=_0x2fcdb3;if(shouldRouteWriteToNativeTool(_0x3b3efe,_0x435c41))return;console[_0x2286e6(0xa2)](_0x866cdd);},'createError'(_0x5e53d2,{def:_0x2fd200,env:_0x30bdc9}){const _0x11dca9=_0x2fcdb3;if(shouldRouteWriteToNativeTool(_0x2fd200,_0x30bdc9))return CliErrors['nativeToolRequired'](CLI_BIN_NAME+'\x20'+_0x2fd200[_0x11dca9(0x8d)]+'\x20'+_0x2fd200['command']);return CliErrors[_0x11dca9(0x9b)](_0x5e53d2);}},async 'prepare'(_0x3240e2,_0x1a03d7){const _0x23937b=_0x2fcdb3,_0x16531a=resolveAuthMode(_0x1a03d7);if(_0x3240e2[_0x23937b(0xab)]!==![]){if(!_0x1a03d7[_0x23937b(0xa6)])throw CliErrors['authRequired']('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x23937b(0xac)]+_0x23937b(0x8e)+productEnvName(_0x23937b(0xb7))+'.');const {setActiveAK:_0xf6e7fe}=await import(_0x23937b(0xa9));_0xf6e7fe(_0x1a03d7[_0x23937b(0xa6)]);}let _0x157878='';if(_0x3240e2[_0x23937b(0xba)]!==![]){_0x157878=_0x1a03d7[_0x23937b(0x83)]??'',_0x157878=await resolveExplicitAppName(_0x3240e2,_0x1a03d7,_0x157878);if(!_0x157878){await assertSelectedAppNameIsRuntimeAccessible(_0x3240e2,_0x1a03d7);throw CliErrors['configMissing']('Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20'+PRODUCT_CONFIG[_0x23937b(0xac)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x3240e2,_0x1a03d7,_0x157878);}if(_0x157878){const {initSdkClient:_0x94e308}=await import('../core/sdk-client.js');_0x94e308({'appCode':_0x157878,'env':_0x1a03d7['env']??'production','runtimeDomain':_0x1a03d7[_0x23937b(0xa7)],'accessKey':_0x1a03d7['accessKey'],'authMode':_0x16531a}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x1a03d7[_0x23937b(0x8b)]},'numbers':{'pagesize':_0x1a03d7[_0x23937b(0x94)]}},'extras':{'appCode':_0x157878,'cookie':'','apiDomain':_0x1a03d7[_0x23937b(0x8c)],'apiDir':'','accessKey':_0x1a03d7[_0x23937b(0xa6)],'envName':_0x1a03d7[_0x23937b(0x9d)],'mergedCli':_0x1a03d7['mergedCli']}};},'confirmHighRisk':_0x3a0834[_0x2fcdb3(0x76)]??(async({def:_0x1e0ba5,env:_0x113ecd,flags:_0x55439b,commandLabel:_0xfeea60})=>{const _0x41e2ae=_0x2fcdb3;if(_0x113ecd[_0x41e2ae(0xb4)]){const _0x40c84a=reconstructCommandArgv(_0x1e0ba5,_0x55439b);throw CliErrors[_0x41e2ae(0x79)](_0x41e2ae(0x78)+_0xfeea60+_0x41e2ae(0x89)+('\x20\x20To\x20proceed:\x20'+_0x40c84a));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x1e0ba5,_0xfeea60,_0x55439b),'createCancelledError':_0x5cde31=>CliErrors[_0x41e2ae(0x9b)](_0x5cde31)});}),'mapDryRunError'(_0x38b025){return mapUserFacingExecuteError(_0x38b025);},'mapExecuteError'(_0xd7124){return mapUserFacingExecuteError(_0xd7124);},async 'finalize'(){await finalizeLovrabetRuntimeState();}};return _0x46f950;}function a124_0x5002(_0x49b97e,_0x41063c){_0x49b97e=_0x49b97e-0x75;const _0x5e5b7e=a124_0x5e5b();let _0x5002a7=_0x5e5b7e[_0x49b97e];return _0x5002a7;}function shouldRouteWriteToNativeTool(_0x58478a,_0x1996ed){const _0x50369e=a124_0x5002;return _0x1996ed['nativeToolAvailable']===!![]&&(_0x58478a['risk']===_0x50369e(0x86)||_0x58478a['risk']===_0x50369e(0xbc));}const terminalRunnerAdapter=createLovrabetRunnerAdapter();export async function finalizeLovrabetRuntimeState(){const _0x45d534=a124_0x5002;try{if(sdkClientInitialized){const {clearSdkClient:_0x7e4df}=await import(_0x45d534(0xa5));_0x7e4df();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x43f4d5}=await import(_0x45d534(0xa9));_0x43f4d5();}}async function resolveExplicitAppName(_0x1da275,_0xb99efc,_0x6d2d8a){const _0x123c47=a124_0x5002;if(_0x1da275[_0x123c47(0xba)]===![])return _0x6d2d8a;const _0x48dcc4=typeof _0xb99efc[_0x123c47(0xa0)][_0x123c47(0x8f)]===_0x123c47(0x92)?_0xb99efc[_0x123c47(0xa0)][_0x123c47(0x8f)]['trim']():'';if(!_0x48dcc4)return _0x6d2d8a;const _0x1c962a=typeof _0xb99efc[_0x123c47(0xa0)]['appcode']===_0x123c47(0x92)&&_0xb99efc[_0x123c47(0xa0)][_0x123c47(0x91)][_0x123c47(0xa8)]()||productEnv(_0x123c47(0xb8));if(_0x1c962a||_0xb99efc[_0x123c47(0xaf)]===_0x123c47(0x87))return _0x6d2d8a;const {getRemoteAppList:_0x442383}=await import(_0x123c47(0x7e)),_0x2df9d0=await _0x442383({'env':_0xb99efc['env']??'production','accessKey':_0xb99efc[_0x123c47(0xa6)]}),_0x37b9aa=findAppByName(_0x2df9d0['items'],_0x48dcc4);if(_0x37b9aa&&!isRuntimeAccessibleApp(_0x37b9aa))throw runtimeInaccessibleAppError(_0x37b9aa,'\x22'+_0x48dcc4+'\x22');const _0x59c2c3=_0x37b9aa?.[_0x123c47(0x83)]?.[_0x123c47(0xa8)]();if(_0x59c2c3)return _0x59c2c3;throw CliErrors[_0x123c47(0x79)](_0x123c47(0xa3)+_0x48dcc4,_0x123c47(0xb1)+CLI_BIN_NAME+_0x123c47(0x98)+_0x48dcc4+_0x123c47(0xb2)+PRODUCT_CONFIG[_0x123c47(0xac)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0xcade9,_0x4bf725){const _0x2b3ae7=a124_0x5002;if(_0xcade9['requiresAppCode']===![]||!_0x4bf725[_0x2b3ae7(0xa6)])return;const _0x23fe5a=(typeof _0x4bf725[_0x2b3ae7(0xa0)][_0x2b3ae7(0x8f)]===_0x2b3ae7(0x92)&&_0x4bf725[_0x2b3ae7(0xa0)][_0x2b3ae7(0x8f)][_0x2b3ae7(0xa8)]()?_0x4bf725['rawFlags'][_0x2b3ae7(0x8f)]:_0x4bf725[_0x2b3ae7(0xa1)]?.[_0x2b3ae7(0x9f)]??_0x4bf725[_0x2b3ae7(0xa1)]?.['defaultApp'])?.[_0x2b3ae7(0xa8)]();if(!_0x23fe5a)return;const {getRemoteAppList:_0x4de130}=await import(_0x2b3ae7(0x7e)),_0x4acda6=await _0x4de130({'env':_0x4bf725[_0x2b3ae7(0x9d)]??_0x2b3ae7(0x77),'accessKey':_0x4bf725[_0x2b3ae7(0xa6)]}),_0x2fbebb=findAppByName(_0x4acda6[_0x2b3ae7(0x88)],_0x23fe5a);if(_0x2fbebb&&!isRuntimeAccessibleApp(_0x2fbebb))throw runtimeInaccessibleAppError(_0x2fbebb,'\x22'+_0x23fe5a+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x146356,_0x2acda2,_0x1e1a11){const _0x736f3a=a124_0x5002;if(_0x146356[_0x736f3a(0xba)]===![]||!_0x2acda2[_0x736f3a(0xa6)])return;const {getRemoteAppList:_0x4af887}=await import(_0x736f3a(0x7e)),_0x3320b9=await _0x4af887({'env':_0x2acda2[_0x736f3a(0x9d)]??_0x736f3a(0x77),'accessKey':_0x2acda2[_0x736f3a(0xa6)]}),_0x532f0b=findAppByCode(_0x3320b9[_0x736f3a(0x88)],_0x1e1a11);if(_0x532f0b&&!isRuntimeAccessibleApp(_0x532f0b))throw runtimeInaccessibleAppError(_0x532f0b,_0x736f3a(0x8a)+_0x1e1a11+'\x22');}export async function runCommand(_0x1989aa,_0x34d8cb,_0x43ecf5=terminalRunnerAdapter){const _0x4b2b2b=a124_0x5002;assertKnownCommandFlags(_0x1989aa,_0x34d8cb[_0x4b2b2b(0xa0)]),await runCommandWithAdapter(shouldApplyVersionPolicy(_0x1989aa)?withVersionPolicy(_0x1989aa):_0x1989aa,_0x34d8cb,_0x43ecf5);}function a124_0x5e5b(){const _0x39a5fb=['`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','appcode\x20\x22','defaultVerbose','apiDomain','service','\x20or\x20pass\x20','app','has','appcode','string','defaultApp','defaultPageSize','nonInteractive','255318RfUcBu','7529607ZLhesO','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','1240AIwUoS','command','cancelled','210386OfuIto','env','_notice','currentApp','rawFlags','mergedCli','error','Unknown\x20app:\x20','3jANmzp','../core/sdk-client.js','accessKey','runtimeDomain','trim','../core/api-client.js','verbose','requiresAuth','newConfigFileName','catch','cli-skill','appCodeSource','filter','Run\x20`','.appcode\x20to\x20','install','isNonInteractive','3121908CZqaPP','pageSize','ACCESS_KEY','APPCODE','2025694bYXcqq','requiresAppCode','863387nMXnMk','high-risk-write','schema','confirmHighRisk','production','High-risk\x20operation\x20`','validation','name','resolve','ClientAk','map','../commands/app/remote-source.js','includes','5EMHLKt','object','nativeToolAvailable','appCode','208hYkrNc','5856372OOVtqp','write','local-alias','items'];a124_0x5e5b=function(){return _0x39a5fb;};return a124_0x5e5b();}function shouldApplyVersionPolicy(_0x18d859){const _0xf08618=a124_0x5002;if(['update',_0xf08618(0x75),'doctor'][_0xf08618(0x7f)](_0x18d859[_0xf08618(0x8d)]))return![];return!(_0x18d859[_0xf08618(0x8d)]===_0xf08618(0xae)&&_0x18d859['command']===_0xf08618(0xb3));}function withVersionPolicy(_0x56ff7e){return{..._0x56ff7e,async 'execute'(_0x525105){const _0x2e7c38=a124_0x5002,_0x7af2ad=await checkCliVersion();assertCliVersionSupported(_0x7af2ad);const _0x3cf25f=shouldResolveUpdateNotice(_0x525105)?resolveLatestUpdateNotice(_0x7af2ad)[_0x2e7c38(0xad)](()=>null):Promise[_0x2e7c38(0x7b)](null),_0x3b972c=await _0x56ff7e['execute'](_0x525105);return attachUpdateNotice(_0x3b972c,await _0x3cf25f);}};}function shouldResolveUpdateNotice(_0x583cc7){const _0x2e9747=a124_0x5002;return _0x583cc7['format']==='pretty'&&!_0x583cc7[_0x2e9747(0x95)];}function attachUpdateNotice(_0x4f3ecb,_0x2ac1b8){const _0x59560a=a124_0x5002;if(!_0x2ac1b8||!_0x4f3ecb||typeof _0x4f3ecb!=='object')return _0x4f3ecb;const _0x4d492d=_0x4f3ecb,_0x3ac149=typeof _0x4d492d['_notice']===_0x59560a(0x81)&&_0x4d492d[_0x59560a(0x9e)]!==null?_0x4d492d[_0x59560a(0x9e)]:{};return{..._0x4d492d,'_notice':{..._0x3ac149,'update':_0x2ac1b8}};}
|
|
1
|
+
(function(_0x206489,_0x4df318){const _0x59b5f6=a124_0x4cb4,_0x264ca9=_0x206489();while(!![]){try{const _0x4c3fe1=parseInt(_0x59b5f6(0x13f))/0x1+parseInt(_0x59b5f6(0x104))/0x2+-parseInt(_0x59b5f6(0x13c))/0x3*(-parseInt(_0x59b5f6(0x13b))/0x4)+-parseInt(_0x59b5f6(0x126))/0x5*(parseInt(_0x59b5f6(0x145))/0x6)+-parseInt(_0x59b5f6(0x13a))/0x7*(parseInt(_0x59b5f6(0x141))/0x8)+parseInt(_0x59b5f6(0x143))/0x9+parseInt(_0x59b5f6(0x10a))/0xa;if(_0x4c3fe1===_0x4df318)break;else _0x264ca9['push'](_0x264ca9['shift']());}catch(_0x594f5a){_0x264ca9['push'](_0x264ca9['shift']());}}}(a124_0x4b12,0xd04b0));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{assertKnownCommandFlags}from'../framework/raw-flags.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';function a124_0x4b12(){const _0x504d64=['requiresAppCode','currentApp','1614758kDaeWT','resolve','High-risk\x20operation\x20`','Run\x20`','error','format','1764180pJFEvW','APPCODE','ACCESS_KEY','install','ClientAk','../core/api-client.js','command','isNonInteractive','update','rawFlags','\x20or\x20pass\x20','../commands/app/remote-source.js','accessKey','\x20\x20To\x20proceed:\x20','map','execute','newConfigFileName','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','filter','requiresAuth','string','cancelled','catch','riskLevel','nativeToolRequired','trim','env','Unknown\x20app:\x20','2815kKjRnM','appCode','validation','defaultPageSize','production','pageSize','configMissing','appcode','local-alias','runtimeDomain','defaultApp','items','formatOutput','name','has','.appcode\x20to\x20','pretty','risk','mergedCli','confirmHighRisk','8894277qPmKrQ','36wWFoFk','191094fmmSuK','doctor','cli-skill','281850ggwbLq','app','8UWBbnO','appCodeSource','5264361sbHmjP','object','3198YswGtu','service','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','_notice'];a124_0x4b12=function(){return _0x504d64;};return a124_0x4b12();}import{assertCliVersionSupported,checkCliVersion}from'../utils/cli-version-check.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x504a92){const _0x4cf69a=a124_0x4cb4;return void _0x504a92,AUTH_MODE[_0x4cf69a(0x10e)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x51059e,_0x48c14e){const _0x4cc1da=a124_0x4cb4,_0x257e7a=typeof _0x48c14e[_0x4cc1da(0x140)]==='string'&&_0x48c14e['app'][_0x4cc1da(0x123)]();return{'rawFlags':_0x48c14e,'appCode':_0x51059e[_0x4cc1da(0x127)]||productEnv('APPCODE')||(_0x257e7a?undefined:readAppCodeFromConfig()),'appCodeSource':_0x51059e[_0x4cc1da(0x142)],'apiDomain':getApiDomain(),'runtimeDomain':getRuntimeDomain(),'isNonInteractive':isNonInteractiveMode(_0x48c14e),'defaultFormat':_0x51059e[_0x4cc1da(0x109)],'defaultPageSize':_0x51059e[_0x4cc1da(0x12b)],'defaultVerbose':_0x51059e['verbose'],'riskLevel':_0x51059e[_0x4cc1da(0x121)],'nativeToolAvailable':_0x51059e['nativeToolAvailable'],'accessKey':_0x51059e[_0x4cc1da(0x116)],'env':_0x51059e[_0x4cc1da(0x124)],'mergedCli':{'defaultApp':_0x51059e['defaultApp'],'currentApp':_0x51059e[_0x4cc1da(0x103)],'appCode':_0x51059e[_0x4cc1da(0x127)]}};}export function createLovrabetRunnerAdapter(_0x302211={}){const _0x347c01=a124_0x4cb4,_0x355c09={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x347c01(0x11c)](_0x3fdd0f=>PIPELINE_FLAG_NAMES[_0x347c01(0x134)](_0x3fdd0f[_0x347c01(0x133)]))[_0x347c01(0x118)](({name:_0x333275,type:_0x3b0bba,description:_0x43d893})=>({'name':_0x333275,'type':_0x3b0bba,'description':_0x43d893})),'formatOutput':_0x302211[_0x347c01(0x132)]??formatOutput,'getCommandLabel'(_0x2ebd19){const _0x5551fe=_0x347c01;return CLI_BIN_NAME+'\x20'+_0x2ebd19[_0x5551fe(0x146)]+'\x20'+_0x2ebd19[_0x5551fe(0x110)];},'riskPolicy':{'onViolation'(_0x1d81d6,{def:_0x49a550,env:_0x250fcc}){const _0x1b5d75=_0x347c01;if(shouldRouteWriteToNativeTool(_0x49a550,_0x250fcc))return;console[_0x1b5d75(0x108)](_0x1d81d6);},'createError'(_0x4b572c,{def:_0x1821fc,env:_0x2a1be5}){const _0x6dc829=_0x347c01;if(shouldRouteWriteToNativeTool(_0x1821fc,_0x2a1be5))return CliErrors[_0x6dc829(0x122)](CLI_BIN_NAME+'\x20'+_0x1821fc[_0x6dc829(0x146)]+'\x20'+_0x1821fc['command']);return CliErrors[_0x6dc829(0x11f)](_0x4b572c);}},async 'prepare'(_0x37f963,_0x532677){const _0x405f7e=_0x347c01,_0x39b280=resolveAuthMode(_0x532677);if(_0x37f963[_0x405f7e(0x11d)]!==![]){if(!_0x532677['accessKey'])throw CliErrors['authRequired']('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+_0x405f7e(0x114)+productEnvName(_0x405f7e(0x10c))+'.');const {setActiveAK:_0x30fe00}=await import(_0x405f7e(0x10f));_0x30fe00(_0x532677[_0x405f7e(0x116)]);}let _0x2396d8='';if(_0x37f963[_0x405f7e(0x149)]!==![]){_0x2396d8=_0x532677[_0x405f7e(0x127)]??'',_0x2396d8=await resolveExplicitAppName(_0x37f963,_0x532677,_0x2396d8);if(!_0x2396d8){await assertSelectedAppNameIsRuntimeAccessible(_0x37f963,_0x532677);throw CliErrors[_0x405f7e(0x12c)](_0x405f7e(0x11b)+PRODUCT_CONFIG['newConfigFileName']+'.');}await assertAppCodeIsRuntimeAccessible(_0x37f963,_0x532677,_0x2396d8);}if(_0x2396d8){const {initSdkClient:_0x3283a7}=await import('../core/sdk-client.js');_0x3283a7({'appCode':_0x2396d8,'env':_0x532677[_0x405f7e(0x124)]??_0x405f7e(0x12a),'runtimeDomain':_0x532677[_0x405f7e(0x12f)],'accessKey':_0x532677[_0x405f7e(0x116)],'authMode':_0x39b280}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x532677['defaultVerbose']},'numbers':{'pagesize':_0x532677[_0x405f7e(0x129)]}},'extras':{'appCode':_0x2396d8,'cookie':'','apiDomain':_0x532677['apiDomain'],'apiDir':'','accessKey':_0x532677['accessKey'],'envName':_0x532677[_0x405f7e(0x124)],'mergedCli':_0x532677[_0x405f7e(0x138)]}};},'confirmHighRisk':_0x302211[_0x347c01(0x139)]??(async({def:_0x2b0c62,env:_0x54656d,flags:_0x2b71b4,commandLabel:_0x2cd7c5})=>{const _0x2ebf68=_0x347c01;if(_0x54656d[_0x2ebf68(0x111)]){const _0x5d157e=reconstructCommandArgv(_0x2b0c62,_0x2b71b4);throw CliErrors[_0x2ebf68(0x128)](_0x2ebf68(0x106)+_0x2cd7c5+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0x2ebf68(0x117)+_0x5d157e));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x2b0c62,_0x2cd7c5,_0x2b71b4),'createCancelledError':_0x40ec00=>CliErrors[_0x2ebf68(0x11f)](_0x40ec00)});}),'mapDryRunError'(_0x53a34b){return mapUserFacingExecuteError(_0x53a34b);},'mapExecuteError'(_0x2cd016){return mapUserFacingExecuteError(_0x2cd016);},async 'finalize'(){await finalizeLovrabetRuntimeState();}};return _0x355c09;}function shouldRouteWriteToNativeTool(_0x47fa10,_0x4a437a){const _0x209bc1=a124_0x4cb4;return _0x4a437a['nativeToolAvailable']===!![]&&(_0x47fa10[_0x209bc1(0x137)]==='write'||_0x47fa10[_0x209bc1(0x137)]==='high-risk-write');}const terminalRunnerAdapter=createLovrabetRunnerAdapter();export async function finalizeLovrabetRuntimeState(){const _0x5d88d5=a124_0x4cb4;try{if(sdkClientInitialized){const {clearSdkClient:_0x45c5b1}=await import('../core/sdk-client.js');_0x45c5b1();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x33ec46}=await import(_0x5d88d5(0x10f));_0x33ec46();}}async function resolveExplicitAppName(_0x168226,_0x2f79b6,_0x1e483d){const _0x56d57f=a124_0x4cb4;if(_0x168226[_0x56d57f(0x149)]===![])return _0x1e483d;const _0x569a46=typeof _0x2f79b6[_0x56d57f(0x113)][_0x56d57f(0x140)]==='string'?_0x2f79b6[_0x56d57f(0x113)][_0x56d57f(0x140)][_0x56d57f(0x123)]():'';if(!_0x569a46)return _0x1e483d;const _0x8143c3=typeof _0x2f79b6[_0x56d57f(0x113)]['appcode']===_0x56d57f(0x11e)&&_0x2f79b6[_0x56d57f(0x113)][_0x56d57f(0x12d)][_0x56d57f(0x123)]()||productEnv(_0x56d57f(0x10b));if(_0x8143c3||_0x2f79b6['appCodeSource']===_0x56d57f(0x12e))return _0x1e483d;const {getRemoteAppList:_0x309e70}=await import('../commands/app/remote-source.js'),_0x28158b=await _0x309e70({'env':_0x2f79b6[_0x56d57f(0x124)]??_0x56d57f(0x12a),'accessKey':_0x2f79b6[_0x56d57f(0x116)]}),_0x1fdef2=findAppByName(_0x28158b[_0x56d57f(0x131)],_0x569a46);if(_0x1fdef2&&!isRuntimeAccessibleApp(_0x1fdef2))throw runtimeInaccessibleAppError(_0x1fdef2,'\x22'+_0x569a46+'\x22');const _0x212509=_0x1fdef2?.[_0x56d57f(0x127)]?.[_0x56d57f(0x123)]();if(_0x212509)return _0x212509;throw CliErrors[_0x56d57f(0x128)](_0x56d57f(0x125)+_0x569a46,_0x56d57f(0x107)+CLI_BIN_NAME+_0x56d57f(0x147)+_0x569a46+_0x56d57f(0x135)+PRODUCT_CONFIG[_0x56d57f(0x11a)]+'.');}function a124_0x4cb4(_0x3b44e5,_0x4ec254){_0x3b44e5=_0x3b44e5-0x103;const _0x4b12cc=a124_0x4b12();let _0x4cb4b5=_0x4b12cc[_0x3b44e5];return _0x4cb4b5;}async function assertSelectedAppNameIsRuntimeAccessible(_0x382d6e,_0x52daf6){const _0x5ee55a=a124_0x4cb4;if(_0x382d6e[_0x5ee55a(0x149)]===![]||!_0x52daf6['accessKey'])return;const _0x9a5a11=(typeof _0x52daf6[_0x5ee55a(0x113)][_0x5ee55a(0x140)]===_0x5ee55a(0x11e)&&_0x52daf6['rawFlags'][_0x5ee55a(0x140)]['trim']()?_0x52daf6[_0x5ee55a(0x113)]['app']:_0x52daf6[_0x5ee55a(0x138)]?.['currentApp']??_0x52daf6[_0x5ee55a(0x138)]?.[_0x5ee55a(0x130)])?.[_0x5ee55a(0x123)]();if(!_0x9a5a11)return;const {getRemoteAppList:_0x8629ef}=await import(_0x5ee55a(0x115)),_0x5e4a70=await _0x8629ef({'env':_0x52daf6[_0x5ee55a(0x124)]??_0x5ee55a(0x12a),'accessKey':_0x52daf6[_0x5ee55a(0x116)]}),_0x8a0457=findAppByName(_0x5e4a70[_0x5ee55a(0x131)],_0x9a5a11);if(_0x8a0457&&!isRuntimeAccessibleApp(_0x8a0457))throw runtimeInaccessibleAppError(_0x8a0457,'\x22'+_0x9a5a11+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x4df637,_0x5f4298,_0x2a941f){const _0x377e54=a124_0x4cb4;if(_0x4df637[_0x377e54(0x149)]===![]||!_0x5f4298['accessKey'])return;const {getRemoteAppList:_0x4ae08c}=await import(_0x377e54(0x115)),_0x4640df=await _0x4ae08c({'env':_0x5f4298[_0x377e54(0x124)]??_0x377e54(0x12a),'accessKey':_0x5f4298[_0x377e54(0x116)]}),_0x32989b=findAppByCode(_0x4640df[_0x377e54(0x131)],_0x2a941f);if(_0x32989b&&!isRuntimeAccessibleApp(_0x32989b))throw runtimeInaccessibleAppError(_0x32989b,'appcode\x20\x22'+_0x2a941f+'\x22');}export async function runCommand(_0x49233a,_0x3e88b2,_0x16f74a=terminalRunnerAdapter){assertKnownCommandFlags(_0x49233a,_0x3e88b2['rawFlags']),await runCommandWithAdapter(shouldApplyVersionPolicy(_0x49233a)?withVersionPolicy(_0x49233a):_0x49233a,_0x3e88b2,_0x16f74a);}function shouldApplyVersionPolicy(_0x271861){const _0x3c4677=a124_0x4cb4;if([_0x3c4677(0x112),'schema',_0x3c4677(0x13d)]['includes'](_0x271861[_0x3c4677(0x146)]))return![];return!(_0x271861[_0x3c4677(0x146)]===_0x3c4677(0x13e)&&_0x271861[_0x3c4677(0x110)]===_0x3c4677(0x10d));}function withVersionPolicy(_0x1fb0be){return{..._0x1fb0be,async 'execute'(_0x38d413){const _0x533586=a124_0x4cb4,_0x3df0b0=await checkCliVersion();assertCliVersionSupported(_0x3df0b0);const _0x4b5d58=shouldResolveUpdateNotice(_0x38d413)?resolveLatestUpdateNotice(_0x3df0b0)[_0x533586(0x120)](()=>null):Promise[_0x533586(0x105)](null),_0x1a29bf=await _0x1fb0be[_0x533586(0x119)](_0x38d413);return attachUpdateNotice(_0x1a29bf,await _0x4b5d58);}};}function shouldResolveUpdateNotice(_0xdb2847){const _0x1bd37a=a124_0x4cb4;return _0xdb2847['format']===_0x1bd37a(0x136)&&!_0xdb2847['nonInteractive'];}function attachUpdateNotice(_0x4f79a3,_0x679edb){const _0x198075=a124_0x4cb4;if(!_0x679edb||!_0x4f79a3||typeof _0x4f79a3!==_0x198075(0x144))return _0x4f79a3;const _0x5b6c4f=_0x4f79a3,_0x416137=typeof _0x5b6c4f[_0x198075(0x148)]===_0x198075(0x144)&&_0x5b6c4f[_0x198075(0x148)]!==null?_0x5b6c4f['_notice']:{};return{..._0x5b6c4f,'_notice':{..._0x416137,'update':_0x679edb}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2b8b48,_0x5c55ce){const _0x33c0b0=a125_0x2bec,_0x3beaf1=_0x2b8b48();while(!![]){try{const _0xc6ad22=parseInt(_0x33c0b0(0x80))/0x1*(parseInt(_0x33c0b0(0x79))/0x2)+parseInt(_0x33c0b0(0x84))/0x3+-parseInt(_0x33c0b0(0x7a))/0x4*(parseInt(_0x33c0b0(0x81))/0x5)+parseInt(_0x33c0b0(0x7e))/0x6+-parseInt(_0x33c0b0(0x7c))/0x7+parseInt(_0x33c0b0(0x78))/0x8+-parseInt(_0x33c0b0(0x73))/0x9;if(_0xc6ad22===_0x5c55ce)break;else _0x3beaf1['push'](_0x3beaf1['shift']());}catch(_0x54beb9){_0x3beaf1['push'](_0x3beaf1['shift']());}}}(a125_0x1a66,0x34aa2));import{buildSchemaPayload as a125_0x229195}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';function a125_0x1a66(){const _0x5041f7=['253794ZUBifR','388FbCAdM','required','1928703fsMOUH','service','1440006TGBPxR','requiresAuth','1UWupwM','11010ovrgXj','commands','auth','331263KmfRud','865710XlVGhr','has','map','services','none','2589664ZrVEOn'];a125_0x1a66=function(){return _0x5041f7;};return a125_0x1a66();}import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';function a125_0x2bec(_0x2ba718,_0x5dc90c){_0x2ba718=_0x2ba718-0x73;const _0x1a666f=a125_0x1a66();let _0x2bece5=_0x1a666f[_0x2ba718];return _0x2bece5;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x51a878=a125_0x2bec,{serviceRegistry:_0x21f903,findDefinition:_0x36b29d}=await import('../commands/registry.js'),_0x1a02cb=new Set(_0x21f903[_0x51a878(0x75)](_0x586609=>_0x586609[_0x51a878(0x7d)])),_0x46d1e6=listDynamicServiceEntries()['filter'](_0x52316e=>!_0x1a02cb[_0x51a878(0x74)](_0x52316e['service'])),_0x8de514=a125_0x229195({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x21f903,_0x46d1e6),'buildAllFlags':buildAllFlags,'findDefinition':(_0x5635be,_0x3f4245)=>_0x36b29d(_0x5635be,_0x3f4245)??findDynamicServiceDefinition(_0x5635be,_0x3f4245)});return normalizeSchemaPayload(_0x8de514);}function normalizeSchemaPayload(_0x6d10c6){const _0x581864=a125_0x2bec;return{..._0x6d10c6,'schemaVersion':0x2,'services':_0x6d10c6[_0x581864(0x76)][_0x581864(0x75)](_0x539e26=>({..._0x539e26,'commands':_0x539e26[_0x581864(0x82)][_0x581864(0x75)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x4462eb){const _0x1e95fc=a125_0x2bec,_0x2dcfb4=_0x4462eb;return{..._0x4462eb,'auth':_0x2dcfb4[_0x1e95fc(0x83)]??(_0x4462eb[_0x1e95fc(0x7f)]?_0x1e95fc(0x7b):_0x1e95fc(0x77))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x32585e,_0x5d97ca){const _0x101522=a126_0x38cb,_0x1c43c9=_0x32585e();while(!![]){try{const _0x15353a=parseInt(_0x101522(0x147))/0x1+-parseInt(_0x101522(0x148))/0x2*(parseInt(_0x101522(0x152))/0x3)+-parseInt(_0x101522(0x151))/0x4*(-parseInt(_0x101522(0x150))/0x5)+parseInt(_0x101522(0x14e))/0x6+-parseInt(_0x101522(0x149))/0x7+-parseInt(_0x101522(0x14d))/0x8+parseInt(_0x101522(0x14a))/0x9;if(_0x15353a===_0x5d97ca)break;else _0x1c43c9['push'](_0x1c43c9['shift']());}catch(_0xe7052d){_0x1c43c9['push'](_0x1c43c9['shift']());}}}(a126_0x28bf,0x7856d));function a126_0x28bf(){const _0x2086d9=['length','findIndex','3314848CEAiMm','1302924GkDBEk','slice','9360WOTKDv','1204cezlPO','3NWMTSc','service','949848wdyzle','544026zGsiiz','4094188AtnBFJ','303192KuEiHR'];a126_0x28bf=function(){return _0x2086d9;};return a126_0x28bf();}function a126_0x38cb(_0x416e75,_0x3f651d){_0x416e75=_0x416e75-0x146;const _0x28bfd2=a126_0x28bf();let _0x38cb64=_0x28bfd2[_0x416e75];return _0x38cb64;}export function insertDynamicServicesAfterServiceTree(_0x1086d7,_0x20793f){const _0x5df072=a126_0x38cb;if(_0x20793f[_0x5df072(0x14b)]===0x0)return[..._0x1086d7];const _0x45fa4f=_0x1086d7[_0x5df072(0x14c)](_0x5baf7f=>_0x5baf7f[_0x5df072(0x146)]===_0x5df072(0x146));if(_0x45fa4f<0x0)return[..._0x1086d7,..._0x20793f];return[..._0x1086d7[_0x5df072(0x14f)](0x0,_0x45fa4f+0x1),..._0x20793f,..._0x1086d7[_0x5df072(0x14f)](_0x45fa4f+0x1)];}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x91869a,_0x317c01){var _0x324784=a127_0x33b4,_0xc4d893=_0x91869a();while(!![]){try{var _0x2723dc=parseInt(_0x324784(0x1dc))/0x1*(-parseInt(_0x324784(0x1d8))/0x2)+parseInt(_0x324784(0x1da))/0x3*(parseInt(_0x324784(0x1d7))/0x4)+parseInt(_0x324784(0x1dd))/0x5+-parseInt(_0x324784(0x1d9))/0x6+parseInt(_0x324784(0x1db))/0x7*(-parseInt(_0x324784(0x1d6))/0x8)+-parseInt(_0x324784(0x1de))/0x9+parseInt(_0x324784(0x1d5))/0xa;if(_0x2723dc===_0x317c01)break;else _0xc4d893['push'](_0xc4d893['shift']());}catch(_0x2c007c){_0xc4d893['push'](_0xc4d893['shift']());}}}(a127_0x5146,0xcf0dd));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a127_0x33b4(_0x1e8b50,_0x19a254){_0x1e8b50=_0x1e8b50-0x1d5;var _0x5146df=a127_0x5146();var _0x33b4f2=_0x5146df[_0x1e8b50];return _0x33b4f2;}function a127_0x5146(){var _0x129901=['21548410tTXTMU','704Uuitjh','4DAwQtQ','27696jDeKPN','8995362pQfwPB','3538731LcXwNU','36589mpBtpH','7lnxjIk','1035605mlgHsw','5735763qAYyRI'];a127_0x5146=function(){return _0x129901;};return a127_0x5146();}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const VERSION = "2.3.
|
|
2
|
-
export declare const GIT_TAG = "v2.3.
|
|
3
|
-
export declare const GIT_COMMIT = "
|
|
4
|
-
export declare const BUILD_TIME = "2026-10-
|
|
1
|
+
export declare const VERSION = "2.3.8-beta.1";
|
|
2
|
+
export declare const GIT_TAG = "v2.3.8-beta.1";
|
|
3
|
+
export declare const GIT_COMMIT = "0345ea6";
|
|
4
|
+
export declare const BUILD_TIME = "2026-10-29T09:53:47.578Z";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a128_0x43cce9=a128_0x2ada;(function(_0x368044,_0x5b540d){const _0x3e6e4b=a128_0x2ada,_0x52e404=_0x368044();while(!![]){try{const _0x1d0f99=parseInt(_0x3e6e4b(0x8e))/0x1*(-parseInt(_0x3e6e4b(0x8b))/0x2)+parseInt(_0x3e6e4b(0x8f))/0x3*(-parseInt(_0x3e6e4b(0x88))/0x4)+parseInt(_0x3e6e4b(0x87))/0x5+parseInt(_0x3e6e4b(0x92))/0x6*(-parseInt(_0x3e6e4b(0x8a))/0x7)+-parseInt(_0x3e6e4b(0x91))/0x8*(-parseInt(_0x3e6e4b(0x89))/0x9)+parseInt(_0x3e6e4b(0x90))/0xa+-parseInt(_0x3e6e4b(0x86))/0xb*(-parseInt(_0x3e6e4b(0x93))/0xc);if(_0x1d0f99===_0x5b540d)break;else _0x52e404['push'](_0x52e404['shift']());}catch(_0x4c10f0){_0x52e404['push'](_0x52e404['shift']());}}}(a128_0x28ab,0xab964));export const VERSION=a128_0x43cce9(0x8d);function a128_0x28ab(){const _0x59da1f=['2.3.8-beta.1','7386oACSFh','197259CTwuzX','8895560IIBvMU','8NXhfbe','6ZpNbZx','24Coljvu','2026-10-29T09:53:47.578Z','1146167zyNWrf','1566585eRCPfj','4RgkMkH','3760695iUYRZG','7165333hvhuvK','10Jgfrds','0345ea6'];a128_0x28ab=function(){return _0x59da1f;};return a128_0x28ab();}export const GIT_TAG='v2.3.8-beta.1';export const GIT_COMMIT=a128_0x43cce9(0x8c);function a128_0x2ada(_0x2b07f2,_0xb52a72){_0x2b07f2=_0x2b07f2-0x85;const _0x28ab1d=a128_0x28ab();let _0x2adaa9=_0x28ab1d[_0x2b07f2];return _0x2adaa9;}export const BUILD_TIME=a128_0x43cce9(0x85);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a129_0x53647c=a129_0x3ae1;(function(_0x526411,_0x262fe0){const _0x4959f9=a129_0x3ae1,_0x4560dd=_0x526411();while(!![]){try{const _0x4c6f0a=-parseInt(_0x4959f9(0x9c))/0x1+parseInt(_0x4959f9(0xaa))/0x2*(parseInt(_0x4959f9(0x96))/0x3)+-parseInt(_0x4959f9(0xa5))/0x4*(parseInt(_0x4959f9(0x99))/0x5)+-parseInt(_0x4959f9(0xa2))/0x6*(-parseInt(_0x4959f9(0xab))/0x7)+parseInt(_0x4959f9(0x9d))/0x8+parseInt(_0x4959f9(0xa4))/0x9+-parseInt(_0x4959f9(0x91))/0xa;if(_0x4c6f0a===_0x262fe0)break;else _0x4560dd['push'](_0x4560dd['shift']());}catch(_0x2817f5){_0x4560dd['push'](_0x4560dd['shift']());}}}(a129_0x1a2b,0x2a005));export const ROUTING_CATALOG_DIGEST=a129_0x53647c(0xa3);export const DEFAULT_REGION='cn';function a129_0x3ae1(_0x44bde7,_0x158008){_0x44bde7=_0x44bde7-0x8e;const _0x1a2bb2=a129_0x1a2b();let _0x3ae1a4=_0x1a2bb2[_0x44bde7];return _0x3ae1a4;}function a129_0x1a2b(){const _0x405bdb=['https://user.lovrabet.id','74psUpNC','11998ytlAMe','https://daily-api.lovrabet.ai','https://kb-service.lovrabet.com','https://user.lovrabet.com','https://api.lovrabet.com','https://skills-daily.lovrabet.com','https://runtime.lovrabet.com','3617100zngHbL','https://user-daily.lovrabet.ai','https://daily-runtime.lovrabet.com','indonesia','Global','13305rFdZLV','global','https://kb-service.lovrabet.id','15myEOjm','https://user-daily.lovrabet.com','https://daily-api.lovrabet.com','41023lSabRi','2108504IyIyeh','https://api.lovrabet.id','https://daily-runtime.lovrabet.ai','china','https://kb-service-daily.lovrabet.com','852HPVlSI','886843ef89aa4ff2b36d612e8fbd1b6c1840b37728916fba5699be34129ef579','1503792XfZEFT','351152FYaVaJ','https://skills-daily.lovrabet.ai','https://user.lovrabet.ai','https://runtime.lovrabet.id'];a129_0x1a2b=function(){return _0x405bdb;};return a129_0x1a2b();}export const REGION_VALUES=['cn','id',a129_0x53647c(0x97)];export const ENABLED_REGION_VALUES=['cn','id',a129_0x53647c(0x97)];export const OFFICIAL_ROUTING_PROFILES={'cn':{'enabled':!![],'label':'Mainland\x20China','aliases':[a129_0x53647c(0xa0)],'serviceDomains':{'production':{'user':a129_0x53647c(0xae),'api':a129_0x53647c(0x8e),'runtime':a129_0x53647c(0x90),'skill':'https://skills.lovrabet.com','kbService':a129_0x53647c(0xad)},'daily':{'user':a129_0x53647c(0x9a),'api':a129_0x53647c(0x9b),'runtime':a129_0x53647c(0x93),'skill':a129_0x53647c(0x8f),'kbService':a129_0x53647c(0xa1)}}},'id':{'enabled':!![],'label':'Indonesia','aliases':[a129_0x53647c(0x94)],'serviceDomains':{'production':{'user':a129_0x53647c(0xa9),'api':a129_0x53647c(0x9e),'runtime':a129_0x53647c(0xa8),'skill':'https://skills.lovrabet.id','kbService':a129_0x53647c(0x98)}}},'global':{'enabled':!![],'label':a129_0x53647c(0x95),'aliases':[],'serviceDomains':{'production':{'user':a129_0x53647c(0xa7),'api':'https://api.lovrabet.ai','runtime':'https://runtime.lovrabet.ai','skill':'https://skills.lovrabet.ai'},'daily':{'user':a129_0x53647c(0x92),'api':a129_0x53647c(0xac),'runtime':a129_0x53647c(0x9f),'skill':a129_0x53647c(0xa6)}}}};export const REGION_ALIASES={'china':'cn','indonesia':'id'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a130_0x19ee14=a130_0x2624;function a130_0x2624(_0x782ad1,_0x50a5b9){_0x782ad1=_0x782ad1-0xd2;const _0x1a255f=a130_0x1a25();let _0x2624dd=_0x1a255f[_0x782ad1];return _0x2624dd;}(function(_0x18fda8,_0x2f0015){const _0x145c7d=a130_0x2624,_0x5a018e=_0x18fda8();while(!![]){try{const _0x2372c6=-parseInt(_0x145c7d(0xd6))/0x1+-parseInt(_0x145c7d(0xe1))/0x2*(parseInt(_0x145c7d(0xde))/0x3)+-parseInt(_0x145c7d(0xd9))/0x4*(-parseInt(_0x145c7d(0xd2))/0x5)+parseInt(_0x145c7d(0xe0))/0x6+-parseInt(_0x145c7d(0xda))/0x7*(-parseInt(_0x145c7d(0xdc))/0x8)+parseInt(_0x145c7d(0xd3))/0x9+-parseInt(_0x145c7d(0xdb))/0xa;if(_0x2372c6===_0x2f0015)break;else _0x5a018e['push'](_0x5a018e['shift']());}catch(_0xbedd27){_0x5a018e['push'](_0x5a018e['shift']());}}}(a130_0x1a25,0x6d798));export const ENTERPRISE_ROUTING_SCHEMA_DIGEST=a130_0x19ee14(0xdf);export const ENTERPRISE_ROUTING_PROTOCOL=a130_0x19ee14(0xdd);export const ENTERPRISE_ROUTING_KIND='enterprise';export const ENTERPRISE_ROUTING_DOMAIN_FIELDS=['userDomain','apiDomain',a130_0x19ee14(0xd4),a130_0x19ee14(0xd8),a130_0x19ee14(0xd7)];function a130_0x1a25(){const _0x3d66b3=['1310457IwgGvU','e3423cad71c22edb18a8481be7bdb733ff2d4136c31aa3ae6da56271e32cced7','4457706aBeWJJ','4dprTlJ','375qHVcfb','1705509tLAFDo','runtimeDomain','userDomain','289036VdgAAT','kbServiceDomain','skillDomain','33420dzYvOJ','77iHMxBT','2522000qjYFyJ','221240nwiuLw','lovrabet-routing/v1'];a130_0x1a25=function(){return _0x3d66b3;};return a130_0x1a25();}export const REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS=[a130_0x19ee14(0xd5),'apiDomain',a130_0x19ee14(0xd4),a130_0x19ee14(0xd8)];
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x565d20,_0x19e987){const _0xddf40d=a131_0x3b40,_0x376c23=_0x565d20();while(!![]){try{const _0x3f5886=parseInt(_0xddf40d(0xe3))/0x1+parseInt(_0xddf40d(0xe7))/0x2+-parseInt(_0xddf40d(0xeb))/0x3*(-parseInt(_0xddf40d(0xea))/0x4)+parseInt(_0xddf40d(0xe4))/0x5+parseInt(_0xddf40d(0xe5))/0x6+-parseInt(_0xddf40d(0xe2))/0x7+-parseInt(_0xddf40d(0xe6))/0x8;if(_0x3f5886===_0x19e987)break;else _0x376c23['push'](_0x376c23['shift']());}catch(_0x40b740){_0x376c23['push'](_0x376c23['shift']());}}}(a131_0x5692,0x79339));import{jsx as a131_0x94491a,jsxs as a131_0x430083}from'react/jsx-runtime';import{useEffect}from'react';function a131_0x5692(){const _0x95d62e=['5632470ajLZwk','14237216uFhkTr','231848fddlzZ','\x20to\x20view\x20available\x20commands.','green','1922724rHCVHe','3OxeBYt','4104695yfFwQo','684495wpmBWz','3213165csVTOK'];a131_0x5692=function(){return _0x95d62e;};return a131_0x5692();}import{Box,Text,useApp}from'ink';function a131_0x3b40(_0x198023,_0x1435cf){_0x198023=_0x198023-0xe2;const _0x5692ed=a131_0x5692();let _0x3b4031=_0x5692ed[_0x198023];return _0x3b4031;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x26b4f2=a131_0x3b40,{exit:_0x431760}=useApp();return useEffect(()=>{_0x431760();},[_0x431760]),a131_0x430083(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a131_0x94491a(Box,{'children':a131_0x94491a(Text,{'bold':!![],'color':_0x26b4f2(0xe9),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a131_0x430083(Box,{'marginTop':0x1,'children':[a131_0x94491a(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a131_0x94491a(Text,{'bold':!![],'color':_0x26b4f2(0xe9),'children':CLI_BIN_NAME+'\x20--help'}),a131_0x94491a(Text,{'dimColor':!![],'children':_0x26b4f2(0xe8)})]})]});}
|
package/lib/postinstall.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x98a106,_0x3739ea){const _0x4b3864=a132_0x18c9,_0x1a5a3d=_0x98a106();while(!![]){try{const _0x4c3885=parseInt(_0x4b3864(0x129))/0x1+-parseInt(_0x4b3864(0x128))/0x2*(-parseInt(_0x4b3864(0x121))/0x3)+-parseInt(_0x4b3864(0x126))/0x4+-parseInt(_0x4b3864(0x11e))/0x5*(-parseInt(_0x4b3864(0x12b))/0x6)+-parseInt(_0x4b3864(0x11f))/0x7*(parseInt(_0x4b3864(0x123))/0x8)+-parseInt(_0x4b3864(0x131))/0x9*(parseInt(_0x4b3864(0x127))/0xa)+parseInt(_0x4b3864(0x11b))/0xb*(-parseInt(_0x4b3864(0x124))/0xc);if(_0x4c3885===_0x3739ea)break;else _0x1a5a3d['push'](_0x1a5a3d['shift']());}catch(_0x1748ef){_0x1a5a3d['push'](_0x1a5a3d['shift']());}}}(a132_0x101f,0xef40a));import{installBuiltinSkill}from'./skills/builtin-skill.js';function a132_0x18c9(_0x5256c4,_0x1c558e){_0x5256c4=_0x5256c4-0x11b;const _0x101f80=a132_0x101f();let _0x18c96b=_0x101f80[_0x5256c4];return _0x18c96b;}export async function runPostinstall(_0x2193b5={}){const _0x47545b=a132_0x18c9,_0x396ebc=installBuiltinSkill(_0x2193b5);if(_0x396ebc['ok']){const _0x528a61=_0x396ebc['changed']?_0x47545b(0x12e):_0x47545b(0x132),_0x887166=_0x396ebc['installedPath']?_0x47545b(0x125)+_0x396ebc[_0x47545b(0x120)]:_0x47545b(0x12d);return console[_0x47545b(0x12c)](_0x47545b(0x133)+_0x396ebc[_0x47545b(0x11d)]+'\x20'+_0x528a61+_0x887166),_0x396ebc;}const _0x39b05e=_0x47545b(0x12a)+(_0x396ebc['code']??_0x47545b(0x11c))+']\x20'+(_0x396ebc['error']??_0x47545b(0x12f))+'.\x20'+(_0x47545b(0x122)+_0x396ebc['repairCommand']);if(_0x396ebc[_0x47545b(0x130)]==='SOURCE_INVALID')throw new Error(_0x39b05e);return console['warn'](_0x39b05e),_0x396ebc;}function a132_0x101f(){const _0x4c51d7=['Lovrabet\x20Built-in\x20Skill\x20','4830386XdOPNd','FAILED','skillVersion','452080bhNStZ','368326XaLUYc','installedPath','3bTtfPQ','Repair\x20with:\x20','8wRHAah','36kVThIG','\x20at\x20','120004FOHDNa','60KeUREd','2726092NcnIHk','413503Ifydah','[BUILTIN_SKILL_INSTALL_','72Zfsjng','log','\x20via\x20skills@latest','installed','Installation\x20failed','code','722349PSnANV','already\x20current'];a132_0x101f=function(){return _0x4c51d7;};return a132_0x101f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x20ed3c,_0x36d0d0){const _0x5ade55=a133_0x3a68,_0x4d3b4a=_0x20ed3c();while(!![]){try{const _0x4378d9=-parseInt(_0x5ade55(0x1e5))/0x1+parseInt(_0x5ade55(0x1e7))/0x2+-parseInt(_0x5ade55(0x1e9))/0x3*(parseInt(_0x5ade55(0x1ec))/0x4)+-parseInt(_0x5ade55(0x1e2))/0x5+-parseInt(_0x5ade55(0x1e4))/0x6+-parseInt(_0x5ade55(0x1f1))/0x7*(parseInt(_0x5ade55(0x1f3))/0x8)+parseInt(_0x5ade55(0x1f2))/0x9;if(_0x4378d9===_0x36d0d0)break;else _0x4d3b4a['push'](_0x4d3b4a['shift']());}catch(_0x56d8bd){_0x4d3b4a['push'](_0x4d3b4a['shift']());}}}(a133_0x3969,0x8eb17));function a133_0x3969(){const _0x4b6f2a=['820590fdMaAq','slice','898870dhQFlJ','Run\x20this\x20write\x20operation','121614otOVvG','risk','string','112MkWtMb','trim','high-risk-write','description','Lovrabet\x20confirmation\x20requires\x20a\x20write\x20command.','2844555iBkkFj','38889630cIIGFQ','16TVtaJP','4659750NvYxQp','replace','2914200AqrUcb'];a133_0x3969=function(){return _0x4b6f2a;};return a133_0x3969();}const DESCRIPTION_MAX_LENGTH=0x1f4;function a133_0x3a68(_0x2a816d,_0x29266e){_0x2a816d=_0x2a816d-0x1e2;const _0x396907=a133_0x3969();let _0x3a682e=_0x396907[_0x2a816d];return _0x3a682e;}export function buildLovrabetConfirmationRequest(_0x56ca72,_0xc8a8ec,_0x3bc2bd){const _0x110f30=a133_0x3a68,_0x2a4cc2=normalizeText(_0x56ca72['confirmationDescription'],DESCRIPTION_MAX_LENGTH),_0x51b2b8=normalizeText(_0x56ca72[_0x110f30(0x1ef)],DESCRIPTION_MAX_LENGTH);return{'operation':_0xc8a8ec,'risk':requireWriteRisk(_0x56ca72),'description':_0x2a4cc2||_0x51b2b8||_0x110f30(0x1e8),..._0x3bc2bd?{'signal':_0x3bc2bd}:{}};}function requireWriteRisk(_0x5761c1){const _0x4f05f4=a133_0x3a68;if(_0x5761c1[_0x4f05f4(0x1ea)]==='write'||_0x5761c1['risk']===_0x4f05f4(0x1ee))return _0x5761c1[_0x4f05f4(0x1ea)];throw new Error(_0x4f05f4(0x1f0));}function normalizeText(_0x4536e9,_0x3c80e5){const _0x10eb41=a133_0x3a68;if(typeof _0x4536e9!==_0x10eb41(0x1eb))return'';return _0x4536e9['replace'](/[\u0000-\u001f\u007f]+/g,'\x20')[_0x10eb41(0x1e3)](/\s+/g,'\x20')[_0x10eb41(0x1ed)]()[_0x10eb41(0x1e6)](0x0,_0x3c80e5);}
|
package/lib/runtime/event.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x622cc4,_0xb3bbea){const _0x47efd2=a134_0x9566,_0x3f8f41=_0x622cc4();while(!![]){try{const _0x486f0f=parseInt(_0x47efd2(0x150))/0x1+-parseInt(_0x47efd2(0x14c))/0x2+parseInt(_0x47efd2(0x148))/0x3*(parseInt(_0x47efd2(0x147))/0x4)+parseInt(_0x47efd2(0x145))/0x5+parseInt(_0x47efd2(0x14d))/0x6+parseInt(_0x47efd2(0x143))/0x7+-parseInt(_0x47efd2(0x14e))/0x8*(parseInt(_0x47efd2(0x144))/0x9);if(_0x486f0f===_0xb3bbea)break;else _0x3f8f41['push'](_0x3f8f41['shift']());}catch(_0xf8ba73){_0x3f8f41['push'](_0x3f8f41['shift']());}}}(a134_0xc418,0x9bf3d));export function canonicalLovrabetOperation(_0x4c6946){const _0x3f7bd6=a134_0x9566;return[_0x4c6946['service'],..._0x4c6946[_0x3f7bd6(0x14a)][_0x3f7bd6(0x14b)]()['split'](/\s+/)][_0x3f7bd6(0x146)](Boolean)[_0x3f7bd6(0x142)]('.');}function a134_0x9566(_0x59a7d0,_0x400c62){_0x59a7d0=_0x59a7d0-0x141;const _0xc418ed=a134_0xc418();let _0x9566cb=_0xc418ed[_0x59a7d0];return _0x9566cb;}function a134_0xc418(){const _0x236ba2=['2439205OrOnGO','filter','28HVNZKi','294798jcLkwQ','high-risk-write','command','trim','324632SrSrbh','7273794fINdjm','1745720pSbMTs','risk','106599XLhRoY','writeEventSubject','join','3420522lsuQYa','90YkzSXy'];a134_0xc418=function(){return _0x236ba2;};return a134_0xc418();}export function createLovrabetWriteMetadata(_0x2b2841,_0x1fcd29,_0x5189e8,_0x236fb8){const _0x3bec94=a134_0x9566;if(_0x236fb8||_0x5189e8['ok']!==!![]||_0x2b2841['risk']!=='write'&&_0x2b2841[_0x3bec94(0x14f)]!==_0x3bec94(0x149))return undefined;const _0xe52a54=_0x2b2841[_0x3bec94(0x141)]?.(_0x5189e8),_0x5e7ef3={'type':'lovrabet.write.completed','operation':_0x1fcd29,'risk':_0x2b2841[_0x3bec94(0x14f)],..._0xe52a54?{'subject':_0xe52a54}:{}};return{'lovrabet':{'schemaVersion':0x1,'event':_0x5e7ef3}};}
|
package/lib/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1b335a,_0x3e3160){const _0x59912a=a135_0x3f66,_0x4efe4b=_0x1b335a();while(!![]){try{const _0x464148=parseInt(_0x59912a(0x1bd))/0x1+-parseInt(_0x59912a(0x1ca))/0x2+-parseInt(_0x59912a(0x1c5))/0x3+parseInt(_0x59912a(0x1c9))/0x4*(-parseInt(_0x59912a(0x1be))/0x5)+parseInt(_0x59912a(0x1bb))/0x6+parseInt(_0x59912a(0x1cb))/0x7+-parseInt(_0x59912a(0x1c4))/0x8;if(_0x464148===_0x3e3160)break;else _0x4efe4b['push'](_0x4efe4b['shift']());}catch(_0x45a890){_0x4efe4b['push'](_0x4efe4b['shift']());}}}(a135_0x34b1,0xc16e6));import{buildConfigFromFlags,initGlobalEnvironment}from'../context.js';function a135_0x34b1(){const _0x2e5646=['args','3787236KuDXBp','reason','1535818NHxuHE','328625cmcXSO','command','presentation','aborted','data','format','5606424YWJTyQ','1957938nkOYuA','write','dryRun','result','44FqDoJS','1111744NXqpkv','8802962GaqMoO','definition','high-risk-write','riskLevel','stringify','confirmation','present','Embedded\x20Lovrabet\x20confirmation\x20must\x20run\x20inside\x20execute.','rawFlags','isNonInteractive','signal','risk','execute','AbortError'];a135_0x34b1=function(){return _0x2e5646;};return a135_0x34b1();}import{createLovrabetRunnerAdapter,createPipelineEnv,finalizeLovrabetRuntimeState,runCommand}from'../framework/runner.js';import{canonicalLovrabetOperation,createLovrabetWriteMetadata}from'../runtime/event.js';import{buildLovrabetConfirmationRequest}from'../runtime/confirmation.js';import{resolveLovrabetInvocation}from'../runtime/resolve.js';import{runSerialized}from'../runtime/queue.js';const defaultPresentation={'present'({result:_0x3e4719,command:_0x3a68b9,risk:_0x27f8ec,dryRun:_0x2fcd57}){const _0x5a12eb=a135_0x3f66;return JSON[_0x5a12eb(0x1b0)]({'ok':_0x3e4719['ok'],'command':_0x3a68b9,'risk':_0x27f8ec,..._0x2fcd57?{'dryRun':!![]}:{},..._0x3e4719[_0x5a12eb(0x1c2)]!==undefined?{'data':_0x3e4719[_0x5a12eb(0x1c2)]}:{},..._0x3e4719['message']?{'message':_0x3e4719['message']}:{}});}};export async function invokeLovrabet(_0x5abd25,_0xa4b7c6){const _0x4c3805=a135_0x3f66;throwIfAborted(_0xa4b7c6['signal']);const _0x1ebf10=await resolveLovrabetInvocation(_0x5abd25),_0x4eb9db=canonicalLovrabetOperation(_0x1ebf10[_0x4c3805(0x1cc)]);return await confirmWriteBeforeQueue(_0x1ebf10[_0x4c3805(0x1cc)],_0x1ebf10['rawFlags'],_0x4eb9db,_0xa4b7c6),runSerialized(async()=>{const _0x3ac0c4=_0x4c3805;throwIfAborted(_0xa4b7c6[_0x3ac0c4(0x1b6)]);const _0x1fd63e={},_0x48e549=buildConfigFromFlags(_0x1ebf10[_0x3ac0c4(0x1b4)]);await initGlobalEnvironment(_0x48e549);const _0x16496c=createPipelineEnv(_0x48e549,{..._0x1ebf10[_0x3ac0c4(0x1b4)],'yes':_0x1ebf10['definition'][_0x3ac0c4(0x1b7)]===_0x3ac0c4(0x1cd)?!![]:_0x1ebf10[_0x3ac0c4(0x1b4)]['yes'],'nonInteractive':!![]});_0x16496c['args']=_0x1ebf10[_0x3ac0c4(0x1ba)],_0x16496c[_0x3ac0c4(0x1b5)]=!![],_0x16496c[_0x3ac0c4(0x1ce)]='high-risk-write';const _0x27d445=withAbortSignal(_0x1ebf10['definition'],_0xa4b7c6[_0x3ac0c4(0x1b6)]),_0x3933c2=createLovrabetRunnerAdapter({'formatOutput'(_0x29cec7,_0xdce787){const _0x41e318=_0x3ac0c4;_0x1fd63e[_0x41e318(0x1c8)]=_0x29cec7,_0x1fd63e[_0x41e318(0x1bf)]=_0xdce787[_0x41e318(0x1bf)],_0x1fd63e['risk']=_0xdce787[_0x41e318(0x1b7)],_0x1fd63e[_0x41e318(0x1c3)]=_0xdce787[_0x41e318(0x1c3)],_0x1fd63e[_0x41e318(0x1c7)]=_0xdce787[_0x41e318(0x1c7)]===!![];},async 'confirmHighRisk'(){const _0x4f2fa8=_0x3ac0c4;throw new Error(_0x4f2fa8(0x1b3));}});try{await runCommand(_0x27d445,_0x16496c,_0x3933c2);if(!_0x1fd63e[_0x3ac0c4(0x1c8)]||!_0x1fd63e[_0x3ac0c4(0x1bf)]||!_0x1fd63e['risk']||!_0x1fd63e[_0x3ac0c4(0x1c3)])throw new Error('Lovrabet\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.');const _0x5837a=_0xa4b7c6[_0x3ac0c4(0x1c0)]??defaultPresentation,_0x44f2c4=_0x1fd63e[_0x3ac0c4(0x1c7)]===!![],_0x21372a={'result':_0x1fd63e[_0x3ac0c4(0x1c8)],'command':_0x1fd63e[_0x3ac0c4(0x1bf)],'operation':_0x4eb9db,'risk':_0x1fd63e[_0x3ac0c4(0x1b7)],'format':_0x1fd63e[_0x3ac0c4(0x1c3)],'dryRun':_0x44f2c4},_0x668b98=createLovrabetWriteMetadata(_0x1ebf10[_0x3ac0c4(0x1cc)],_0x4eb9db,_0x1fd63e[_0x3ac0c4(0x1c8)],_0x44f2c4);let _0x448509;try{_0x448509=await _0x5837a[_0x3ac0c4(0x1b2)](_0x21372a);}catch(_0x5954bd){if(!_0x668b98||_0x5837a===defaultPresentation)throw _0x5954bd;_0x448509=await defaultPresentation[_0x3ac0c4(0x1b2)](_0x21372a);}return{'operation':_0x4eb9db,'risk':_0x1fd63e[_0x3ac0c4(0x1b7)],'mode':_0x44f2c4?'dry-run':'execute','result':_0x1fd63e[_0x3ac0c4(0x1c8)],'output':_0x448509,..._0x668b98?{'metadata':_0x668b98}:{}};}finally{await finalizeLovrabetRuntimeState();}});}async function confirmWriteBeforeQueue(_0x5eba27,_0x4a4d9e,_0x8a6cda,_0x55b920){const _0x12953b=a135_0x3f66;if(_0x4a4d9e[_0x12953b(0x1c7)]===!![]||_0x5eba27['risk']!==_0x12953b(0x1c6)&&_0x5eba27[_0x12953b(0x1b7)]!=='high-risk-write')return;await _0x55b920[_0x12953b(0x1b1)]['confirm'](buildLovrabetConfirmationRequest(_0x5eba27,_0x8a6cda,_0x55b920[_0x12953b(0x1b6)]));}function a135_0x3f66(_0x40d633,_0x211cd2){_0x40d633=_0x40d633-0x1b0;const _0x34b13a=a135_0x34b1();let _0x3f6674=_0x34b13a[_0x40d633];return _0x3f6674;}function withAbortSignal(_0x12281f,_0x4d9a5d){return{..._0x12281f,async 'execute'(_0xf3590d){const _0x15cb3d=a135_0x3f66;return throwIfAborted(_0x4d9a5d),_0x12281f[_0x15cb3d(0x1b8)]({..._0xf3590d,'signal':_0x4d9a5d});}};}function throwIfAborted(_0x5dfc6b){const _0x9a43e6=a135_0x3f66;if(_0x5dfc6b?.[_0x9a43e6(0x1c1)])throw _0x5dfc6b[_0x9a43e6(0x1bc)]instanceof Error?_0x5dfc6b['reason']:new DOMException('Lovrabet\x20invocation\x20aborted.',_0x9a43e6(0x1b9));}
|
package/lib/runtime/queue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a136_0x46ea4c=a136_0x2f8d;(function(_0x415aa3,_0x49ef1e){const _0xca08d8=a136_0x2f8d,_0x8e19ca=_0x415aa3();while(!![]){try{const _0x50de1c=-parseInt(_0xca08d8(0x133))/0x1+parseInt(_0xca08d8(0x136))/0x2*(parseInt(_0xca08d8(0x12a))/0x3)+parseInt(_0xca08d8(0x130))/0x4*(parseInt(_0xca08d8(0x134))/0x5)+parseInt(_0xca08d8(0x131))/0x6*(parseInt(_0xca08d8(0x135))/0x7)+-parseInt(_0xca08d8(0x12e))/0x8+-parseInt(_0xca08d8(0x12c))/0x9*(parseInt(_0xca08d8(0x12d))/0xa)+-parseInt(_0xca08d8(0x132))/0xb*(-parseInt(_0xca08d8(0x12f))/0xc);if(_0x50de1c===_0x49ef1e)break;else _0x8e19ca['push'](_0x8e19ca['shift']());}catch(_0x562e86){_0x8e19ca['push'](_0x8e19ca['shift']());}}}(a136_0x141b,0x98372));let tail=Promise[a136_0x46ea4c(0x12b)]();function a136_0x2f8d(_0x52a484,_0x250ca5){_0x52a484=_0x52a484-0x12a;const _0x141bf7=a136_0x141b();let _0x2f8da5=_0x141bf7[_0x52a484];return _0x2f8da5;}function a136_0x141b(){const _0x474af9=['1625655NOmnnL','77497oYALXp','318994ugXSFk','6AqaSrA','resolve','162BfUwUk','79430EgZyYm','2690576HbJnTx','8407992NyYUXQ','12xhXAbP','144mvJtJo','11RCxbTz','1157987wIszUh'];a136_0x141b=function(){return _0x474af9;};return a136_0x141b();}export async function runSerialized(_0x3a83ed){const _0x5f4c26=tail;let _0x34e9df;tail=new Promise(_0x1e2e15=>{_0x34e9df=_0x1e2e15;}),await _0x5f4c26['catch'](()=>undefined);try{return await _0x3a83ed();}finally{_0x34e9df();}}
|
package/lib/runtime/resolve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5af0e3,_0x1fc504){const _0x53ff59=a137_0x56f9,_0x307f98=_0x5af0e3();while(!![]){try{const _0x2d3507=-parseInt(_0x53ff59(0x1b6))/0x1+-parseInt(_0x53ff59(0x1ac))/0x2*(-parseInt(_0x53ff59(0x1c1))/0x3)+-parseInt(_0x53ff59(0x1bd))/0x4*(-parseInt(_0x53ff59(0x1b3))/0x5)+-parseInt(_0x53ff59(0x1b9))/0x6+-parseInt(_0x53ff59(0x1ae))/0x7+parseInt(_0x53ff59(0x1af))/0x8*(-parseInt(_0x53ff59(0x1b8))/0x9)+parseInt(_0x53ff59(0x1b7))/0xa;if(_0x2d3507===_0x1fc504)break;else _0x307f98['push'](_0x307f98['shift']());}catch(_0x36f028){_0x307f98['push'](_0x307f98['shift']());}}}(a137_0x3cbc,0x6f345));function a137_0x3cbc(){const _0x3b8b24=['6918CKVSNA','validation','4229470aXSSnG','85016SexoJG','args','../commands/registry.js','message','935925MUHxuS','assign','unknownCommand','255676VCjmFn','10466260YCoapw','369lfgxEo','1962720lMsByY','Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','definition','../framework/preparse.js','8ZbxuEw','defaultCommand','slice','flags','570GojlHS','input'];a137_0x3cbc=function(){return _0x3b8b24;};return a137_0x3cbc();}function a137_0x56f9(_0x48a6f2,_0x1dad6e){_0x48a6f2=_0x48a6f2-0x1ab;const _0x3cbc49=a137_0x3cbc();let _0x56f922=_0x3cbc49[_0x48a6f2];return _0x56f922;}import a137_0x113f3b from'meow';import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';export async function resolveLovrabetInvocation(_0x5f18e6){const _0x44ba71=a137_0x56f9,_0x526765=a137_0x113f3b('',{'importMeta':import.meta,'argv':_0x5f18e6,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x476733=[..._0x526765[_0x44ba71(0x1ab)]],_0x3cd13f=_0x526765['flags'];await correctFlags(_0x3cd13f);const _0x9cb982=_0x476733[0x0];if(!_0x9cb982)throw CliErrors[_0x44ba71(0x1ad)]('Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.');const _0x21c5ad=resolveRemovedCommand(_0x9cb982,_0x476733[0x1]);if(_0x21c5ad)throw CliErrors[_0x44ba71(0x1ad)](_0x21c5ad[_0x44ba71(0x1b2)],_0x21c5ad['hint']);if(!isKnownService(_0x9cb982)){const _0x1c5233=resolveDynamicServiceCommand(_0x476733,_0x3cd13f);if(!_0x1c5233)throw CliErrors[_0x44ba71(0x1b5)](_0x476733['join']('\x20'));return Object[_0x44ba71(0x1b4)](_0x3cd13f,_0x1c5233[_0x44ba71(0x1c0)]),{'definition':_0x1c5233[_0x44ba71(0x1bb)],'rawFlags':_0x3cd13f,'args':_0x1c5233[_0x44ba71(0x1b0)]};}const _0x58c7b4=getServiceEntry(_0x9cb982),_0x48c32a=_0x476733[0x1]||_0x58c7b4[_0x44ba71(0x1be)];if(!_0x48c32a)throw CliErrors[_0x44ba71(0x1ad)](_0x44ba71(0x1ba)+_0x9cb982+'\x22.');const _0x41f542=findDefinition(_0x9cb982,_0x48c32a);if(!_0x41f542)throw CliErrors[_0x44ba71(0x1b5)](_0x9cb982+'\x20'+_0x48c32a);return{'definition':_0x41f542,'rawFlags':_0x3cd13f,'args':_0x476733[_0x44ba71(0x1bf)](0x2)};}async function correctFlags(_0x3d70e8){const _0x1016f3=a137_0x56f9;try{const {correctFlags:_0x3bb50d}=await import(_0x1016f3(0x1bc)),{getAllDefinitions:_0x1d179e}=await import(_0x1016f3(0x1b1)),_0x10ad42=_0x1d179e()['flatMap'](_0x1453d0=>_0x1453d0[_0x1016f3(0x1c0)]??[]),_0x29a695=_0x3bb50d(_0x3d70e8,_0x10ad42);Object[_0x1016f3(0x1b4)](_0x3d70e8,_0x29a695[_0x1016f3(0x1c0)]);}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a139_0x339614=a139_0xf213;function a139_0x228a(){const _0x33ae9c=['version','unsent','succeeded','report','push','filter','Previously\x20imported\x20records\x20are\x20no\x20longer\x20visible;\x20recovery\x20conflict.','count','add','has','Import\x20task\x20marker\x20collision;\x20stop\x20without\x20replacing\x20the\x20marker.','Import\x20generated\x20ID\x20conflict.','ids','some','325610uNWeBD','789445yhVtnM','map','values','resume','Incomplete\x20readback.','strategy','Import\x20checkpoint\x20already\x20exists;\x20use\x20--resume.','length','importId','completed','unknown','utf8','checkpoint','rowNumber','rowIndexes','schemaVersion','reduce','byteLength','onCheckpointReady','status','39CkcsBN','1343194AfjOwO','string','datasetCode','Excel\x20contains\x20invalid\x20rows;\x20no\x20data\x20was\x20written.','The\x20auto-ID\x20runner\x20requires\x20the\x20v2\x20task\x20readback\x20contract.','now','203232GshRqL','isArray','conflict','Import\x20content\x20conflict\x20at\x20Excel\x20row\x20','30cpJWPe','Cannot\x20read\x20the\x20import\x20checkpoint.','Invalid\x20write\x20result.','2559018NnslhU','maxBatchSize','schemaFingerprint','maxBatchBytes','batchSize','elapsedMs','570hkUGUl','369392ZRvzKk','code','appCode','sheet','Import\x20generated\x20ID\x20collision.','batches','hex','454751GjEwWH','readTask','Invalid\x20import\x20task\x20readback\x20response.','stringify','parse','keys','63NziNvQ','flatMap','Excel\x20row\x20','schemaHash','uploadFields','ENOENT','mappingHash','Partial\x20import\x20task\x20readback\x20conflict.','rows','Import\x20checkpoint\x20does\x20not\x20match\x20the\x20input,\x20target\x20or\x20identity.','incomplete','Import\x20checkpoint\x20contains\x20a\x20content\x20conflict.','message','taskId','size','includes','The\x20import\x20write\x20outcome\x20is\x20unknown.\x20Resume\x20to\x20reconcile\x20the\x20original\x20task\x20marker\x20before\x20continuing.','number','pending','isInteger'];a139_0x228a=function(){return _0x33ae9c;};return a139_0x228a();}(function(_0x154e3d,_0x16fe39){const _0x32f7ad=a139_0xf213,_0x4d1c48=_0x154e3d();while(!![]){try{const _0x5c97cf=-parseInt(_0x32f7ad(0x1ea))/0x1+-parseInt(_0x32f7ad(0x200))/0x2+parseInt(_0x32f7ad(0x1ff))/0x3*(-parseInt(_0x32f7ad(0x206))/0x4)+parseInt(_0x32f7ad(0x1eb))/0x5*(-parseInt(_0x32f7ad(0x20a))/0x6)+parseInt(_0x32f7ad(0x20d))/0x7+-parseInt(_0x32f7ad(0x214))/0x8*(-parseInt(_0x32f7ad(0x221))/0x9)+parseInt(_0x32f7ad(0x213))/0xa*(parseInt(_0x32f7ad(0x21b))/0xb);if(_0x5c97cf===_0x16fe39)break;else _0x4d1c48['push'](_0x4d1c48['shift']());}catch(_0x13a7c2){_0x4d1c48['push'](_0x4d1c48['shift']());}}}(a139_0x228a,0x92039));import{randomBytes,randomUUID}from'node:crypto';import{lstat,readFile}from'node:fs/promises';function a139_0xf213(_0x17262f,_0x1a638f){_0x17262f=_0x17262f-0x1d1;const _0x228a3a=a139_0x228a();let _0xf213ba=_0x228a3a[_0x17262f];return _0xf213ba;}import{acquireLock,assertImportContract,assertImportPaths,canonical,sameImportValue,resolveImportOutputPath,saveImportJson}from'./runner.js';const validId=_0x200bee=>typeof _0x200bee===a139_0x339614(0x1d9)&&Number['isSafeInteger'](_0x200bee)&&_0x200bee>0x0;export async function runAutoIdExcelImport(_0x779114){const _0x2848ce=a139_0x339614,_0x5e4227={..._0x779114,'checkpoint':await resolveImportOutputPath(_0x779114[_0x2848ce(0x1f7)]),'report':await resolveImportOutputPath(_0x779114['report'])},{manifest:_0x107182,contract:_0x39492f,api:_0x22ebd3}=_0x5e4227;assertImportContract(_0x39492f,_0x5e4227[_0x2848ce(0x216)],_0x5e4227[_0x2848ce(0x202)]);if(_0x39492f[_0x2848ce(0x1fa)]!==0x2||!_0x22ebd3['readTask'])throw Error(_0x2848ce(0x204));if(_0x107182['errors'][_0x2848ce(0x1f2)])throw Error(_0x2848ce(0x203));if(!_0x107182[_0x2848ce(0x229)][_0x2848ce(0x1f2)])throw Error('Excel\x20contains\x20no\x20valid\x20data\x20rows.');if(!Number[_0x2848ce(0x1db)](_0x5e4227[_0x2848ce(0x211)])||_0x5e4227[_0x2848ce(0x211)]<0x1||_0x5e4227[_0x2848ce(0x211)]>_0x39492f[_0x2848ce(0x20e)])throw Error('Invalid\x20import\x20batch\x20size.');assertImportPaths(_0x5e4227['checkpoint'],_0x5e4227['report']);if(_0x107182[_0x2848ce(0x229)]['some'](_0x2dff5a=>Object['hasOwn'](_0x2dff5a[_0x2848ce(0x1ed)],'id')))throw Error('Auto-ID\x20import\x20items\x20cannot\x20contain\x20a\x20primary\x20key.');const _0x444986=(_0x4767bf,_0x32cdb2)=>Buffer[_0x2848ce(0x1fc)](JSON[_0x2848ce(0x21e)]({'schemaFingerprint':_0x39492f[_0x2848ce(0x20f)],'taskId':_0x32cdb2,'items':_0x4767bf['map'](_0x190574=>_0x107182['rows'][_0x190574][_0x2848ce(0x1ed)])}),_0x2848ce(0x1f6)),_0x24f1b3=[];let _0xd61f62=[];for(let _0x5386e5=0x0;_0x5386e5<_0x107182[_0x2848ce(0x229)][_0x2848ce(0x1f2)];_0x5386e5++){if(_0x444986([_0x5386e5],0x2**0x34)>_0x39492f['maxBatchBytes'])throw Error(_0x2848ce(0x223)+_0x107182[_0x2848ce(0x229)][_0x5386e5][_0x2848ce(0x1f8)]+'\x20exceeds\x20the\x20import\x20request\x20size\x20limit.');_0xd61f62[_0x2848ce(0x1f2)]&&(_0xd61f62['length']===_0x5e4227[_0x2848ce(0x211)]||_0x444986([..._0xd61f62,_0x5386e5],0x2**0x34)>_0x39492f[_0x2848ce(0x210)])&&(_0x24f1b3[_0x2848ce(0x1e0)](_0xd61f62),_0xd61f62=[]),_0xd61f62[_0x2848ce(0x1e0)](_0x5386e5);}if(_0xd61f62[_0x2848ce(0x1f2)])_0x24f1b3[_0x2848ce(0x1e0)](_0xd61f62);const _0x3493a2={'appCode':_0x5e4227[_0x2848ce(0x216)],'datasetCode':_0x5e4227[_0x2848ce(0x202)],'runtimeDomain':_0x5e4227['runtimeDomain'],'actorId':_0x39492f['actorId'],'fileHash':_0x107182['fileHash'],'mappingHash':_0x107182[_0x2848ce(0x227)],'schemaHash':_0x107182[_0x2848ce(0x224)],'remoteSchemaHash':_0x39492f[_0x2848ce(0x20f)],'batchSize':_0x5e4227['batchSize'],'maxBatchBytes':_0x39492f[_0x2848ce(0x210)],'sheet':_0x107182[_0x2848ce(0x217)],'strategy':_0x39492f[_0x2848ce(0x1f0)]},_0x55717f=await acquireLock(_0x5e4227[_0x2848ce(0x1f7)]);let _0x34f5f4;const _0x40f266=Date[_0x2848ce(0x205)]();let _0x2cce3d=0x0;const _0x38be23=[],_0x365066=_0x307cfd=>_0x34f5f4?.[_0x2848ce(0x219)][_0x2848ce(0x1e1)](_0x1e73ae=>_0x1e73ae['status']===_0x307cfd)[_0x2848ce(0x1fb)]((_0x152b6a,_0x147ca8)=>_0x152b6a+_0x147ca8[_0x2848ce(0x1f9)][_0x2848ce(0x1f2)],0x0)??0x0,_0x5de5a4=()=>({'importId':_0x34f5f4?.[_0x2848ce(0x1f3)],'sourceRows':_0x107182['rows'][_0x2848ce(0x1f2)],'emptyRows':_0x107182['emptyRows'][_0x2848ce(0x1f2)],'succeeded':_0x365066(_0x2848ce(0x1de)),'unknown':_0x365066(_0x2848ce(0x1da)),'conflicts':_0x365066(_0x2848ce(0x208)),'notAttempted':_0x365066(_0x2848ce(0x1dd)),'batches':_0x2cce3d,'batchResults':_0x38be23,'elapsedMs':Date['now']()-_0x40f266,'checkpoint':_0x5e4227[_0x2848ce(0x1f7)],'report':_0x5e4227['report'],'warnings':_0x107182['warnings']});try{if(_0x5e4227[_0x2848ce(0x1ee)]){try{_0x34f5f4=JSON[_0x2848ce(0x21f)](await readFile(_0x5e4227['checkpoint'],'utf8'));}catch{throw Error(_0x2848ce(0x20b));}if(!_0x34f5f4||_0x34f5f4[_0x2848ce(0x1dc)]!==0x2||typeof _0x34f5f4['importId']!==_0x2848ce(0x201)||!_0x34f5f4[_0x2848ce(0x1f3)]||canonical(_0x34f5f4['binding'])!==canonical(_0x3493a2)||!Array[_0x2848ce(0x207)](_0x34f5f4['batches'])||_0x34f5f4[_0x2848ce(0x219)][_0x2848ce(0x1f2)]!==_0x24f1b3[_0x2848ce(0x1f2)]||new Set(_0x34f5f4[_0x2848ce(0x219)][_0x2848ce(0x1ec)](_0x48409b=>_0x48409b[_0x2848ce(0x1d5)]))[_0x2848ce(0x1d6)]!==_0x24f1b3[_0x2848ce(0x1f2)]||_0x34f5f4[_0x2848ce(0x219)][_0x2848ce(0x1e9)]((_0x56b8c0,_0x3ab0d8)=>!validId(_0x56b8c0[_0x2848ce(0x1d5)])||_0x56b8c0[_0x2848ce(0x1d5)]>0x2**0x34||canonical(_0x56b8c0['rowIndexes'])!==canonical(_0x24f1b3[_0x3ab0d8])||![_0x2848ce(0x1dd),_0x2848ce(0x1da),_0x2848ce(0x1de),_0x2848ce(0x208)][_0x2848ce(0x1d7)](_0x56b8c0[_0x2848ce(0x1fe)])||!Array[_0x2848ce(0x207)](_0x56b8c0['ids'])||_0x56b8c0['ids']['some'](_0x1e4b52=>!validId(_0x1e4b52))||new Set(_0x56b8c0[_0x2848ce(0x1e8)])['size']!==_0x56b8c0[_0x2848ce(0x1e8)]['length']||_0x56b8c0[_0x2848ce(0x1e8)][_0x2848ce(0x1f2)]!==0x0&&_0x56b8c0[_0x2848ce(0x1e8)][_0x2848ce(0x1f2)]!==_0x56b8c0[_0x2848ce(0x1f9)][_0x2848ce(0x1f2)]||_0x56b8c0[_0x2848ce(0x1fe)]===_0x2848ce(0x1de)&&_0x56b8c0[_0x2848ce(0x1e8)][_0x2848ce(0x1f2)]!==_0x56b8c0[_0x2848ce(0x1f9)][_0x2848ce(0x1f2)]||_0x56b8c0['status']===_0x2848ce(0x1dd)&&_0x56b8c0[_0x2848ce(0x1e8)][_0x2848ce(0x1f2)]!==0x0))throw Error(_0x2848ce(0x1d1));const _0x4c56f4=_0x34f5f4['batches']['flatMap'](_0x4da31b=>_0x4da31b[_0x2848ce(0x1e8)]);if(new Set(_0x4c56f4)[_0x2848ce(0x1d6)]!==_0x4c56f4[_0x2848ce(0x1f2)])throw Error('Import\x20checkpoint\x20contains\x20duplicate\x20generated\x20IDs.');}else{try{await lstat(_0x5e4227[_0x2848ce(0x1f7)]);throw Error(_0x2848ce(0x1f1));}catch(_0x188b42){if(_0x188b42[_0x2848ce(0x215)]!==_0x2848ce(0x226))throw _0x188b42;}const _0x2e0b22=new Set();_0x34f5f4={'version':0x2,'importId':randomUUID(),'binding':_0x3493a2,'batches':_0x24f1b3['map'](_0xd2ff2b=>{const _0x1fce19=_0x2848ce;let _0xab0110;do{_0xab0110=Number(BigInt('0x'+randomBytes(0x7)['toString'](_0x1fce19(0x21a)))&(0x1n<<0x34n)-0x1n)+0x1;}while(_0x2e0b22[_0x1fce19(0x1e5)](_0xab0110));return _0x2e0b22[_0x1fce19(0x1e4)](_0xab0110),{'taskId':_0xab0110,'rowIndexes':_0xd2ff2b,'ids':[],'status':'unsent'};})},await saveImportJson(_0x5e4227['checkpoint'],_0x34f5f4);}await _0x5e4227[_0x2848ce(0x1fd)]?.();const _0x41822b=_0x34f5f4,_0x1b4c0f=async(_0x4b874b,_0xc91895)=>{const _0x4b1e13=_0x2848ce;_0x4b874b[_0x4b1e13(0x1fe)]=_0x4b1e13(0x208),await saveImportJson(_0x5e4227[_0x4b1e13(0x1f7)],_0x41822b);throw Error(_0xc91895);},_0x3bbad4=async _0x2dd3f0=>{const _0x3e69ea=_0x2848ce,_0x3b621a=await _0x22ebd3[_0x3e69ea(0x21c)](_0x2dd3f0['taskId']);if(!Array[_0x3e69ea(0x207)](_0x3b621a))throw Error(_0x3e69ea(0x21d));if(_0x2dd3f0[_0x3e69ea(0x1fe)]===_0x3e69ea(0x1dd)&&_0x3b621a['length'])return _0x1b4c0f(_0x2dd3f0,_0x3e69ea(0x1e6));if(!_0x3b621a[_0x3e69ea(0x1f2)]){if(_0x2dd3f0[_0x3e69ea(0x1fe)]===_0x3e69ea(0x1de)||_0x2dd3f0[_0x3e69ea(0x1e8)]['length'])return _0x1b4c0f(_0x2dd3f0,_0x3e69ea(0x1e2));return![];}if(_0x3b621a['length']!==_0x2dd3f0['rowIndexes'][_0x3e69ea(0x1f2)])return _0x1b4c0f(_0x2dd3f0,_0x3e69ea(0x228));const _0x155954=_0x3b621a[_0x3e69ea(0x1ec)](_0x121e88=>_0x121e88?.['id']);if(_0x155954['some'](_0x227803=>!validId(_0x227803)))return _0x1b4c0f(_0x2dd3f0,_0x3e69ea(0x1e7));const _0x194ecb=_0x155954;if(_0x194ecb[_0x3e69ea(0x1e9)](_0x5085ac=>!validId(_0x5085ac))||_0x194ecb['some']((_0x2cf08f,_0x360140)=>_0x360140>0x0&&_0x2cf08f<=_0x194ecb[_0x360140-0x1])||_0x2dd3f0[_0x3e69ea(0x1e8)][_0x3e69ea(0x1f2)]&&canonical(_0x194ecb)!==canonical(_0x2dd3f0[_0x3e69ea(0x1e8)]))return _0x1b4c0f(_0x2dd3f0,'Import\x20generated\x20ID\x20conflict.');const _0x477e36=new Set(_0x41822b[_0x3e69ea(0x219)][_0x3e69ea(0x1e1)](_0x3dd7ea=>_0x3dd7ea!==_0x2dd3f0)[_0x3e69ea(0x222)](_0x55d656=>_0x55d656[_0x3e69ea(0x1e8)]));if(_0x194ecb[_0x3e69ea(0x1e9)](_0x18fa7f=>_0x477e36['has'](_0x18fa7f)))return _0x1b4c0f(_0x2dd3f0,_0x3e69ea(0x218));for(let _0x26aba6=0x0;_0x26aba6<_0x3b621a[_0x3e69ea(0x1f2)];_0x26aba6++){const _0x48b77b=_0x107182[_0x3e69ea(0x229)][_0x2dd3f0[_0x3e69ea(0x1f9)][_0x26aba6]][_0x3e69ea(0x1ed)];if(Object[_0x3e69ea(0x220)](_0x48b77b)[_0x3e69ea(0x1e9)](_0x4b6d28=>!sameImportValue(_0x48b77b[_0x4b6d28],_0x3b621a[_0x26aba6][_0x4b6d28],_0x107182['imageFields']?.[_0x3e69ea(0x1d7)](_0x4b6d28)&&!_0x107182[_0x3e69ea(0x225)]?.[_0x3e69ea(0x1d7)](_0x4b6d28))))return _0x1b4c0f(_0x2dd3f0,_0x3e69ea(0x209)+_0x107182[_0x3e69ea(0x229)][_0x2dd3f0[_0x3e69ea(0x1f9)][_0x26aba6]][_0x3e69ea(0x1f8)]+'.');}return _0x2dd3f0[_0x3e69ea(0x1e8)]=_0x194ecb,_0x2dd3f0['status']=_0x3e69ea(0x1de),await saveImportJson(_0x5e4227[_0x3e69ea(0x1f7)],_0x41822b),!![];};if(_0x41822b[_0x2848ce(0x219)][_0x2848ce(0x1e9)](_0x3924d7=>_0x3924d7[_0x2848ce(0x1fe)]==='conflict'&&!(_0x5e4227[_0x2848ce(0x1ee)]&&_0x5e4227['reconcileImageConflicts']&&_0x107182['imageFields']?.[_0x2848ce(0x1f2)]&&_0x3924d7['ids'][_0x2848ce(0x1f2)]===_0x3924d7['rowIndexes']['length'])))throw Error(_0x2848ce(0x1d3));if(_0x5e4227[_0x2848ce(0x1ee)]){for(const _0x286bf1 of _0x41822b['batches'])await _0x3bbad4(_0x286bf1);}for(const _0x311ae7 of _0x41822b[_0x2848ce(0x219)]){if(_0x311ae7[_0x2848ce(0x1fe)]==='succeeded')continue;if(!_0x5e4227[_0x2848ce(0x1ee)])await _0x3bbad4(_0x311ae7);_0x311ae7[_0x2848ce(0x1fe)]='pending',await saveImportJson(_0x5e4227[_0x2848ce(0x1f7)],_0x41822b),_0x2cce3d++;const _0x18f400=_0x311ae7[_0x2848ce(0x1f9)][_0x2848ce(0x1ec)](_0x27b52e=>_0x107182[_0x2848ce(0x229)][_0x27b52e][_0x2848ce(0x1ed)]),_0x1affe1=Date[_0x2848ce(0x205)](),_0xd248a7={'batch':_0x2cce3d,'rowStart':_0x107182[_0x2848ce(0x229)][_0x311ae7['rowIndexes'][0x0]][_0x2848ce(0x1f8)],'rowEnd':_0x107182['rows'][_0x311ae7[_0x2848ce(0x1f9)]['at'](-0x1)]['rowNumber'],'count':_0x18f400[_0x2848ce(0x1f2)],'bytes':_0x444986(_0x311ae7['rowIndexes'],_0x311ae7[_0x2848ce(0x1d5)]),'elapsedMs':0x0,'status':_0x2848ce(0x1f5)};_0x38be23[_0x2848ce(0x1e0)](_0xd248a7);try{const _0x3423f0=await _0x22ebd3['write'](_0x18f400,_0x311ae7[_0x2848ce(0x1d5)]);if(!_0x3423f0||_0x3423f0[_0x2848ce(0x1e3)]!==_0x18f400[_0x2848ce(0x1f2)]||!Array['isArray'](_0x3423f0[_0x2848ce(0x1e8)])||_0x3423f0['ids']['length']!==_0x18f400[_0x2848ce(0x1f2)]||_0x3423f0[_0x2848ce(0x1e8)][_0x2848ce(0x1e9)](_0x51d73d=>!validId(_0x51d73d))||new Set(_0x3423f0[_0x2848ce(0x1e8)])['size']!==_0x3423f0['ids'][_0x2848ce(0x1f2)])throw Error(_0x2848ce(0x20c));_0x311ae7[_0x2848ce(0x1e8)]=_0x3423f0[_0x2848ce(0x1e8)],await saveImportJson(_0x5e4227['checkpoint'],_0x41822b);if(!await _0x3bbad4(_0x311ae7))throw Error(_0x2848ce(0x1ef));}catch(_0x99c343){if(_0x311ae7['status']==='conflict')throw _0x99c343;try{await _0x3bbad4(_0x311ae7);}catch(_0x55078f){if(_0x311ae7[_0x2848ce(0x1fe)]===_0x2848ce(0x208))throw _0x55078f;}if(_0x311ae7[_0x2848ce(0x1fe)]!==_0x2848ce(0x1de))throw Error(_0x2848ce(0x1d8));}finally{_0xd248a7[_0x2848ce(0x212)]=Date[_0x2848ce(0x205)]()-_0x1affe1,_0xd248a7[_0x2848ce(0x1fe)]=_0x311ae7[_0x2848ce(0x1fe)]===_0x2848ce(0x1de)?_0x2848ce(0x1de):_0x311ae7['status']==='conflict'?'conflict':_0x2848ce(0x1f5);}}const _0x2dad16={'status':_0x2848ce(0x1f4),..._0x5de5a4()};return await saveImportJson(_0x5e4227[_0x2848ce(0x1df)],_0x2dad16),_0x2dad16;}catch(_0xf51e2b){if(_0x34f5f4)await saveImportJson(_0x5e4227['report'],{'status':_0x2848ce(0x1d2),..._0x5de5a4(),'message':_0xf51e2b[_0x2848ce(0x1d4)]});throw _0xf51e2b;}finally{await _0x55717f();}}
|
|
1
|
+
function a139_0x3a22(_0x46c7e5,_0x4a182e){_0x46c7e5=_0x46c7e5-0x108;const _0x3ae718=a139_0x3ae7();let _0x3a2266=_0x3ae718[_0x46c7e5];return _0x3a2266;}const a139_0x16ac01=a139_0x3a22;(function(_0x151151,_0x33cb2f){const _0x106efd=a139_0x3a22,_0x2b280d=_0x151151();while(!![]){try{const _0x40920a=parseInt(_0x106efd(0x13b))/0x1*(-parseInt(_0x106efd(0x15c))/0x2)+-parseInt(_0x106efd(0x143))/0x3+parseInt(_0x106efd(0x12e))/0x4+-parseInt(_0x106efd(0x10a))/0x5+-parseInt(_0x106efd(0x110))/0x6*(parseInt(_0x106efd(0x160))/0x7)+-parseInt(_0x106efd(0x153))/0x8*(parseInt(_0x106efd(0x12d))/0x9)+parseInt(_0x106efd(0x119))/0xa;if(_0x40920a===_0x33cb2f)break;else _0x2b280d['push'](_0x2b280d['shift']());}catch(_0x5ae593){_0x2b280d['push'](_0x2b280d['shift']());}}}(a139_0x3ae7,0xb2601));import{randomBytes,randomUUID}from'node:crypto';function a139_0x3ae7(){const _0x54c40f=['ENOENT','Import\x20content\x20conflict\x20at\x20Excel\x20row\x20','taskId','Excel\x20contains\x20no\x20valid\x20data\x20rows.','rows','stringify','Auto-ID\x20import\x20items\x20cannot\x20contain\x20a\x20primary\x20key.','add','strategy','byteLength','schemaFingerprint','utf8','isInteger','107397jeYtpn','3057368sodWlk','Invalid\x20import\x20task\x20readback\x20response.','incomplete','rowNumber','elapsedMs','toString','schemaVersion','resume','string','Excel\x20contains\x20invalid\x20rows;\x20no\x20data\x20was\x20written.','The\x20import\x20write\x20outcome\x20is\x20unknown.\x20Resume\x20to\x20reconcile\x20the\x20original\x20task\x20marker\x20before\x20continuing.','unsent','maxBatchSize','6NJozov','has','map','message','schemaHash','number','imageFields','keys','2901204ovMgoW','Cannot\x20read\x20the\x20import\x20checkpoint.','Import\x20checkpoint\x20does\x20not\x20match\x20the\x20input,\x20target\x20or\x20identity.','The\x20auto-ID\x20runner\x20requires\x20the\x20v2\x20task\x20readback\x20contract.','rowIndexes','Import\x20checkpoint\x20contains\x20duplicate\x20generated\x20IDs.','runtimeDomain','actorId','checkpoint','warnings','Excel\x20row\x20','datasetCode','binding','onCheckpointReady','Import\x20generated\x20ID\x20collision.','maxBatchBytes','840eFoSsH','succeeded','Invalid\x20import\x20batch\x20size.','Import\x20task\x20marker\x20collision;\x20stop\x20without\x20replacing\x20the\x20marker.','unknown','appCode','size','conflict','now','76904PdasRj','readTask','count','pending','2166654xhAnxw','batches','isSafeInteger','reduce','\x20exceeds\x20the\x20import\x20request\x20size\x20limit.','hasOwn','Import\x20generated\x20ID\x20conflict.','write','push','1831335Mjucjv','values','completed','length','report','Previously\x20imported\x20records\x20are\x20no\x20longer\x20visible;\x20recovery\x20conflict.','18qRZSZw','includes','version','Import\x20checkpoint\x20already\x20exists;\x20use\x20--resume.','code','ids','some','batchSize','sheet','37118610SGbDbN','fileHash','status','errors','isArray','filter','mappingHash'];a139_0x3ae7=function(){return _0x54c40f;};return a139_0x3ae7();}import{lstat,readFile}from'node:fs/promises';import{acquireLock,assertImportContract,assertImportPaths,canonical,sameImportValue,resolveImportOutputPath,saveImportJson}from'./runner.js';const validId=_0x39a688=>typeof _0x39a688===a139_0x16ac01(0x140)&&Number[a139_0x16ac01(0x162)](_0x39a688)&&_0x39a688>0x0;export async function runAutoIdExcelImport(_0x58b037){const _0x3a14a2=a139_0x16ac01,_0x1e7c0c={..._0x58b037,'checkpoint':await resolveImportOutputPath(_0x58b037[_0x3a14a2(0x14b)]),'report':await resolveImportOutputPath(_0x58b037[_0x3a14a2(0x10e)])},{manifest:_0x259a72,contract:_0x1c50ee,api:_0x2207d1}=_0x1e7c0c;assertImportContract(_0x1c50ee,_0x1e7c0c['appCode'],_0x1e7c0c[_0x3a14a2(0x14e)]);if(_0x1c50ee[_0x3a14a2(0x134)]!==0x2||!_0x2207d1[_0x3a14a2(0x15d)])throw Error(_0x3a14a2(0x146));if(_0x259a72[_0x3a14a2(0x11c)][_0x3a14a2(0x10d)])throw Error(_0x3a14a2(0x137));if(!_0x259a72[_0x3a14a2(0x124)]['length'])throw Error(_0x3a14a2(0x123));if(!Number[_0x3a14a2(0x12c)](_0x1e7c0c[_0x3a14a2(0x117)])||_0x1e7c0c[_0x3a14a2(0x117)]<0x1||_0x1e7c0c[_0x3a14a2(0x117)]>_0x1c50ee[_0x3a14a2(0x13a)])throw Error(_0x3a14a2(0x155));assertImportPaths(_0x1e7c0c[_0x3a14a2(0x14b)],_0x1e7c0c[_0x3a14a2(0x10e)]);if(_0x259a72[_0x3a14a2(0x124)][_0x3a14a2(0x116)](_0x10de99=>Object[_0x3a14a2(0x165)](_0x10de99[_0x3a14a2(0x10b)],'id')))throw Error(_0x3a14a2(0x126));const _0x46cc64=(_0x4bc5f5,_0x10797b)=>Buffer[_0x3a14a2(0x129)](JSON[_0x3a14a2(0x125)]({'schemaFingerprint':_0x1c50ee[_0x3a14a2(0x12a)],'taskId':_0x10797b,'items':_0x4bc5f5[_0x3a14a2(0x13d)](_0x52c308=>_0x259a72[_0x3a14a2(0x124)][_0x52c308]['values'])}),_0x3a14a2(0x12b)),_0x110c70=[];let _0xdc2b67=[];for(let _0x478e33=0x0;_0x478e33<_0x259a72[_0x3a14a2(0x124)][_0x3a14a2(0x10d)];_0x478e33++){if(_0x46cc64([_0x478e33],0x2**0x34)>_0x1c50ee['maxBatchBytes'])throw Error(_0x3a14a2(0x14d)+_0x259a72[_0x3a14a2(0x124)][_0x478e33]['rowNumber']+_0x3a14a2(0x164));_0xdc2b67['length']&&(_0xdc2b67['length']===_0x1e7c0c['batchSize']||_0x46cc64([..._0xdc2b67,_0x478e33],0x2**0x34)>_0x1c50ee[_0x3a14a2(0x152)])&&(_0x110c70['push'](_0xdc2b67),_0xdc2b67=[]),_0xdc2b67['push'](_0x478e33);}if(_0xdc2b67[_0x3a14a2(0x10d)])_0x110c70['push'](_0xdc2b67);const _0x186596={'appCode':_0x1e7c0c[_0x3a14a2(0x158)],'datasetCode':_0x1e7c0c[_0x3a14a2(0x14e)],'runtimeDomain':_0x1e7c0c[_0x3a14a2(0x149)],'actorId':_0x1c50ee[_0x3a14a2(0x14a)],'fileHash':_0x259a72[_0x3a14a2(0x11a)],'mappingHash':_0x259a72[_0x3a14a2(0x11f)],'schemaHash':_0x259a72[_0x3a14a2(0x13f)],'remoteSchemaHash':_0x1c50ee[_0x3a14a2(0x12a)],'batchSize':_0x1e7c0c['batchSize'],'maxBatchBytes':_0x1c50ee[_0x3a14a2(0x152)],'sheet':_0x259a72[_0x3a14a2(0x118)],'strategy':_0x1c50ee[_0x3a14a2(0x128)]},_0x66489f=await acquireLock(_0x1e7c0c[_0x3a14a2(0x14b)]);let _0x5b3b4d;const _0x2ba89c=Date['now']();let _0x4ede4f=0x0;const _0x296bbc=[],_0x5842b5=_0x3a783e=>_0x5b3b4d?.[_0x3a14a2(0x161)][_0x3a14a2(0x11e)](_0x51b1ef=>_0x51b1ef[_0x3a14a2(0x11b)]===_0x3a783e)[_0x3a14a2(0x163)]((_0x2cdd84,_0x190ca0)=>_0x2cdd84+_0x190ca0[_0x3a14a2(0x147)]['length'],0x0)??0x0,_0x52c085=()=>({'importId':_0x5b3b4d?.['importId'],'sourceRows':_0x259a72[_0x3a14a2(0x124)]['length'],'emptyRows':_0x259a72['emptyRows'][_0x3a14a2(0x10d)],'succeeded':_0x5842b5(_0x3a14a2(0x154)),'unknown':_0x5842b5(_0x3a14a2(0x15f)),'conflicts':_0x5842b5(_0x3a14a2(0x15a)),'notAttempted':_0x5842b5(_0x3a14a2(0x139)),'batches':_0x4ede4f,'batchResults':_0x296bbc,'elapsedMs':Date[_0x3a14a2(0x15b)]()-_0x2ba89c,'checkpoint':_0x1e7c0c[_0x3a14a2(0x14b)],'report':_0x1e7c0c[_0x3a14a2(0x10e)],'warnings':_0x259a72[_0x3a14a2(0x14c)]});try{if(_0x1e7c0c[_0x3a14a2(0x135)]){try{_0x5b3b4d=JSON['parse'](await readFile(_0x1e7c0c[_0x3a14a2(0x14b)],_0x3a14a2(0x12b)));}catch{throw Error(_0x3a14a2(0x144));}if(!_0x5b3b4d||_0x5b3b4d[_0x3a14a2(0x112)]!==0x2||typeof _0x5b3b4d['importId']!==_0x3a14a2(0x136)||!_0x5b3b4d['importId']||canonical(_0x5b3b4d[_0x3a14a2(0x14f)])!==canonical(_0x186596)||!Array[_0x3a14a2(0x11d)](_0x5b3b4d[_0x3a14a2(0x161)])||_0x5b3b4d[_0x3a14a2(0x161)][_0x3a14a2(0x10d)]!==_0x110c70['length']||new Set(_0x5b3b4d[_0x3a14a2(0x161)][_0x3a14a2(0x13d)](_0x2f5c2d=>_0x2f5c2d[_0x3a14a2(0x122)]))[_0x3a14a2(0x159)]!==_0x110c70[_0x3a14a2(0x10d)]||_0x5b3b4d[_0x3a14a2(0x161)]['some']((_0x5c2e8b,_0x18cb89)=>!validId(_0x5c2e8b[_0x3a14a2(0x122)])||_0x5c2e8b[_0x3a14a2(0x122)]>0x2**0x34||canonical(_0x5c2e8b[_0x3a14a2(0x147)])!==canonical(_0x110c70[_0x18cb89])||![_0x3a14a2(0x139),_0x3a14a2(0x15f),_0x3a14a2(0x154),_0x3a14a2(0x15a)]['includes'](_0x5c2e8b['status'])||!Array[_0x3a14a2(0x11d)](_0x5c2e8b[_0x3a14a2(0x115)])||_0x5c2e8b[_0x3a14a2(0x115)][_0x3a14a2(0x116)](_0xc4ff5c=>!validId(_0xc4ff5c))||new Set(_0x5c2e8b[_0x3a14a2(0x115)])[_0x3a14a2(0x159)]!==_0x5c2e8b['ids']['length']||_0x5c2e8b['ids']['length']!==0x0&&_0x5c2e8b[_0x3a14a2(0x115)]['length']!==_0x5c2e8b[_0x3a14a2(0x147)][_0x3a14a2(0x10d)]||_0x5c2e8b['status']===_0x3a14a2(0x154)&&_0x5c2e8b[_0x3a14a2(0x115)]['length']!==_0x5c2e8b[_0x3a14a2(0x147)][_0x3a14a2(0x10d)]||_0x5c2e8b[_0x3a14a2(0x11b)]===_0x3a14a2(0x139)&&_0x5c2e8b[_0x3a14a2(0x115)][_0x3a14a2(0x10d)]!==0x0))throw Error(_0x3a14a2(0x145));const _0x50b0f8=_0x5b3b4d['batches']['flatMap'](_0x10668c=>_0x10668c['ids']);if(new Set(_0x50b0f8)[_0x3a14a2(0x159)]!==_0x50b0f8['length'])throw Error(_0x3a14a2(0x148));}else{try{await lstat(_0x1e7c0c[_0x3a14a2(0x14b)]);throw Error(_0x3a14a2(0x113));}catch(_0x2f01c9){if(_0x2f01c9[_0x3a14a2(0x114)]!==_0x3a14a2(0x120))throw _0x2f01c9;}const _0x5b57c0=new Set();_0x5b3b4d={'version':0x2,'importId':randomUUID(),'binding':_0x186596,'batches':_0x110c70['map'](_0xf6cc6e=>{const _0x3bc806=_0x3a14a2;let _0x101c5e;do{_0x101c5e=Number(BigInt('0x'+randomBytes(0x7)[_0x3bc806(0x133)]('hex'))&(0x1n<<0x34n)-0x1n)+0x1;}while(_0x5b57c0[_0x3bc806(0x13c)](_0x101c5e));return _0x5b57c0[_0x3bc806(0x127)](_0x101c5e),{'taskId':_0x101c5e,'rowIndexes':_0xf6cc6e,'ids':[],'status':_0x3bc806(0x139)};})},await saveImportJson(_0x1e7c0c[_0x3a14a2(0x14b)],_0x5b3b4d);}await _0x1e7c0c[_0x3a14a2(0x150)]?.();const _0xbd06f5=_0x5b3b4d,_0x120a2d=async(_0x33e19e,_0x5cd330)=>{const _0x5dfece=_0x3a14a2;_0x33e19e[_0x5dfece(0x11b)]=_0x5dfece(0x15a),await saveImportJson(_0x1e7c0c[_0x5dfece(0x14b)],_0xbd06f5);throw Error(_0x5cd330);},_0x32d645=async _0x24843d=>{const _0x588cc6=_0x3a14a2,_0x27cd3e=await _0x2207d1[_0x588cc6(0x15d)](_0x24843d[_0x588cc6(0x122)]);if(!Array[_0x588cc6(0x11d)](_0x27cd3e))throw Error(_0x588cc6(0x12f));if(_0x24843d[_0x588cc6(0x11b)]==='unsent'&&_0x27cd3e[_0x588cc6(0x10d)])return _0x120a2d(_0x24843d,_0x588cc6(0x156));if(!_0x27cd3e[_0x588cc6(0x10d)]){if(_0x24843d[_0x588cc6(0x11b)]===_0x588cc6(0x154)||_0x24843d[_0x588cc6(0x115)][_0x588cc6(0x10d)])return _0x120a2d(_0x24843d,_0x588cc6(0x10f));return![];}if(_0x27cd3e['length']!==_0x24843d[_0x588cc6(0x147)]['length'])return _0x120a2d(_0x24843d,'Partial\x20import\x20task\x20readback\x20conflict.');const _0x43692a=_0x27cd3e[_0x588cc6(0x13d)](_0x121263=>_0x121263?.['id']);if(_0x43692a['some'](_0x2a83d1=>!validId(_0x2a83d1)))return _0x120a2d(_0x24843d,_0x588cc6(0x166));const _0x3f43f5=_0x43692a;if(_0x3f43f5[_0x588cc6(0x116)](_0x45d12d=>!validId(_0x45d12d))||_0x3f43f5[_0x588cc6(0x116)]((_0x464e8a,_0x4f135d)=>_0x4f135d>0x0&&_0x464e8a<=_0x3f43f5[_0x4f135d-0x1])||_0x24843d[_0x588cc6(0x115)][_0x588cc6(0x10d)]&&canonical(_0x3f43f5)!==canonical(_0x24843d[_0x588cc6(0x115)]))return _0x120a2d(_0x24843d,'Import\x20generated\x20ID\x20conflict.');const _0x28c091=new Set(_0xbd06f5['batches'][_0x588cc6(0x11e)](_0x1829d6=>_0x1829d6!==_0x24843d)['flatMap'](_0xa9f234=>_0xa9f234[_0x588cc6(0x115)]));if(_0x3f43f5[_0x588cc6(0x116)](_0xaf90d2=>_0x28c091['has'](_0xaf90d2)))return _0x120a2d(_0x24843d,_0x588cc6(0x151));for(let _0x2490f5=0x0;_0x2490f5<_0x27cd3e[_0x588cc6(0x10d)];_0x2490f5++){const _0x14380c=_0x259a72[_0x588cc6(0x124)][_0x24843d[_0x588cc6(0x147)][_0x2490f5]][_0x588cc6(0x10b)];if(Object[_0x588cc6(0x142)](_0x14380c)[_0x588cc6(0x116)](_0x2146ef=>!sameImportValue(_0x14380c[_0x2146ef],_0x27cd3e[_0x2490f5][_0x2146ef],_0x259a72[_0x588cc6(0x141)]?.[_0x588cc6(0x111)](_0x2146ef)&&!_0x259a72['uploadFields']?.[_0x588cc6(0x111)](_0x2146ef))))return _0x120a2d(_0x24843d,_0x588cc6(0x121)+_0x259a72[_0x588cc6(0x124)][_0x24843d[_0x588cc6(0x147)][_0x2490f5]]['rowNumber']+'.');}return _0x24843d['ids']=_0x3f43f5,_0x24843d[_0x588cc6(0x11b)]=_0x588cc6(0x154),await saveImportJson(_0x1e7c0c[_0x588cc6(0x14b)],_0xbd06f5),!![];};if(_0xbd06f5[_0x3a14a2(0x161)][_0x3a14a2(0x116)](_0x1897c6=>_0x1897c6['status']==='conflict'&&!(_0x1e7c0c['resume']&&_0x1e7c0c['reconcileImageConflicts']&&_0x259a72[_0x3a14a2(0x141)]?.['length']&&_0x1897c6[_0x3a14a2(0x115)]['length']===_0x1897c6[_0x3a14a2(0x147)]['length'])))throw Error('Import\x20checkpoint\x20contains\x20a\x20content\x20conflict.');if(_0x1e7c0c['resume']){for(const _0x32fd3d of _0xbd06f5['batches'])await _0x32d645(_0x32fd3d);}for(const _0x2d1c08 of _0xbd06f5[_0x3a14a2(0x161)]){if(_0x2d1c08[_0x3a14a2(0x11b)]===_0x3a14a2(0x154))continue;if(!_0x1e7c0c['resume'])await _0x32d645(_0x2d1c08);_0x2d1c08[_0x3a14a2(0x11b)]=_0x3a14a2(0x15f),await saveImportJson(_0x1e7c0c[_0x3a14a2(0x14b)],_0xbd06f5),_0x4ede4f++;const _0x6f51ec=_0x2d1c08[_0x3a14a2(0x147)]['map'](_0x3f4f6e=>_0x259a72[_0x3a14a2(0x124)][_0x3f4f6e][_0x3a14a2(0x10b)]),_0x4486c0=Date[_0x3a14a2(0x15b)](),_0x3ed1ad={'batch':_0x4ede4f,'rowStart':_0x259a72[_0x3a14a2(0x124)][_0x2d1c08[_0x3a14a2(0x147)][0x0]][_0x3a14a2(0x131)],'rowEnd':_0x259a72['rows'][_0x2d1c08[_0x3a14a2(0x147)]['at'](-0x1)]['rowNumber'],'count':_0x6f51ec[_0x3a14a2(0x10d)],'bytes':_0x46cc64(_0x2d1c08[_0x3a14a2(0x147)],_0x2d1c08[_0x3a14a2(0x122)]),'elapsedMs':0x0,'status':_0x3a14a2(0x157)};_0x296bbc[_0x3a14a2(0x109)](_0x3ed1ad);try{const _0x29258c=await _0x2207d1[_0x3a14a2(0x108)](_0x6f51ec,_0x2d1c08[_0x3a14a2(0x122)]);if(!_0x29258c||_0x29258c[_0x3a14a2(0x15e)]!==_0x6f51ec['length']||!Array[_0x3a14a2(0x11d)](_0x29258c[_0x3a14a2(0x115)])||_0x29258c['ids'][_0x3a14a2(0x10d)]!==_0x6f51ec[_0x3a14a2(0x10d)]||_0x29258c[_0x3a14a2(0x115)][_0x3a14a2(0x116)](_0x378dd6=>!validId(_0x378dd6))||new Set(_0x29258c['ids'])[_0x3a14a2(0x159)]!==_0x29258c[_0x3a14a2(0x115)][_0x3a14a2(0x10d)])throw Error('Invalid\x20write\x20result.');_0x2d1c08[_0x3a14a2(0x115)]=_0x29258c[_0x3a14a2(0x115)],await saveImportJson(_0x1e7c0c[_0x3a14a2(0x14b)],_0xbd06f5);if(!await _0x32d645(_0x2d1c08))throw Error('Incomplete\x20readback.');}catch(_0x469a52){if(_0x2d1c08[_0x3a14a2(0x11b)]===_0x3a14a2(0x15a))throw _0x469a52;try{await _0x32d645(_0x2d1c08);}catch(_0xfe61a3){if(_0x2d1c08['status']==='conflict')throw _0xfe61a3;}if(_0x2d1c08['status']!==_0x3a14a2(0x154))throw Error(_0x3a14a2(0x138));}finally{_0x3ed1ad[_0x3a14a2(0x132)]=Date[_0x3a14a2(0x15b)]()-_0x4486c0,_0x3ed1ad[_0x3a14a2(0x11b)]=_0x2d1c08[_0x3a14a2(0x11b)]===_0x3a14a2(0x154)?_0x3a14a2(0x154):_0x2d1c08['status']===_0x3a14a2(0x15a)?'conflict':'unknown';}}const _0x46da72={'status':_0x3a14a2(0x10c),..._0x52c085()};return await saveImportJson(_0x1e7c0c[_0x3a14a2(0x10e)],_0x46da72),_0x46da72;}catch(_0x4b7c00){if(_0x5b3b4d)await saveImportJson(_0x1e7c0c[_0x3a14a2(0x10e)],{'status':_0x3a14a2(0x130),..._0x52c085(),'message':_0x4b7c00[_0x3a14a2(0x13e)]});throw _0x4b7c00;}finally{await _0x66489f();}}
|