@lovrabet/lovrabet-cli 2.3.8-beta.7 → 2.3.9-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/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/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.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-sdk-errors.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/runtime-user-id.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
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3dcb3f,_0x3c4b9d){const _0x149e92=a128_0xdfa5,_0x3d93d4=_0x3dcb3f();while(!![]){try{const _0x4bcedc=-parseInt(_0x149e92(0x183))/0x1*(parseInt(_0x149e92(0x17d))/0x2)+-parseInt(_0x149e92(0x19c))/0x3+parseInt(_0x149e92(0x19a))/0x4*(-parseInt(_0x149e92(0x179))/0x5)+-parseInt(_0x149e92(0x173))/0x6+-parseInt(_0x149e92(0x1a4))/0x7+parseInt(_0x149e92(0x1a1))/0x8+parseInt(_0x149e92(0x17b))/0x9;if(_0x4bcedc===_0x3c4b9d)break;else _0x3d93d4['push'](_0x3d93d4['shift']());}catch(_0x3a10a1){_0x3d93d4['push'](_0x3d93d4['shift']());}}}(a128_0x2a97,0x3ce4f));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(_0xd6382e){const _0x216d0f=a128_0xdfa5;return void _0xd6382e,AUTH_MODE[_0x216d0f(0x1b6)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x1626e9,_0x2bc718){const _0xb635f7=a128_0xdfa5,_0x3938b8=typeof _0x2bc718['app']===_0xb635f7(0x177)&&_0x2bc718[_0xb635f7(0x191)][_0xb635f7(0x1b5)]();return{'rawFlags':_0x2bc718,'appCode':_0x1626e9[_0xb635f7(0x176)]||productEnv('APPCODE')||(_0x3938b8?undefined:readAppCodeFromConfig()),'appCodeSource':_0x1626e9[_0xb635f7(0x188)],'apiDomain':getApiDomain(),'runtimeDomain':getRuntimeDomain(),'isNonInteractive':isNonInteractiveMode(_0x2bc718),'defaultFormat':_0x1626e9[_0xb635f7(0x194)],'defaultPageSize':_0x1626e9[_0xb635f7(0x187)],'defaultVerbose':_0x1626e9[_0xb635f7(0x1ac)],'riskLevel':_0x1626e9[_0xb635f7(0x174)],'nativeToolAvailable':_0x1626e9['nativeToolAvailable'],'accessKey':_0x1626e9['accessKey'],'env':_0x1626e9[_0xb635f7(0x1aa)],'mergedCli':{'defaultApp':_0x1626e9[_0xb635f7(0x175)],'currentApp':_0x1626e9['currentApp'],'appCode':_0x1626e9[_0xb635f7(0x176)]}};}export function createLovrabetRunnerAdapter(_0x10f198={}){const _0x3b1b38=a128_0xdfa5,_0x21791a={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x3b1b38(0x19f)](_0x2e9fab=>PIPELINE_FLAG_NAMES[_0x3b1b38(0x17e)](_0x2e9fab[_0x3b1b38(0x186)]))[_0x3b1b38(0x18e)](({name:_0x7099,type:_0x1a1a58,description:_0x17a6aa})=>({'name':_0x7099,'type':_0x1a1a58,'description':_0x17a6aa})),'formatOutput':_0x10f198['formatOutput']??formatOutput,'getCommandLabel'(_0x5976b1){const _0x3591e5=_0x3b1b38;return CLI_BIN_NAME+'\x20'+_0x5976b1[_0x3591e5(0x198)]+'\x20'+_0x5976b1[_0x3591e5(0x1a8)];},'riskPolicy':{'onViolation'(_0x58daca,{def:_0x2d7467,env:_0x12f9d6}){const _0x3d1682=_0x3b1b38;if(shouldRouteWriteToNativeTool(_0x2d7467,_0x12f9d6))return;console[_0x3d1682(0x1a9)](_0x58daca);},'createError'(_0x3a09ad,{def:_0x118c32,env:_0x39030e}){const _0x3a3b56=_0x3b1b38;if(shouldRouteWriteToNativeTool(_0x118c32,_0x39030e))return CliErrors[_0x3a3b56(0x18a)](CLI_BIN_NAME+'\x20'+_0x118c32[_0x3a3b56(0x198)]+'\x20'+_0x118c32[_0x3a3b56(0x1a8)]);return CliErrors[_0x3a3b56(0x199)](_0x3a09ad);}},async 'prepare'(_0x47c8f5,_0x24f577){const _0x38abc0=_0x3b1b38,_0x3e118a=resolveAuthMode(_0x24f577);if(_0x47c8f5[_0x38abc0(0x1b3)]!==![]){if(!_0x24f577[_0x38abc0(0x172)])throw CliErrors[_0x38abc0(0x1a3)](_0x38abc0(0x17c)+PRODUCT_CONFIG[_0x38abc0(0x1a2)]+_0x38abc0(0x192)+productEnvName(_0x38abc0(0x1a6))+'.');const {setActiveAK:_0x4deef2}=await import('../core/api-client.js');_0x4deef2(_0x24f577[_0x38abc0(0x172)]);}let _0x1e4fa0='';if(_0x47c8f5[_0x38abc0(0x180)]!==![]){_0x1e4fa0=_0x24f577['appCode']??'',_0x1e4fa0=await resolveExplicitAppName(_0x47c8f5,_0x24f577,_0x1e4fa0);if(!_0x1e4fa0){await assertSelectedAppNameIsRuntimeAccessible(_0x47c8f5,_0x24f577);throw CliErrors['configMissing'](_0x38abc0(0x195)+PRODUCT_CONFIG[_0x38abc0(0x1a2)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x47c8f5,_0x24f577,_0x1e4fa0);}if(_0x1e4fa0){const {initSdkClient:_0x131068}=await import(_0x38abc0(0x189));_0x131068({'appCode':_0x1e4fa0,'env':_0x24f577[_0x38abc0(0x1aa)]??_0x38abc0(0x18f),'runtimeDomain':_0x24f577[_0x38abc0(0x1b8)],'accessKey':_0x24f577[_0x38abc0(0x172)],'authMode':_0x3e118a}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x24f577[_0x38abc0(0x182)]},'numbers':{'pagesize':_0x24f577[_0x38abc0(0x19d)]}},'extras':{'appCode':_0x1e4fa0,'cookie':'','apiDomain':_0x24f577[_0x38abc0(0x181)],'apiDir':'','accessKey':_0x24f577[_0x38abc0(0x172)],'envName':_0x24f577[_0x38abc0(0x1aa)],'mergedCli':_0x24f577[_0x38abc0(0x18c)]}};},'confirmHighRisk':_0x10f198[_0x3b1b38(0x190)]??(async({def:_0x5624dd,env:_0x340ec0,flags:_0x284741,commandLabel:_0x2e3a05})=>{const _0x5aa8f7=_0x3b1b38;if(_0x340ec0[_0x5aa8f7(0x1af)]){const _0x2eaf69=reconstructCommandArgv(_0x5624dd,_0x284741);throw CliErrors[_0x5aa8f7(0x19b)](_0x5aa8f7(0x1b1)+_0x2e3a05+_0x5aa8f7(0x1ab)+(_0x5aa8f7(0x1b0)+_0x2eaf69));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x5624dd,_0x2e3a05,_0x284741),'createCancelledError':_0x53c155=>CliErrors[_0x5aa8f7(0x199)](_0x53c155)});}),'mapDryRunError'(_0x44f57a){return mapUserFacingExecuteError(_0x44f57a);},'mapExecuteError'(_0x3d7944){return mapUserFacingExecuteError(_0x3d7944);},async 'finalize'(){await finalizeLovrabetRuntimeState();}};return _0x21791a;}function shouldRouteWriteToNativeTool(_0x10d50e,_0x362839){const _0x180535=a128_0xdfa5;return _0x362839[_0x180535(0x193)]===!![]&&(_0x10d50e[_0x180535(0x197)]===_0x180535(0x1b4)||_0x10d50e[_0x180535(0x197)]===_0x180535(0x196));}const terminalRunnerAdapter=createLovrabetRunnerAdapter();export async function finalizeLovrabetRuntimeState(){const _0x27c0d5=a128_0xdfa5;try{if(sdkClientInitialized){const {clearSdkClient:_0x36d3c6}=await import(_0x27c0d5(0x189));_0x36d3c6();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x3a7059}=await import('../core/api-client.js');_0x3a7059();}}function a128_0x2a97(){const _0x117470=['high-risk-write','risk','service','cancelled','3628MzBlFh','validation','367284tKwFKz','defaultPageSize','nonInteractive','filter','resolve','2538488CzyETF','newConfigFileName','authRequired','2521925YWiYix','install','ACCESS_KEY','update','command','error','env','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','verbose','execute','.appcode\x20to\x20','isNonInteractive','\x20\x20To\x20proceed:\x20','High-risk\x20operation\x20`','object','requiresAuth','write','trim','ClientAk','appcode','runtimeDomain','rawFlags','accessKey','2353278vgYoNf','riskLevel','defaultApp','appCode','string','cli-skill','1805hWBthh','_notice','10476585bRPVnn','Set\x20accessKey\x20in\x20','9870BaojYb','has','local-alias','requiresAppCode','apiDomain','defaultVerbose','6UBbvOB','appcode\x20\x22','Run\x20`','name','pageSize','appCodeSource','../core/sdk-client.js','nativeToolRequired','../commands/app/remote-source.js','mergedCli','Unknown\x20app:\x20','map','production','confirmHighRisk','app','\x20or\x20pass\x20','nativeToolAvailable','format','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20'];a128_0x2a97=function(){return _0x117470;};return a128_0x2a97();}async function resolveExplicitAppName(_0x1893f9,_0x55f4d2,_0x14b7da){const _0x306bb3=a128_0xdfa5;if(_0x1893f9[_0x306bb3(0x180)]===![])return _0x14b7da;const _0x301514=typeof _0x55f4d2['rawFlags']['app']===_0x306bb3(0x177)?_0x55f4d2[_0x306bb3(0x171)][_0x306bb3(0x191)][_0x306bb3(0x1b5)]():'';if(!_0x301514)return _0x14b7da;const _0x2ce681=typeof _0x55f4d2[_0x306bb3(0x171)][_0x306bb3(0x1b7)]===_0x306bb3(0x177)&&_0x55f4d2[_0x306bb3(0x171)]['appcode'][_0x306bb3(0x1b5)]()||productEnv('APPCODE');if(_0x2ce681||_0x55f4d2[_0x306bb3(0x188)]===_0x306bb3(0x17f))return _0x14b7da;const {getRemoteAppList:_0x1118eb}=await import(_0x306bb3(0x18b)),_0xdb4c07=await _0x1118eb({'env':_0x55f4d2[_0x306bb3(0x1aa)]??_0x306bb3(0x18f),'accessKey':_0x55f4d2[_0x306bb3(0x172)]}),_0x626d9d=findAppByName(_0xdb4c07['items'],_0x301514);if(_0x626d9d&&!isRuntimeAccessibleApp(_0x626d9d))throw runtimeInaccessibleAppError(_0x626d9d,'\x22'+_0x301514+'\x22');const _0x14279d=_0x626d9d?.[_0x306bb3(0x176)]?.[_0x306bb3(0x1b5)]();if(_0x14279d)return _0x14279d;throw CliErrors[_0x306bb3(0x19b)](_0x306bb3(0x18d)+_0x301514,_0x306bb3(0x185)+CLI_BIN_NAME+'\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.'+_0x301514+_0x306bb3(0x1ae)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x27681b,_0x275871){const _0x56206a=a128_0xdfa5;if(_0x27681b[_0x56206a(0x180)]===![]||!_0x275871[_0x56206a(0x172)])return;const _0x59dc7e=(typeof _0x275871[_0x56206a(0x171)]['app']===_0x56206a(0x177)&&_0x275871[_0x56206a(0x171)][_0x56206a(0x191)][_0x56206a(0x1b5)]()?_0x275871[_0x56206a(0x171)][_0x56206a(0x191)]:_0x275871[_0x56206a(0x18c)]?.['currentApp']??_0x275871[_0x56206a(0x18c)]?.[_0x56206a(0x175)])?.[_0x56206a(0x1b5)]();if(!_0x59dc7e)return;const {getRemoteAppList:_0x16d406}=await import(_0x56206a(0x18b)),_0xecd81d=await _0x16d406({'env':_0x275871['env']??_0x56206a(0x18f),'accessKey':_0x275871[_0x56206a(0x172)]}),_0x28f21e=findAppByName(_0xecd81d['items'],_0x59dc7e);if(_0x28f21e&&!isRuntimeAccessibleApp(_0x28f21e))throw runtimeInaccessibleAppError(_0x28f21e,'\x22'+_0x59dc7e+'\x22');}function a128_0xdfa5(_0x53c870,_0x352093){_0x53c870=_0x53c870-0x171;const _0x2a9714=a128_0x2a97();let _0xdfa5cb=_0x2a9714[_0x53c870];return _0xdfa5cb;}async function assertAppCodeIsRuntimeAccessible(_0x137f8e,_0x1102ed,_0x4b7381){const _0x585943=a128_0xdfa5;if(_0x137f8e['requiresAppCode']===![]||!_0x1102ed[_0x585943(0x172)])return;const {getRemoteAppList:_0x24f14e}=await import('../commands/app/remote-source.js'),_0x3c86eb=await _0x24f14e({'env':_0x1102ed[_0x585943(0x1aa)]??_0x585943(0x18f),'accessKey':_0x1102ed[_0x585943(0x172)]}),_0xf28fc7=findAppByCode(_0x3c86eb['items'],_0x4b7381);if(_0xf28fc7&&!isRuntimeAccessibleApp(_0xf28fc7))throw runtimeInaccessibleAppError(_0xf28fc7,_0x585943(0x184)+_0x4b7381+'\x22');}export async function runCommand(_0x3a4f6b,_0x35a1ed,_0x528147=terminalRunnerAdapter){assertKnownCommandFlags(_0x3a4f6b,_0x35a1ed['rawFlags']),await runCommandWithAdapter(shouldApplyVersionPolicy(_0x3a4f6b)?withVersionPolicy(_0x3a4f6b):_0x3a4f6b,_0x35a1ed,_0x528147);}function shouldApplyVersionPolicy(_0x435820){const _0x500fe0=a128_0xdfa5;if([_0x500fe0(0x1a7),'schema','doctor']['includes'](_0x435820[_0x500fe0(0x198)]))return![];return!(_0x435820[_0x500fe0(0x198)]===_0x500fe0(0x178)&&_0x435820['command']===_0x500fe0(0x1a5));}function withVersionPolicy(_0x14f597){return{..._0x14f597,async 'execute'(_0xb2812a){const _0x372230=a128_0xdfa5,_0x6aabbe=await checkCliVersion();assertCliVersionSupported(_0x6aabbe);const _0x546e9c=shouldResolveUpdateNotice(_0xb2812a)?resolveLatestUpdateNotice(_0x6aabbe)['catch'](()=>null):Promise[_0x372230(0x1a0)](null),_0x4210a4=await _0x14f597[_0x372230(0x1ad)](_0xb2812a);return attachUpdateNotice(_0x4210a4,await _0x546e9c);}};}function shouldResolveUpdateNotice(_0x4524d6){const _0x15da36=a128_0xdfa5;return _0x4524d6[_0x15da36(0x194)]==='pretty'&&!_0x4524d6[_0x15da36(0x19e)];}function attachUpdateNotice(_0x4378a3,_0x19c8c8){const _0xf63252=a128_0xdfa5;if(!_0x19c8c8||!_0x4378a3||typeof _0x4378a3!==_0xf63252(0x1b2))return _0x4378a3;const _0x46d6e4=_0x4378a3,_0x1bbb34=typeof _0x46d6e4[_0xf63252(0x17a)]===_0xf63252(0x1b2)&&_0x46d6e4[_0xf63252(0x17a)]!==null?_0x46d6e4[_0xf63252(0x17a)]:{};return{..._0x46d6e4,'_notice':{..._0x1bbb34,'update':_0x19c8c8}};}
|
|
1
|
+
(function(_0x1bf20f,_0x1237cd){const _0x42f896=a128_0x5b31,_0x49ccdb=_0x1bf20f();while(!![]){try{const _0x3a1a35=-parseInt(_0x42f896(0x198))/0x1+-parseInt(_0x42f896(0x1a0))/0x2*(parseInt(_0x42f896(0x16c))/0x3)+-parseInt(_0x42f896(0x16d))/0x4*(parseInt(_0x42f896(0x19c))/0x5)+parseInt(_0x42f896(0x194))/0x6*(parseInt(_0x42f896(0x18e))/0x7)+parseInt(_0x42f896(0x178))/0x8*(-parseInt(_0x42f896(0x159))/0x9)+-parseInt(_0x42f896(0x19f))/0xa+parseInt(_0x42f896(0x183))/0xb;if(_0x3a1a35===_0x1237cd)break;else _0x49ccdb['push'](_0x49ccdb['shift']());}catch(_0x4ea57a){_0x49ccdb['push'](_0x49ccdb['shift']());}}}(a128_0x22a4,0x7726f));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';function a128_0x22a4(){const _0x508ff1=['has','699055bueinc','defaultApp','defaultVerbose','includes','write','../commands/app/remote-source.js','18ckTUbD','validation','object','ClientAk','419532MqGwIR','pageSize','newConfigFileName','requiresAuth','25CkRVlR','env','High-risk\x20operation\x20`','3781130QAuYvW','16iTwofp','rawFlags','verbose','schema','cancelled','6651tnBNHG','nativeToolAvailable','currentApp','error','Unknown\x20app:\x20','appcode\x20\x22','high-risk-write','APPCODE','cli-skill','filter','execute','update','authRequired','accessKey','../core/sdk-client.js','confirmHighRisk','../core/api-client.js','\x20\x20To\x20proceed:\x20','runtimeDomain','320883lPQLxq','344116PQCxyn','Run\x20`','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','riskLevel','map','command','trim','Set\x20accessKey\x20in\x20','appCode','nativeToolRequired','local-alias','7568dKnqts','string','mergedCli','isNonInteractive','appCodeSource','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','format','nonInteractive','service','resolve','requiresAppCode','32681264fCQwRS','formatOutput','app','name','\x20or\x20pass\x20','items','defaultPageSize','production','pretty','appcode'];a128_0x22a4=function(){return _0x508ff1;};return a128_0x22a4();}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(_0xa24c64){const _0x250eab=a128_0x5b31;return void _0xa24c64,AUTH_MODE[_0x250eab(0x197)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x18160b,_0x29cd3e){const _0x213a06=a128_0x5b31,_0x3e5106=typeof _0x29cd3e[_0x213a06(0x185)]==='string'&&_0x29cd3e[_0x213a06(0x185)][_0x213a06(0x173)]();return{'rawFlags':_0x29cd3e,'appCode':_0x18160b[_0x213a06(0x175)]||productEnv(_0x213a06(0x160))||(_0x3e5106?undefined:readAppCodeFromConfig()),'appCodeSource':_0x18160b['appCodeSource'],'apiDomain':getApiDomain(),'runtimeDomain':getRuntimeDomain(),'isNonInteractive':isNonInteractiveMode(_0x29cd3e),'defaultFormat':_0x18160b[_0x213a06(0x17e)],'defaultPageSize':_0x18160b[_0x213a06(0x199)],'defaultVerbose':_0x18160b[_0x213a06(0x1a2)],'riskLevel':_0x18160b[_0x213a06(0x170)],'nativeToolAvailable':_0x18160b[_0x213a06(0x15a)],'accessKey':_0x18160b['accessKey'],'env':_0x18160b[_0x213a06(0x19d)],'mergedCli':{'defaultApp':_0x18160b[_0x213a06(0x18f)],'currentApp':_0x18160b[_0x213a06(0x15b)],'appCode':_0x18160b[_0x213a06(0x175)]}};}export function createLovrabetRunnerAdapter(_0x2bf852={}){const _0x1a65ca=a128_0x5b31,_0x1a2364={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x1a65ca(0x162)](_0x4673b4=>PIPELINE_FLAG_NAMES[_0x1a65ca(0x18d)](_0x4673b4[_0x1a65ca(0x186)]))[_0x1a65ca(0x171)](({name:_0x472f0c,type:_0x3173e8,description:_0xac8f58})=>({'name':_0x472f0c,'type':_0x3173e8,'description':_0xac8f58})),'formatOutput':_0x2bf852[_0x1a65ca(0x184)]??formatOutput,'getCommandLabel'(_0x37b4f6){const _0x325c26=_0x1a65ca;return CLI_BIN_NAME+'\x20'+_0x37b4f6[_0x325c26(0x180)]+'\x20'+_0x37b4f6['command'];},'riskPolicy':{'onViolation'(_0x24dacd,{def:_0x384faf,env:_0x191064}){const _0x21bf21=_0x1a65ca;if(shouldRouteWriteToNativeTool(_0x384faf,_0x191064))return;console[_0x21bf21(0x15c)](_0x24dacd);},'createError'(_0x5478ae,{def:_0x487fb4,env:_0x2c4440}){const _0xecc045=_0x1a65ca;if(shouldRouteWriteToNativeTool(_0x487fb4,_0x2c4440))return CliErrors[_0xecc045(0x176)](CLI_BIN_NAME+'\x20'+_0x487fb4['service']+'\x20'+_0x487fb4[_0xecc045(0x172)]);return CliErrors['cancelled'](_0x5478ae);}},async 'prepare'(_0x2385ef,_0x547fe3){const _0xbf3872=_0x1a65ca,_0x1bfcdc=resolveAuthMode(_0x547fe3);if(_0x2385ef[_0xbf3872(0x19b)]!==![]){if(!_0x547fe3[_0xbf3872(0x166)])throw CliErrors[_0xbf3872(0x165)](_0xbf3872(0x174)+PRODUCT_CONFIG['newConfigFileName']+_0xbf3872(0x187)+productEnvName('ACCESS_KEY')+'.');const {setActiveAK:_0x108dfc}=await import('../core/api-client.js');_0x108dfc(_0x547fe3[_0xbf3872(0x166)]);}let _0x4f6496='';if(_0x2385ef[_0xbf3872(0x182)]!==![]){_0x4f6496=_0x547fe3['appCode']??'',_0x4f6496=await resolveExplicitAppName(_0x2385ef,_0x547fe3,_0x4f6496);if(!_0x4f6496){await assertSelectedAppNameIsRuntimeAccessible(_0x2385ef,_0x547fe3);throw CliErrors['configMissing'](_0xbf3872(0x16f)+PRODUCT_CONFIG[_0xbf3872(0x19a)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x2385ef,_0x547fe3,_0x4f6496);}if(_0x4f6496){const {initSdkClient:_0x226acb}=await import(_0xbf3872(0x167));_0x226acb({'appCode':_0x4f6496,'env':_0x547fe3[_0xbf3872(0x19d)]??_0xbf3872(0x18a),'runtimeDomain':_0x547fe3[_0xbf3872(0x16b)],'accessKey':_0x547fe3[_0xbf3872(0x166)],'authMode':_0x1bfcdc}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x547fe3[_0xbf3872(0x190)]},'numbers':{'pagesize':_0x547fe3[_0xbf3872(0x189)]}},'extras':{'appCode':_0x4f6496,'cookie':'','apiDomain':_0x547fe3['apiDomain'],'apiDir':'','accessKey':_0x547fe3[_0xbf3872(0x166)],'envName':_0x547fe3[_0xbf3872(0x19d)],'mergedCli':_0x547fe3[_0xbf3872(0x17a)]}};},'confirmHighRisk':_0x2bf852[_0x1a65ca(0x168)]??(async({def:_0x5d52c2,env:_0x423b09,flags:_0x548b6d,commandLabel:_0x203e7d})=>{const _0x2d6d2e=_0x1a65ca;if(_0x423b09[_0x2d6d2e(0x17b)]){const _0x3da53e=reconstructCommandArgv(_0x5d52c2,_0x548b6d);throw CliErrors[_0x2d6d2e(0x195)](_0x2d6d2e(0x19e)+_0x203e7d+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0x2d6d2e(0x16a)+_0x3da53e));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x5d52c2,_0x203e7d,_0x548b6d),'createCancelledError':_0x50df6e=>CliErrors[_0x2d6d2e(0x158)](_0x50df6e)});}),'mapDryRunError'(_0x517331){return mapUserFacingExecuteError(_0x517331);},'mapExecuteError'(_0x4e48e8){return mapUserFacingExecuteError(_0x4e48e8);},async 'finalize'(){await finalizeLovrabetRuntimeState();}};return _0x1a2364;}function shouldRouteWriteToNativeTool(_0xca2cee,_0x39a8f2){const _0x5868fd=a128_0x5b31;return _0x39a8f2[_0x5868fd(0x15a)]===!![]&&(_0xca2cee['risk']===_0x5868fd(0x192)||_0xca2cee['risk']===_0x5868fd(0x15f));}const terminalRunnerAdapter=createLovrabetRunnerAdapter();export async function finalizeLovrabetRuntimeState(){const _0x13ef45=a128_0x5b31;try{if(sdkClientInitialized){const {clearSdkClient:_0x17d73a}=await import(_0x13ef45(0x167));_0x17d73a();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0xd4533b}=await import(_0x13ef45(0x169));_0xd4533b();}}async function resolveExplicitAppName(_0x6c88c0,_0x45ea26,_0x968f98){const _0x39d487=a128_0x5b31;if(_0x6c88c0['requiresAppCode']===![])return _0x968f98;const _0x4deb1c=typeof _0x45ea26[_0x39d487(0x1a1)][_0x39d487(0x185)]===_0x39d487(0x179)?_0x45ea26[_0x39d487(0x1a1)][_0x39d487(0x185)][_0x39d487(0x173)]():'';if(!_0x4deb1c)return _0x968f98;const _0x2d2e41=typeof _0x45ea26[_0x39d487(0x1a1)][_0x39d487(0x18c)]==='string'&&_0x45ea26[_0x39d487(0x1a1)]['appcode'][_0x39d487(0x173)]()||productEnv(_0x39d487(0x160));if(_0x2d2e41||_0x45ea26[_0x39d487(0x17c)]===_0x39d487(0x177))return _0x968f98;const {getRemoteAppList:_0x2f6ce7}=await import(_0x39d487(0x193)),_0xc6bc8d=await _0x2f6ce7({'env':_0x45ea26['env']??_0x39d487(0x18a),'accessKey':_0x45ea26[_0x39d487(0x166)]}),_0x157184=findAppByName(_0xc6bc8d[_0x39d487(0x188)],_0x4deb1c);if(_0x157184&&!isRuntimeAccessibleApp(_0x157184))throw runtimeInaccessibleAppError(_0x157184,'\x22'+_0x4deb1c+'\x22');const _0x540b42=_0x157184?.[_0x39d487(0x175)]?.[_0x39d487(0x173)]();if(_0x540b42)return _0x540b42;throw CliErrors[_0x39d487(0x195)](_0x39d487(0x15d)+_0x4deb1c,_0x39d487(0x16e)+CLI_BIN_NAME+_0x39d487(0x17d)+_0x4deb1c+'.appcode\x20to\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x10f712,_0x54983e){const _0x1b373b=a128_0x5b31;if(_0x10f712[_0x1b373b(0x182)]===![]||!_0x54983e[_0x1b373b(0x166)])return;const _0x577801=(typeof _0x54983e['rawFlags'][_0x1b373b(0x185)]===_0x1b373b(0x179)&&_0x54983e[_0x1b373b(0x1a1)][_0x1b373b(0x185)][_0x1b373b(0x173)]()?_0x54983e['rawFlags'][_0x1b373b(0x185)]:_0x54983e[_0x1b373b(0x17a)]?.[_0x1b373b(0x15b)]??_0x54983e[_0x1b373b(0x17a)]?.['defaultApp'])?.[_0x1b373b(0x173)]();if(!_0x577801)return;const {getRemoteAppList:_0x164921}=await import('../commands/app/remote-source.js'),_0x3f9d89=await _0x164921({'env':_0x54983e[_0x1b373b(0x19d)]??_0x1b373b(0x18a),'accessKey':_0x54983e[_0x1b373b(0x166)]}),_0x106556=findAppByName(_0x3f9d89[_0x1b373b(0x188)],_0x577801);if(_0x106556&&!isRuntimeAccessibleApp(_0x106556))throw runtimeInaccessibleAppError(_0x106556,'\x22'+_0x577801+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x288756,_0x8b3e6c,_0xc9944a){const _0x5cab9f=a128_0x5b31;if(_0x288756[_0x5cab9f(0x182)]===![]||!_0x8b3e6c[_0x5cab9f(0x166)])return;const {getRemoteAppList:_0xc10aed}=await import(_0x5cab9f(0x193)),_0x15269d=await _0xc10aed({'env':_0x8b3e6c[_0x5cab9f(0x19d)]??'production','accessKey':_0x8b3e6c[_0x5cab9f(0x166)]}),_0x45cc2e=findAppByCode(_0x15269d[_0x5cab9f(0x188)],_0xc9944a);if(_0x45cc2e&&!isRuntimeAccessibleApp(_0x45cc2e))throw runtimeInaccessibleAppError(_0x45cc2e,_0x5cab9f(0x15e)+_0xc9944a+'\x22');}export async function runCommand(_0x1c5379,_0xf944f6,_0x14e916=terminalRunnerAdapter){const _0x9cec71=a128_0x5b31;assertKnownCommandFlags(_0x1c5379,_0xf944f6[_0x9cec71(0x1a1)]),await runCommandWithAdapter(shouldApplyVersionPolicy(_0x1c5379)?withVersionPolicy(_0x1c5379):_0x1c5379,_0xf944f6,_0x14e916);}function shouldApplyVersionPolicy(_0x7534){const _0x44c68c=a128_0x5b31;if([_0x44c68c(0x164),_0x44c68c(0x157),'doctor'][_0x44c68c(0x191)](_0x7534[_0x44c68c(0x180)]))return![];return!(_0x7534[_0x44c68c(0x180)]===_0x44c68c(0x161)&&_0x7534[_0x44c68c(0x172)]==='install');}function withVersionPolicy(_0x4b1884){return{..._0x4b1884,async 'execute'(_0x47c8c7){const _0x297a13=a128_0x5b31,_0x5038b4=await checkCliVersion();assertCliVersionSupported(_0x5038b4);const _0x396c2a=shouldResolveUpdateNotice(_0x47c8c7)?resolveLatestUpdateNotice(_0x5038b4)['catch'](()=>null):Promise[_0x297a13(0x181)](null),_0x155df8=await _0x4b1884[_0x297a13(0x163)](_0x47c8c7);return attachUpdateNotice(_0x155df8,await _0x396c2a);}};}function a128_0x5b31(_0x323c07,_0x2d346c){_0x323c07=_0x323c07-0x157;const _0x22a45b=a128_0x22a4();let _0x5b3118=_0x22a45b[_0x323c07];return _0x5b3118;}function shouldResolveUpdateNotice(_0x51ed76){const _0x132350=a128_0x5b31;return _0x51ed76[_0x132350(0x17e)]===_0x132350(0x18b)&&!_0x51ed76[_0x132350(0x17f)];}function attachUpdateNotice(_0x1df868,_0x52f067){const _0x5ea8a1=a128_0x5b31;if(!_0x52f067||!_0x1df868||typeof _0x1df868!==_0x5ea8a1(0x196))return _0x1df868;const _0x31d079=_0x1df868,_0x1d2448=typeof _0x31d079['_notice']===_0x5ea8a1(0x196)&&_0x31d079['_notice']!==null?_0x31d079['_notice']:{};return{..._0x31d079,'_notice':{..._0x1d2448,'update':_0x52f067}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xcb9c72,_0xb65178){const _0x2021f6=a129_0x44d4,_0x510cde=_0xcb9c72();while(!![]){try{const _0x37ae7a=-parseInt(_0x2021f6(0xaa))/0x1*(parseInt(_0x2021f6(0xb3))/0x2)+-parseInt(_0x2021f6(0xa7))/0x3*(parseInt(_0x2021f6(0xac))/0x4)+-parseInt(_0x2021f6(0xb8))/0x5+parseInt(_0x2021f6(0xae))/0x6+parseInt(_0x2021f6(0xb0))/0x7*(-parseInt(_0x2021f6(0xaf))/0x8)+-parseInt(_0x2021f6(0xb9))/0x9+parseInt(_0x2021f6(0xba))/0xa;if(_0x37ae7a===_0xb65178)break;else _0x510cde['push'](_0x510cde['shift']());}catch(_0x1dbb34){_0x510cde['push'](_0x510cde['shift']());}}}(a129_0x1b9d,0x5bb6b));import{buildSchemaPayload as a129_0x179bd5}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';function a129_0x44d4(_0x35ec66,_0x127989){_0x35ec66=_0x35ec66-0xa7;const _0x1b9d5a=a129_0x1b9d();let _0x44d46f=_0x1b9d5a[_0x35ec66];return _0x44d46f;}export async function buildSchemaPayload(){const _0xad80db=a129_0x44d4,{serviceRegistry:_0x33e6a0,findDefinition:_0x54a2f0}=await import('../commands/registry.js'),_0x551e93=new Set(_0x33e6a0[_0xad80db(0xb5)](_0x2a9379=>_0x2a9379['service'])),_0x11cac2=listDynamicServiceEntries()[_0xad80db(0xb7)](_0x375b98=>!_0x551e93[_0xad80db(0xb6)](_0x375b98[_0xad80db(0xa8)])),_0x368799=a129_0x179bd5({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x33e6a0,_0x11cac2),'buildAllFlags':buildAllFlags,'findDefinition':(_0x846e8b,_0x186889)=>_0x54a2f0(_0x846e8b,_0x186889)??findDynamicServiceDefinition(_0x846e8b,_0x186889)});return normalizeSchemaPayload(_0x368799);}function normalizeSchemaPayload(_0x18a218){const _0x3f3ff0=a129_0x44d4;return{..._0x18a218,'schemaVersion':0x2,'services':_0x18a218[_0x3f3ff0(0xb4)]['map'](_0x16ab1d=>({..._0x16ab1d,'commands':_0x16ab1d[_0x3f3ff0(0xa9)][_0x3f3ff0(0xb5)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x2d4a84){const _0x176d95=a129_0x44d4,_0x35a1aa=_0x2d4a84;return{..._0x2d4a84,'auth':_0x35a1aa[_0x176d95(0xb2)]??(_0x2d4a84[_0x176d95(0xab)]?_0x176d95(0xb1):_0x176d95(0xad))};}function a129_0x1b9d(){const _0x304097=['map','has','filter','12820GwtoVI','210420mvTPoP','12252920DrVAuZ','3czkelx','service','commands','28uppFUz','requiresAuth','2804836Kykzld','none','2487192MYimZl','361760eJXnJf','35uXYhpF','required','auth','22208ihUxnQ','services'];a129_0x1b9d=function(){return _0x304097;};return a129_0x1b9d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a130_0xa77d(){const _0x3b14c6=['32586tUKomN','9640629HOXRHA','2290044HIphrI','16471422ifJwDk','slice','1504cMHMTX','findIndex','6djtKwo','75fLQnAS','5gVsZxL','service','3801ibYviO','10335060OGvoez','length','1110594uWPZHv'];a130_0xa77d=function(){return _0x3b14c6;};return a130_0xa77d();}(function(_0xca44e5,_0x4e5008){const _0x58b4a6=a130_0x3b04,_0x4ff68f=_0xca44e5();while(!![]){try{const _0x3a9952=-parseInt(_0x58b4a6(0x144))/0x1*(-parseInt(_0x58b4a6(0x14b))/0x2)+parseInt(_0x58b4a6(0x143))/0x3*(parseInt(_0x58b4a6(0x14d))/0x4)+parseInt(_0x58b4a6(0x145))/0x5*(-parseInt(_0x58b4a6(0x14a))/0x6)+parseInt(_0x58b4a6(0x147))/0x7*(parseInt(_0x58b4a6(0x141))/0x8)+parseInt(_0x58b4a6(0x14c))/0x9+-parseInt(_0x58b4a6(0x148))/0xa+-parseInt(_0x58b4a6(0x13f))/0xb;if(_0x3a9952===_0x4e5008)break;else _0x4ff68f['push'](_0x4ff68f['shift']());}catch(_0x5738b7){_0x4ff68f['push'](_0x4ff68f['shift']());}}}(a130_0xa77d,0xc93bf));function a130_0x3b04(_0x36df55,_0x48d0a8){_0x36df55=_0x36df55-0x13f;const _0xa77d8d=a130_0xa77d();let _0x3b04c7=_0xa77d8d[_0x36df55];return _0x3b04c7;}export function insertDynamicServicesAfterServiceTree(_0x503dd8,_0x51d6ac){const _0x21893e=a130_0x3b04;if(_0x51d6ac[_0x21893e(0x149)]===0x0)return[..._0x503dd8];const _0x2f4a20=_0x503dd8[_0x21893e(0x142)](_0x2167f3=>_0x2167f3[_0x21893e(0x146)]==='service');if(_0x2f4a20<0x0)return[..._0x503dd8,..._0x51d6ac];return[..._0x503dd8[_0x21893e(0x140)](0x0,_0x2f4a20+0x1),..._0x51d6ac,..._0x503dd8[_0x21893e(0x140)](_0x2f4a20+0x1)];}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a131_0x484f(){var _0x526411=['16dIPwhi','106CEHmWd','3093288HtjoNv','2972295mNFEsS','8502MYCWYv','44730lCdsLx','4066108YTBMUE','370kluqes','2769669XaHPdX','50083GdLOfi','5ZXCkIl'];a131_0x484f=function(){return _0x526411;};return a131_0x484f();}(function(_0x13d41f,_0x4084d0){var _0x53238d=a131_0x71f3,_0x30cd69=_0x13d41f();while(!![]){try{var _0x198ef9=-parseInt(_0x53238d(0x140))/0x1*(-parseInt(_0x53238d(0x148))/0x2)+-parseInt(_0x53238d(0x13f))/0x3+-parseInt(_0x53238d(0x142))/0x4*(-parseInt(_0x53238d(0x146))/0x5)+-parseInt(_0x53238d(0x13e))/0x6+parseInt(_0x53238d(0x144))/0x7+parseInt(_0x53238d(0x147))/0x8*(-parseInt(_0x53238d(0x141))/0x9)+-parseInt(_0x53238d(0x143))/0xa*(-parseInt(_0x53238d(0x145))/0xb);if(_0x198ef9===_0x4084d0)break;else _0x30cd69['push'](_0x30cd69['shift']());}catch(_0x3d7ad7){_0x30cd69['push'](_0x30cd69['shift']());}}}(a131_0x484f,0x7dbc0));function a131_0x71f3(_0x547345,_0x467e05){_0x547345=_0x547345-0x13e;var _0x484f2e=a131_0x484f();var _0x71f324=_0x484f2e[_0x547345];return _0x71f324;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
|
|
@@ -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-11-
|
|
1
|
+
export declare const VERSION = "2.3.9-beta.1";
|
|
2
|
+
export declare const GIT_TAG = "v2.3.9-beta.1";
|
|
3
|
+
export declare const GIT_COMMIT = "1cc525d";
|
|
4
|
+
export declare const BUILD_TIME = "2026-11-03T10:00:03.669Z";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a132_0x586a7f=a132_0x402e;(function(_0x3ffdc4,_0x3d4e98){const _0x48dc71=a132_0x402e,_0x34fd06=_0x3ffdc4();while(!![]){try{const _0x5389e3=-parseInt(_0x48dc71(0xdf))/0x1+-parseInt(_0x48dc71(0xde))/0x2+parseInt(_0x48dc71(0xd9))/0x3*(parseInt(_0x48dc71(0xdb))/0x4)+parseInt(_0x48dc71(0xda))/0x5*(-parseInt(_0x48dc71(0xd4))/0x6)+parseInt(_0x48dc71(0xd8))/0x7*(-parseInt(_0x48dc71(0xe0))/0x8)+parseInt(_0x48dc71(0xd7))/0x9*(-parseInt(_0x48dc71(0xd5))/0xa)+-parseInt(_0x48dc71(0xe1))/0xb*(-parseInt(_0x48dc71(0xd6))/0xc);if(_0x5389e3===_0x3d4e98)break;else _0x34fd06['push'](_0x34fd06['shift']());}catch(_0x23d2a1){_0x34fd06['push'](_0x34fd06['shift']());}}}(a132_0x2f6c,0x78b3f));function a132_0x402e(_0x3a67b0,_0x5e9fdb){_0x3a67b0=_0x3a67b0-0xd4;const _0x2f6c52=a132_0x2f6c();let _0x402ecb=_0x2f6c52[_0x3a67b0];return _0x402ecb;}export const VERSION='2.3.9-beta.1';function a132_0x2f6c(){const _0x1b51c3=['1cc525d','2026-11-03T10:00:03.669Z','994322ZpqLBQ','859364UxFOMS','6155416uUdHBK','1870220ajmLdD','18hKPCGg','203730ITujSC','168rPQcew','117qCJSPm','7rmEeBf','66PFiTCe','220370xqsymZ','115844EdDmbe'];a132_0x2f6c=function(){return _0x1b51c3;};return a132_0x2f6c();}export const GIT_TAG='v2.3.9-beta.1';export const GIT_COMMIT=a132_0x586a7f(0xdc);export const BUILD_TIME=a132_0x586a7f(0xdd);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a133_0x3015(_0x456957,_0x4ecf98){_0x456957=_0x456957-0x1d2;const _0x14bdad=a133_0x14bd();let _0x301513=_0x14bdad[_0x456957];return _0x301513;}const a133_0x37acb3=a133_0x3015;(function(_0x3434cb,_0x1b4f44){const _0x3adbd9=a133_0x3015,_0x4790dc=_0x3434cb();while(!![]){try{const _0x30cde1=parseInt(_0x3adbd9(0x1e7))/0x1+parseInt(_0x3adbd9(0x1e0))/0x2+-parseInt(_0x3adbd9(0x1e5))/0x3*(-parseInt(_0x3adbd9(0x1d5))/0x4)+-parseInt(_0x3adbd9(0x1d2))/0x5*(-parseInt(_0x3adbd9(0x1ec))/0x6)+parseInt(_0x3adbd9(0x1e3))/0x7*(-parseInt(_0x3adbd9(0x1ee))/0x8)+-parseInt(_0x3adbd9(0x1ea))/0x9+-parseInt(_0x3adbd9(0x1dc))/0xa;if(_0x30cde1===_0x1b4f44)break;else _0x4790dc['push'](_0x4790dc['shift']());}catch(_0x1d5984){_0x4790dc['push'](_0x4790dc['shift']());}}}(a133_0x14bd,0x88932));export const ROUTING_CATALOG_DIGEST='886843ef89aa4ff2b36d612e8fbd1b6c1840b37728916fba5699be34129ef579';export const DEFAULT_REGION='cn';export const REGION_VALUES=['cn','id',a133_0x37acb3(0x1de)];export const ENABLED_REGION_VALUES=['cn','id',a133_0x37acb3(0x1de)];function a133_0x14bd(){const _0x26bc6e=['https://daily-runtime.lovrabet.ai','https://runtime.lovrabet.id','19940580kIKXtE','https://api.lovrabet.id','global','Global','2215048cDKVgF','https://daily-api.lovrabet.ai','https://api.lovrabet.com','21MklWUO','Mainland\x20China','186sPZbCa','https://api.lovrabet.ai','627650gCbzVi','https://kb-service-daily.lovrabet.com','Indonesia','3835989BnqhVh','https://kb-service.lovrabet.id','12eoThsD','https://skills-daily.lovrabet.com','88744MOxfzB','1797470lIsyhJ','https://kb-service.lovrabet.com','https://skills.lovrabet.ai','36052tUDxzN','https://skills-daily.lovrabet.ai','china','https://skills.lovrabet.com','indonesia'];a133_0x14bd=function(){return _0x26bc6e;};return a133_0x14bd();}export const OFFICIAL_ROUTING_PROFILES={'cn':{'enabled':!![],'label':a133_0x37acb3(0x1e4),'aliases':[a133_0x37acb3(0x1d7)],'serviceDomains':{'production':{'user':'https://user.lovrabet.com','api':a133_0x37acb3(0x1e2),'runtime':'https://runtime.lovrabet.com','skill':a133_0x37acb3(0x1d8),'kbService':a133_0x37acb3(0x1d3)},'daily':{'user':'https://user-daily.lovrabet.com','api':'https://daily-api.lovrabet.com','runtime':'https://daily-runtime.lovrabet.com','skill':a133_0x37acb3(0x1ed),'kbService':a133_0x37acb3(0x1e8)}}},'id':{'enabled':!![],'label':a133_0x37acb3(0x1e9),'aliases':[a133_0x37acb3(0x1d9)],'serviceDomains':{'production':{'user':'https://user.lovrabet.id','api':a133_0x37acb3(0x1dd),'runtime':a133_0x37acb3(0x1db),'skill':'https://skills.lovrabet.id','kbService':a133_0x37acb3(0x1eb)}}},'global':{'enabled':!![],'label':a133_0x37acb3(0x1df),'aliases':[],'serviceDomains':{'production':{'user':'https://user.lovrabet.ai','api':a133_0x37acb3(0x1e6),'runtime':'https://runtime.lovrabet.ai','skill':a133_0x37acb3(0x1d4)},'daily':{'user':'https://user-daily.lovrabet.ai','api':a133_0x37acb3(0x1e1),'runtime':a133_0x37acb3(0x1da),'skill':a133_0x37acb3(0x1d6)}}}};export const REGION_ALIASES={'china':'cn','indonesia':'id'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a134_0x1f53a2=a134_0x2de2;(function(_0xdc013e,_0x5e2338){const _0x275559=a134_0x2de2,_0x54a985=_0xdc013e();while(!![]){try{const _0x59a0c4=parseInt(_0x275559(0x1b6))/0x1+parseInt(_0x275559(0x1c3))/0x2*(-parseInt(_0x275559(0x1bf))/0x3)+-parseInt(_0x275559(0x1c1))/0x4*(-parseInt(_0x275559(0x1bb))/0x5)+parseInt(_0x275559(0x1b7))/0x6+parseInt(_0x275559(0x1c7))/0x7*(parseInt(_0x275559(0x1c2))/0x8)+parseInt(_0x275559(0x1b9))/0x9+-parseInt(_0x275559(0x1c6))/0xa*(parseInt(_0x275559(0x1c4))/0xb);if(_0x59a0c4===_0x5e2338)break;else _0x54a985['push'](_0x54a985['shift']());}catch(_0x4b8ae5){_0x54a985['push'](_0x54a985['shift']());}}}(a134_0x3305,0xeae5c));export const ENTERPRISE_ROUTING_SCHEMA_DIGEST=a134_0x1f53a2(0x1be);function a134_0x2de2(_0x59ed19,_0x3ff465){_0x59ed19=_0x59ed19-0x1b6;const _0x330506=a134_0x3305();let _0x2de28c=_0x330506[_0x59ed19];return _0x2de28c;}export const ENTERPRISE_ROUTING_PROTOCOL=a134_0x1f53a2(0x1bc);function a134_0x3305(){const _0x18e510=['4ztbTsm','5455307gozeGw','runtimeDomain','80zDkdsG','35deUKae','457353Woniyu','8525844xezTPK','enterprise','11747403aYJoiB','userDomain','19275KZTHJi','lovrabet-routing/v1','apiDomain','e3423cad71c22edb18a8481be7bdb733ff2d4136c31aa3ae6da56271e32cced7','984387gNUdDY','skillDomain','764cERvqP','2665592zRUAVL'];a134_0x3305=function(){return _0x18e510;};return a134_0x3305();}export const ENTERPRISE_ROUTING_KIND=a134_0x1f53a2(0x1b8);export const ENTERPRISE_ROUTING_DOMAIN_FIELDS=[a134_0x1f53a2(0x1ba),'apiDomain',a134_0x1f53a2(0x1c5),'skillDomain','kbServiceDomain'];export const REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS=[a134_0x1f53a2(0x1ba),a134_0x1f53a2(0x1bd),a134_0x1f53a2(0x1c5),a134_0x1f53a2(0x1c0)];
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x104ac3,_0x5bf45d){const _0x6d6372=a135_0x3e55,_0x59a095=_0x104ac3();while(!![]){try{const _0x62b5a2=-parseInt(_0x6d6372(0x10b))/0x1+parseInt(_0x6d6372(0x114))/0x2+-parseInt(_0x6d6372(0x109))/0x3+parseInt(_0x6d6372(0x110))/0x4+-parseInt(_0x6d6372(0x113))/0x5*(parseInt(_0x6d6372(0x10c))/0x6)+parseInt(_0x6d6372(0x115))/0x7+parseInt(_0x6d6372(0x10f))/0x8;if(_0x62b5a2===_0x5bf45d)break;else _0x59a095['push'](_0x59a095['shift']());}catch(_0x40be8d){_0x59a095['push'](_0x59a095['shift']());}}}(a135_0x4fd5,0xb54f8));import{jsx as a135_0x58af94,jsxs as a135_0xa61315}from'react/jsx-runtime';function a135_0x4fd5(){const _0x109086=['35nRxqUm','341712lxLqtl','1643348bpAMCw','2722356BxEtZs','\x20\x20Use\x20','1480275nJeKYF','903198cEBQeF','\x20--help','green','29449560ujhGXX','389164AurUUG','column','\x20to\x20view\x20available\x20commands.'];a135_0x4fd5=function(){return _0x109086;};return a135_0x4fd5();}import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a135_0x3e55(_0x4267bd,_0x5f529b){_0x4267bd=_0x4267bd-0x109;const _0x4fd55b=a135_0x4fd5();let _0x3e55af=_0x4fd55b[_0x4267bd];return _0x3e55af;}export function Help(){const _0x752646=a135_0x3e55,{exit:_0x1c1923}=useApp();return useEffect(()=>{_0x1c1923();},[_0x1c1923]),a135_0xa61315(Box,{'flexDirection':_0x752646(0x111),'marginTop':0x1,'marginBottom':0x1,'children':[a135_0x58af94(Box,{'children':a135_0x58af94(Text,{'bold':!![],'color':_0x752646(0x10e),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a135_0xa61315(Box,{'marginTop':0x1,'children':[a135_0x58af94(Text,{'dimColor':!![],'children':_0x752646(0x10a)}),a135_0x58af94(Text,{'bold':!![],'color':_0x752646(0x10e),'children':CLI_BIN_NAME+_0x752646(0x10d)}),a135_0x58af94(Text,{'dimColor':!![],'children':_0x752646(0x112)})]})]});}
|
package/lib/postinstall.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x351c9c,_0x4b9f6e){const _0x3ff39a=a136_0x584e,_0x1c97ce=_0x351c9c();while(!![]){try{const _0x7bec8a=-parseInt(_0x3ff39a(0x74))/0x1+parseInt(_0x3ff39a(0x80))/0x2+-parseInt(_0x3ff39a(0x81))/0x3*(-parseInt(_0x3ff39a(0x87))/0x4)+-parseInt(_0x3ff39a(0x82))/0x5+parseInt(_0x3ff39a(0x7e))/0x6*(-parseInt(_0x3ff39a(0x78))/0x7)+parseInt(_0x3ff39a(0x7f))/0x8*(-parseInt(_0x3ff39a(0x89))/0x9)+parseInt(_0x3ff39a(0x84))/0xa;if(_0x7bec8a===_0x4b9f6e)break;else _0x1c97ce['push'](_0x1c97ce['shift']());}catch(_0x3ffcec){_0x1c97ce['push'](_0x1c97ce['shift']());}}}(a136_0x1328,0xafc59));function a136_0x1328(){const _0xf02b78=['Repair\x20with:\x20','Installation\x20failed','20136YlzAua','\x20via\x20skills@latest','skillVersion','[BUILTIN_SKILL_INSTALL_','182CMABcF','changed','repairCommand','error','Lovrabet\x20Built-in\x20Skill\x20','already\x20current','106332eXftwH','32wLsKIK','19172DrKIgq','84021kBgZdg','6146865JGiQks','installed','25165150liHgNN','code','\x20at\x20','28gSrlza','installedPath','656793cOYmVn'];a136_0x1328=function(){return _0xf02b78;};return a136_0x1328();}import{installBuiltinSkill}from'./skills/builtin-skill.js';function a136_0x584e(_0x5a311f,_0xa19800){_0x5a311f=_0x5a311f-0x74;const _0x132811=a136_0x1328();let _0x584ee4=_0x132811[_0x5a311f];return _0x584ee4;}export async function runPostinstall(_0x347354={}){const _0x105c19=a136_0x584e,_0x1a69c9=installBuiltinSkill(_0x347354);if(_0x1a69c9['ok']){const _0x66fc5=_0x1a69c9[_0x105c19(0x79)]?_0x105c19(0x83):_0x105c19(0x7d),_0x492c4d=_0x1a69c9[_0x105c19(0x88)]?_0x105c19(0x86)+_0x1a69c9[_0x105c19(0x88)]:_0x105c19(0x75);return console['log'](_0x105c19(0x7c)+_0x1a69c9[_0x105c19(0x76)]+'\x20'+_0x66fc5+_0x492c4d),_0x1a69c9;}const _0x5b3858=_0x105c19(0x77)+(_0x1a69c9[_0x105c19(0x85)]??'FAILED')+']\x20'+(_0x1a69c9[_0x105c19(0x7b)]??_0x105c19(0x8b))+'.\x20'+(_0x105c19(0x8a)+_0x1a69c9[_0x105c19(0x7a)]);if(_0x1a69c9[_0x105c19(0x85)]==='SOURCE_INVALID')throw new Error(_0x5b3858);return console['warn'](_0x5b3858),_0x1a69c9;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5dbadc,_0x1b7816){const _0x5bf831=a137_0x4d9d,_0x377f34=_0x5dbadc();while(!![]){try{const _0x5b059b=-parseInt(_0x5bf831(0xcb))/0x1*(parseInt(_0x5bf831(0xce))/0x2)+-parseInt(_0x5bf831(0xcc))/0x3+parseInt(_0x5bf831(0xda))/0x4*(parseInt(_0x5bf831(0xd9))/0x5)+parseInt(_0x5bf831(0xd0))/0x6*(-parseInt(_0x5bf831(0xd1))/0x7)+parseInt(_0x5bf831(0xcf))/0x8*(parseInt(_0x5bf831(0xd6))/0x9)+-parseInt(_0x5bf831(0xd7))/0xa+parseInt(_0x5bf831(0xd2))/0xb;if(_0x5b059b===_0x1b7816)break;else _0x377f34['push'](_0x377f34['shift']());}catch(_0x4e7907){_0x377f34['push'](_0x377f34['shift']());}}}(a137_0x4564,0x3c205));function a137_0x4564(){const _0x324044=['10OpJZIp','437008wFcctW','description','116851xxYMWj','455298YJhFaC','string','2ZpQREa','3596872ANwzHb','199416AZeVCa','42xyDqfB','5101316aJSdTL','Lovrabet\x20confirmation\x20requires\x20a\x20write\x20command.','replace','slice','9AiqVHz','4175590TJreOI','risk'];a137_0x4564=function(){return _0x324044;};return a137_0x4564();}const DESCRIPTION_MAX_LENGTH=0x1f4;export function buildLovrabetConfirmationRequest(_0x33ab25,_0x42557f,_0x70a0df){const _0x51dc8f=a137_0x4d9d,_0x40c618=normalizeText(_0x33ab25['confirmationDescription'],DESCRIPTION_MAX_LENGTH),_0xb10f72=normalizeText(_0x33ab25[_0x51dc8f(0xdb)],DESCRIPTION_MAX_LENGTH);return{'operation':_0x42557f,'risk':requireWriteRisk(_0x33ab25),'description':_0x40c618||_0xb10f72||'Run\x20this\x20write\x20operation',..._0x70a0df?{'signal':_0x70a0df}:{}};}function a137_0x4d9d(_0x18249b,_0x3bc2aa){_0x18249b=_0x18249b-0xcb;const _0x45642a=a137_0x4564();let _0x4d9da5=_0x45642a[_0x18249b];return _0x4d9da5;}function requireWriteRisk(_0xdc97ad){const _0x1ea3f2=a137_0x4d9d;if(_0xdc97ad[_0x1ea3f2(0xd8)]==='write'||_0xdc97ad[_0x1ea3f2(0xd8)]==='high-risk-write')return _0xdc97ad[_0x1ea3f2(0xd8)];throw new Error(_0x1ea3f2(0xd3));}function normalizeText(_0x595b35,_0x3e6707){const _0x29fe91=a137_0x4d9d;if(typeof _0x595b35!==_0x29fe91(0xcd))return'';return _0x595b35[_0x29fe91(0xd4)](/[\u0000-\u001f\u007f]+/g,'\x20')[_0x29fe91(0xd4)](/\s+/g,'\x20')['trim']()[_0x29fe91(0xd5)](0x0,_0x3e6707);}
|
package/lib/runtime/event.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1e799f,_0xfb2262){const _0x451fd0=a138_0x39b0,_0x3b0d5d=_0x1e799f();while(!![]){try{const _0x33880f=parseInt(_0x451fd0(0x11f))/0x1+-parseInt(_0x451fd0(0x125))/0x2*(-parseInt(_0x451fd0(0x12d))/0x3)+-parseInt(_0x451fd0(0x12c))/0x4*(parseInt(_0x451fd0(0x128))/0x5)+parseInt(_0x451fd0(0x12a))/0x6*(parseInt(_0x451fd0(0x123))/0x7)+-parseInt(_0x451fd0(0x12f))/0x8+-parseInt(_0x451fd0(0x130))/0x9*(-parseInt(_0x451fd0(0x127))/0xa)+-parseInt(_0x451fd0(0x124))/0xb;if(_0x33880f===_0xfb2262)break;else _0x3b0d5d['push'](_0x3b0d5d['shift']());}catch(_0x571ced){_0x3b0d5d['push'](_0x3b0d5d['shift']());}}}(a138_0x16d3,0xb4db3));export function canonicalLovrabetOperation(_0x3a39a1){const _0x33ac47=a138_0x39b0;return[_0x3a39a1[_0x33ac47(0x11d)],..._0x3a39a1[_0x33ac47(0x126)][_0x33ac47(0x121)]()[_0x33ac47(0x11e)](/\s+/)][_0x33ac47(0x12b)](Boolean)[_0x33ac47(0x120)]('.');}export function createLovrabetWriteMetadata(_0x341176,_0x10371a,_0x4e5a58,_0x1f38c8){const _0x12570b=a138_0x39b0;if(_0x1f38c8||_0x4e5a58['ok']!==!![]||_0x341176['risk']!==_0x12570b(0x12e)&&_0x341176[_0x12570b(0x122)]!==_0x12570b(0x129))return undefined;const _0x318b60=_0x341176['writeEventSubject']?.(_0x4e5a58),_0x88fac2={'type':_0x12570b(0x131),'operation':_0x10371a,'risk':_0x341176[_0x12570b(0x122)],..._0x318b60?{'subject':_0x318b60}:{}};return{'lovrabet':{'schemaVersion':0x1,'event':_0x88fac2}};}function a138_0x39b0(_0x1b5b32,_0x3c5a3f){_0x1b5b32=_0x1b5b32-0x11d;const _0x16d37c=a138_0x16d3();let _0x39b0d0=_0x16d37c[_0x1b5b32];return _0x39b0d0;}function a138_0x16d3(){const _0x1b7ed2=['5493796OgIwsV','4Vbngno','command','13835890PPGver','1049365pLDfsd','high-risk-write','3820962dvReAv','filter','20gaxrFL','1317081rUpFnB','write','11256936xFAZHv','9wLUNTa','lovrabet.write.completed','service','split','161408bApJQW','join','trim','risk','14lgRvME'];a138_0x16d3=function(){return _0x1b7ed2;};return a138_0x16d3();}
|
package/lib/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x300247,_0x54a139){const _0x3e5068=a139_0x2bcf,_0x28d39a=_0x300247();while(!![]){try{const _0x2c5012=-parseInt(_0x3e5068(0x1e3))/0x1+parseInt(_0x3e5068(0x1ee))/0x2*(-parseInt(_0x3e5068(0x1e5))/0x3)+parseInt(_0x3e5068(0x1d5))/0x4*(parseInt(_0x3e5068(0x1ea))/0x5)+parseInt(_0x3e5068(0x1db))/0x6*(-parseInt(_0x3e5068(0x1d1))/0x7)+-parseInt(_0x3e5068(0x1f5))/0x8+-parseInt(_0x3e5068(0x1e0))/0x9+-parseInt(_0x3e5068(0x1d6))/0xa*(-parseInt(_0x3e5068(0x1dc))/0xb);if(_0x2c5012===_0x54a139)break;else _0x28d39a['push'](_0x28d39a['shift']());}catch(_0x35046e){_0x28d39a['push'](_0x28d39a['shift']());}}}(a139_0x3ad3,0x3eab5));import{buildConfigFromFlags,initGlobalEnvironment}from'../context.js';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';function a139_0x2bcf(_0x2c831c,_0x32e6aa){_0x2c831c=_0x2c831c-0x1d1;const _0x3ad3ef=a139_0x3ad3();let _0x2bcf6d=_0x3ad3ef[_0x2c831c];return _0x2bcf6d;}import{runSerialized}from'../runtime/queue.js';const defaultPresentation={'present'({result:_0x5606c6,command:_0x3adae8,risk:_0xf324c2,dryRun:_0x4cf30f}){const _0x981753=a139_0x2bcf;return JSON[_0x981753(0x1d7)]({'ok':_0x5606c6['ok'],'command':_0x3adae8,'risk':_0xf324c2,..._0x4cf30f?{'dryRun':!![]}:{},..._0x5606c6[_0x981753(0x1dd)]!==undefined?{'data':_0x5606c6[_0x981753(0x1dd)]}:{},..._0x5606c6[_0x981753(0x1df)]?{'message':_0x5606c6[_0x981753(0x1df)]}:{}});}};export async function invokeLovrabet(_0x44df10,_0x56eddf){const _0x307a54=a139_0x2bcf;throwIfAborted(_0x56eddf[_0x307a54(0x1eb)]);const _0x283e14=await resolveLovrabetInvocation(_0x44df10),_0x215aa4=canonicalLovrabetOperation(_0x283e14[_0x307a54(0x1f4)]);return await confirmWriteBeforeQueue(_0x283e14[_0x307a54(0x1f4)],_0x283e14[_0x307a54(0x1e1)],_0x215aa4,_0x56eddf),runSerialized(async()=>{const _0x5b8044=_0x307a54;throwIfAborted(_0x56eddf[_0x5b8044(0x1eb)]);const _0x58200d={},_0x461cc7=buildConfigFromFlags(_0x283e14[_0x5b8044(0x1e1)]);await initGlobalEnvironment(_0x461cc7);const _0x12ff5b=createPipelineEnv(_0x461cc7,{..._0x283e14[_0x5b8044(0x1e1)],'yes':_0x283e14[_0x5b8044(0x1f4)][_0x5b8044(0x1d2)]==='high-risk-write'?!![]:_0x283e14[_0x5b8044(0x1e1)][_0x5b8044(0x1da)],'nonInteractive':!![]});_0x12ff5b['args']=_0x283e14[_0x5b8044(0x1f0)],_0x12ff5b[_0x5b8044(0x1d8)]=!![],_0x12ff5b['riskLevel']=_0x5b8044(0x1e9);const _0x38ae37=withAbortSignal(_0x283e14[_0x5b8044(0x1f4)],_0x56eddf[_0x5b8044(0x1eb)]),_0x15cfe7=createLovrabetRunnerAdapter({'formatOutput'(_0x14137a,_0x234b70){const _0x1c4c24=_0x5b8044;_0x58200d[_0x1c4c24(0x1e8)]=_0x14137a,_0x58200d[_0x1c4c24(0x1ef)]=_0x234b70[_0x1c4c24(0x1ef)],_0x58200d[_0x1c4c24(0x1d2)]=_0x234b70[_0x1c4c24(0x1d2)],_0x58200d[_0x1c4c24(0x1f6)]=_0x234b70['format'],_0x58200d['dryRun']=_0x234b70['dryRun']===!![];},async 'confirmHighRisk'(){throw new Error('Embedded\x20Lovrabet\x20confirmation\x20must\x20run\x20inside\x20execute.');}});try{await runCommand(_0x38ae37,_0x12ff5b,_0x15cfe7);if(!_0x58200d[_0x5b8044(0x1e8)]||!_0x58200d[_0x5b8044(0x1ef)]||!_0x58200d[_0x5b8044(0x1d2)]||!_0x58200d[_0x5b8044(0x1f6)])throw new Error(_0x5b8044(0x1e7));const _0x4a100a=_0x56eddf[_0x5b8044(0x1f2)]??defaultPresentation,_0x582af1=_0x58200d[_0x5b8044(0x1e6)]===!![],_0x1f52d1={'result':_0x58200d[_0x5b8044(0x1e8)],'command':_0x58200d[_0x5b8044(0x1ef)],'operation':_0x215aa4,'risk':_0x58200d[_0x5b8044(0x1d2)],'format':_0x58200d[_0x5b8044(0x1f6)],'dryRun':_0x582af1},_0x5f49ef=createLovrabetWriteMetadata(_0x283e14[_0x5b8044(0x1f4)],_0x215aa4,_0x58200d[_0x5b8044(0x1e8)],_0x582af1);let _0x9f05c1;try{_0x9f05c1=await _0x4a100a[_0x5b8044(0x1e2)](_0x1f52d1);}catch(_0x4f71e2){if(!_0x5f49ef||_0x4a100a===defaultPresentation)throw _0x4f71e2;_0x9f05c1=await defaultPresentation[_0x5b8044(0x1e2)](_0x1f52d1);}return{'operation':_0x215aa4,'risk':_0x58200d[_0x5b8044(0x1d2)],'mode':_0x582af1?_0x5b8044(0x1ed):_0x5b8044(0x1d9),'result':_0x58200d['result'],'output':_0x9f05c1,..._0x5f49ef?{'metadata':_0x5f49ef}:{}};}finally{await finalizeLovrabetRuntimeState();}});}async function confirmWriteBeforeQueue(_0x41e02f,_0x996bdb,_0x3afba6,_0xd77fa7){const _0x6e721=a139_0x2bcf;if(_0x996bdb[_0x6e721(0x1e6)]===!![]||_0x41e02f[_0x6e721(0x1d2)]!==_0x6e721(0x1f3)&&_0x41e02f[_0x6e721(0x1d2)]!==_0x6e721(0x1e9))return;await _0xd77fa7[_0x6e721(0x1d4)][_0x6e721(0x1de)](buildLovrabetConfirmationRequest(_0x41e02f,_0x3afba6,_0xd77fa7[_0x6e721(0x1eb)]));}function withAbortSignal(_0x2be3af,_0x5bd890){return{..._0x2be3af,async 'execute'(_0x4c046a){return throwIfAborted(_0x5bd890),_0x2be3af['execute']({..._0x4c046a,'signal':_0x5bd890});}};}function throwIfAborted(_0x369ed4){const _0x5c04f7=a139_0x2bcf;if(_0x369ed4?.[_0x5c04f7(0x1ec)])throw _0x369ed4['reason']instanceof Error?_0x369ed4[_0x5c04f7(0x1e4)]:new DOMException(_0x5c04f7(0x1f1),_0x5c04f7(0x1d3));}function a139_0x3ad3(){const _0x12de9c=['isNonInteractive','execute','yes','626358khpNzU','8407718wVgPLL','data','confirm','message','3781476GOnBjJ','rawFlags','present','120638dWgHvU','reason','12531hhaQoV','dryRun','Lovrabet\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','result','high-risk-write','350905jhXEXZ','signal','aborted','dry-run','150jozoGv','command','args','Lovrabet\x20invocation\x20aborted.','presentation','write','definition','1960712gQTrHt','format','21ZMIDKi','risk','AbortError','confirmation','8PMxMQo','20eHrteh','stringify'];a139_0x3ad3=function(){return _0x12de9c;};return a139_0x3ad3();}
|
package/lib/runtime/queue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a140_0x5e8c(_0x4d0451,_0x443d5c){_0x4d0451=_0x4d0451-0x1cb;const _0x2d23e1=a140_0x2d23();let _0x5e8ced=_0x2d23e1[_0x4d0451];return _0x5e8ced;}function a140_0x2d23(){const _0x3b1387=['1610TASMaH','5210172lhGwVN','catch','1624YSnJZW','1260CYvVWI','2352260ZOWTDD','resolve','8785vfhJhr','4188905TaKXBF','873419jSqriZ','6645210IyYcSl'];a140_0x2d23=function(){return _0x3b1387;};return a140_0x2d23();}const a140_0x1a092d=a140_0x5e8c;(function(_0xe159e4,_0xecbd39){const _0x460d09=a140_0x5e8c,_0x2f8fe8=_0xe159e4();while(!![]){try{const _0xf52d3d=parseInt(_0x460d09(0x1d3))/0x1+parseInt(_0x460d09(0x1d5))/0x2*(parseInt(_0x460d09(0x1ce))/0x3)+-parseInt(_0x460d09(0x1cf))/0x4+parseInt(_0x460d09(0x1d2))/0x5+-parseInt(_0x460d09(0x1d4))/0x6+-parseInt(_0x460d09(0x1d1))/0x7*(parseInt(_0x460d09(0x1cd))/0x8)+parseInt(_0x460d09(0x1cb))/0x9;if(_0xf52d3d===_0xecbd39)break;else _0x2f8fe8['push'](_0x2f8fe8['shift']());}catch(_0x33cba1){_0x2f8fe8['push'](_0x2f8fe8['shift']());}}}(a140_0x2d23,0xa57d3));let tail=Promise[a140_0x1a092d(0x1d0)]();export async function runSerialized(_0x46b60f){const _0x9a2946=a140_0x1a092d,_0x5623a4=tail;let _0x15e0ef;tail=new Promise(_0x2472ab=>{_0x15e0ef=_0x2472ab;}),await _0x5623a4[_0x9a2946(0x1cc)](()=>undefined);try{return await _0x46b60f();}finally{_0x15e0ef();}}
|
package/lib/runtime/resolve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x20f93c,_0xb572a6){const _0x502ee4=a141_0x50c5,_0xf7d4bc=_0x20f93c();while(!![]){try{const _0x406839=-parseInt(_0x502ee4(0x14e))/0x1*(-parseInt(_0x502ee4(0x14f))/0x2)+parseInt(_0x502ee4(0x159))/0x3+parseInt(_0x502ee4(0x14b))/0x4*(parseInt(_0x502ee4(0x15a))/0x5)+parseInt(_0x502ee4(0x144))/0x6+-parseInt(_0x502ee4(0x15c))/0x7*(-parseInt(_0x502ee4(0x153))/0x8)+-parseInt(_0x502ee4(0x150))/0x9+parseInt(_0x502ee4(0x149))/0xa*(-parseInt(_0x502ee4(0x154))/0xb);if(_0x406839===_0xb572a6)break;else _0xf7d4bc['push'](_0xf7d4bc['shift']());}catch(_0x3d8f2d){_0xf7d4bc['push'](_0xf7d4bc['shift']());}}}(a141_0x523c,0x9e298));import a141_0x47efc2 from'meow';import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';function a141_0x50c5(_0x2e6cdb,_0x3b1db4){_0x2e6cdb=_0x2e6cdb-0x143;const _0x523c2f=a141_0x523c();let _0x50c5c8=_0x523c2f[_0x2e6cdb];return _0x50c5c8;}import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';export async function resolveLovrabetInvocation(_0x2fec98){const _0x2a8e0c=a141_0x50c5,_0x579d56=a141_0x47efc2('',{'importMeta':import.meta,'argv':_0x2fec98,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x575f3e=[..._0x579d56[_0x2a8e0c(0x151)]],_0x243bb3=_0x579d56['flags'];await correctFlags(_0x243bb3);const _0x3c0921=_0x575f3e[0x0];if(!_0x3c0921)throw CliErrors[_0x2a8e0c(0x147)]('Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.');const _0x10deb1=resolveRemovedCommand(_0x3c0921,_0x575f3e[0x1]);if(_0x10deb1)throw CliErrors['validation'](_0x10deb1[_0x2a8e0c(0x143)],_0x10deb1[_0x2a8e0c(0x156)]);if(!isKnownService(_0x3c0921)){const _0x37b32f=resolveDynamicServiceCommand(_0x575f3e,_0x243bb3);if(!_0x37b32f)throw CliErrors['unknownCommand'](_0x575f3e[_0x2a8e0c(0x158)]('\x20'));return Object['assign'](_0x243bb3,_0x37b32f[_0x2a8e0c(0x152)]),{'definition':_0x37b32f[_0x2a8e0c(0x155)],'rawFlags':_0x243bb3,'args':_0x37b32f[_0x2a8e0c(0x15b)]};}const _0x82db9d=getServiceEntry(_0x3c0921),_0x17c6e7=_0x575f3e[0x1]||_0x82db9d[_0x2a8e0c(0x146)];if(!_0x17c6e7)throw CliErrors[_0x2a8e0c(0x147)](_0x2a8e0c(0x145)+_0x3c0921+'\x22.');const _0x7724de=findDefinition(_0x3c0921,_0x17c6e7);if(!_0x7724de)throw CliErrors[_0x2a8e0c(0x14a)](_0x3c0921+'\x20'+_0x17c6e7);return{'definition':_0x7724de,'rawFlags':_0x243bb3,'args':_0x575f3e[_0x2a8e0c(0x148)](0x2)};}async function correctFlags(_0x4bb68b){const _0x23a904=a141_0x50c5;try{const {correctFlags:_0x46aa06}=await import('../framework/preparse.js'),{getAllDefinitions:_0xa70014}=await import(_0x23a904(0x157)),_0x174b9b=_0xa70014()[_0x23a904(0x14c)](_0x4acb1=>_0x4acb1[_0x23a904(0x152)]??[]),_0x393c9e=_0x46aa06(_0x4bb68b,_0x174b9b);Object[_0x23a904(0x14d)](_0x4bb68b,_0x393c9e[_0x23a904(0x152)]);}catch{}}function a141_0x523c(){const _0x256610=['input','flags','8pfpBvp','18062OEosSD','definition','hint','../commands/registry.js','join','1341828byWoAL','3782475TNRIYp','args','2776333rdPVSt','message','5513922usaWaT','Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','defaultCommand','validation','slice','13980ZQOOZk','unknownCommand','4zSQuhY','flatMap','assign','14597jurSrU','82hkWaZk','1570554pbQyCV'];a141_0x523c=function(){return _0x256610;};return a141_0x523c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a143_0x56c938=a143_0x1a2c;(function(_0x2123b8,_0x4b1716){const _0xce2941=a143_0x1a2c,_0x230e17=_0x2123b8();while(!![]){try{const _0x1d483b=-parseInt(_0xce2941(0x15d))/0x1+parseInt(_0xce2941(0x140))/0x2+-parseInt(_0xce2941(0x111))/0x3+-parseInt(_0xce2941(0x143))/0x4+parseInt(_0xce2941(0x11a))/0x5+-parseInt(_0xce2941(0x158))/0x6*(-parseInt(_0xce2941(0x165))/0x7)+parseInt(_0xce2941(0x126))/0x8;if(_0x1d483b===_0x4b1716)break;else _0x230e17['push'](_0x230e17['shift']());}catch(_0x44ecd4){_0x230e17['push'](_0x230e17['shift']());}}}(a143_0x57ce,0xd4bea));function a143_0x1a2c(_0xc94d79,_0x5d7579){_0xc94d79=_0xc94d79-0x110;const _0x57ceba=a143_0x57ce();let _0x1a2cd4=_0x57ceba[_0xc94d79];return _0x1a2cd4;}import{randomBytes,randomUUID}from'node:crypto';import{lstat,readFile}from'node:fs/promises';function a143_0x57ce(){const _0x335e2e=['hasOwn','Import\x20generated\x20ID\x20collision.','4125435XGOlFV','Partial\x20import\x20task\x20readback\x20conflict.','parse','schemaHash','Import\x20checkpoint\x20already\x20exists;\x20use\x20--resume.','checkpoint','\x20exceeds\x20the\x20import\x20request\x20size\x20limit.','Auto-ID\x20import\x20items\x20cannot\x20contain\x20a\x20primary\x20key.','Incomplete\x20readback.','1252105WYfCsY','rows','emptyRows','strategy','push','onCheckpointReady','Import\x20checkpoint\x20contains\x20duplicate\x20generated\x20IDs.','elapsedMs','Invalid\x20write\x20result.','utf8','code','isArray','17018680CRrrSP','unsent','keys','rowNumber','pending','appCode','Excel\x20contains\x20invalid\x20rows;\x20no\x20data\x20was\x20written.','Import\x20checkpoint\x20contains\x20a\x20content\x20conflict.','Import\x20generated\x20ID\x20conflict.','byteLength','readTask','The\x20import\x20write\x20outcome\x20is\x20unknown.\x20Resume\x20to\x20reconcile\x20the\x20original\x20task\x20marker\x20before\x20continuing.','succeeded','report','uploadFields','filter','schemaVersion','schemaFingerprint','map','Excel\x20contains\x20no\x20valid\x20data\x20rows.','sort','ENOENT','actorId','runtimeDomain','maxBatchSize','count','1715140nuQUXZ','version','isSafeInteger','3545416uEIQaZ','ids','batches','write','number','some','hex','status','Cannot\x20read\x20the\x20import\x20checkpoint.','datasetCode','length','fileHash','now','batchSize','stringify','resume','Excel\x20row\x20','add','message','includes','reconcileImageConflicts','12JXTnEc','importId','has','flatMap','isInteger','1627961jqyKfI','mappingHash','maxBatchBytes','Import\x20content\x20conflict\x20at\x20Excel\x20row\x20','unknown','conflict','rowIndexes','Import\x20checkpoint\x20does\x20not\x20match\x20the\x20input,\x20target\x20or\x20identity.','5339376SsGlsw','values','taskId','size','imageFields'];a143_0x57ce=function(){return _0x335e2e;};return a143_0x57ce();}import{acquireLock,assertImportContract,assertImportPaths,canonical,sameImportValue,resolveImportOutputPath,saveImportJson}from'./runner.js';const validId=_0x431b32=>typeof _0x431b32===a143_0x56c938(0x147)&&Number[a143_0x56c938(0x142)](_0x431b32)&&_0x431b32>0x0;export async function runAutoIdExcelImport(_0x58a7ef){const _0x2e18ec=a143_0x56c938,_0x5b6316={..._0x58a7ef,'checkpoint':await resolveImportOutputPath(_0x58a7ef[_0x2e18ec(0x116)]),'report':await resolveImportOutputPath(_0x58a7ef[_0x2e18ec(0x133)])},{manifest:_0x35c1b6,contract:_0x12229d,api:_0x44102d}=_0x5b6316;assertImportContract(_0x12229d,_0x5b6316['appCode'],_0x5b6316['datasetCode']);if(_0x12229d[_0x2e18ec(0x136)]!==0x2||!_0x44102d[_0x2e18ec(0x130)])throw Error('The\x20auto-ID\x20runner\x20requires\x20the\x20v2\x20task\x20readback\x20contract.');if(_0x35c1b6['errors'][_0x2e18ec(0x14d)])throw Error(_0x2e18ec(0x12c));if(!_0x35c1b6[_0x2e18ec(0x11b)][_0x2e18ec(0x14d)])throw Error(_0x2e18ec(0x139));if(!Number[_0x2e18ec(0x15c)](_0x5b6316[_0x2e18ec(0x150)])||_0x5b6316[_0x2e18ec(0x150)]<0x1||_0x5b6316[_0x2e18ec(0x150)]>_0x12229d[_0x2e18ec(0x13e)])throw Error('Invalid\x20import\x20batch\x20size.');assertImportPaths(_0x5b6316[_0x2e18ec(0x116)],_0x5b6316[_0x2e18ec(0x133)]);if(_0x35c1b6[_0x2e18ec(0x11b)][_0x2e18ec(0x148)](_0x23cc18=>Object[_0x2e18ec(0x16a)](_0x23cc18[_0x2e18ec(0x166)],'id')))throw Error(_0x2e18ec(0x118));const _0x43a267=(_0x3e4eaa,_0x2aa8d9)=>Buffer[_0x2e18ec(0x12f)](JSON[_0x2e18ec(0x151)]({'schemaFingerprint':_0x12229d[_0x2e18ec(0x137)],'taskId':_0x2aa8d9,'items':_0x3e4eaa['map'](_0x1c12c8=>_0x35c1b6[_0x2e18ec(0x11b)][_0x1c12c8][_0x2e18ec(0x166)])}),_0x2e18ec(0x123)),_0x2d9171=[];let _0x5c06e5=[];for(let _0x321022=0x0;_0x321022<_0x35c1b6[_0x2e18ec(0x11b)][_0x2e18ec(0x14d)];_0x321022++){if(_0x43a267([_0x321022],0x2**0x34)>_0x12229d[_0x2e18ec(0x15f)])throw Error(_0x2e18ec(0x153)+_0x35c1b6['rows'][_0x321022][_0x2e18ec(0x129)]+_0x2e18ec(0x117));_0x5c06e5[_0x2e18ec(0x14d)]&&(_0x5c06e5['length']===_0x5b6316[_0x2e18ec(0x150)]||_0x43a267([..._0x5c06e5,_0x321022],0x2**0x34)>_0x12229d[_0x2e18ec(0x15f)])&&(_0x2d9171[_0x2e18ec(0x11e)](_0x5c06e5),_0x5c06e5=[]),_0x5c06e5[_0x2e18ec(0x11e)](_0x321022);}if(_0x5c06e5[_0x2e18ec(0x14d)])_0x2d9171[_0x2e18ec(0x11e)](_0x5c06e5);const _0x159915={'appCode':_0x5b6316[_0x2e18ec(0x12b)],'datasetCode':_0x5b6316[_0x2e18ec(0x14c)],'runtimeDomain':_0x5b6316[_0x2e18ec(0x13d)],'actorId':_0x12229d[_0x2e18ec(0x13c)],'fileHash':_0x35c1b6[_0x2e18ec(0x14e)],'mappingHash':_0x35c1b6[_0x2e18ec(0x15e)],'schemaHash':_0x35c1b6[_0x2e18ec(0x114)],'remoteSchemaHash':_0x12229d['schemaFingerprint'],'batchSize':_0x5b6316['batchSize'],'maxBatchBytes':_0x12229d[_0x2e18ec(0x15f)],'sheet':_0x35c1b6['sheet'],'strategy':_0x12229d[_0x2e18ec(0x11d)]},_0x4e067f=await acquireLock(_0x5b6316['checkpoint']);let _0x3e41ad;const _0x493246=Date[_0x2e18ec(0x14f)]();let _0x54f4cc=0x0;const _0x36cbf2=[],_0x1324fb=_0x5eb41d=>_0x3e41ad?.[_0x2e18ec(0x145)][_0x2e18ec(0x135)](_0x5c7696=>_0x5c7696[_0x2e18ec(0x14a)]===_0x5eb41d)['reduce']((_0x643b14,_0x239436)=>_0x643b14+_0x239436[_0x2e18ec(0x163)][_0x2e18ec(0x14d)],0x0)??0x0,_0x595e2d=()=>({'importId':_0x3e41ad?.[_0x2e18ec(0x159)],'sourceRows':_0x35c1b6['rows']['length'],'emptyRows':_0x35c1b6[_0x2e18ec(0x11c)]['length'],'succeeded':_0x1324fb(_0x2e18ec(0x132)),'unknown':_0x1324fb(_0x2e18ec(0x12a)),'conflicts':_0x1324fb(_0x2e18ec(0x162)),'notAttempted':_0x1324fb(_0x2e18ec(0x127)),'batches':_0x54f4cc,'batchResults':_0x36cbf2,'elapsedMs':Date[_0x2e18ec(0x14f)]()-_0x493246,'checkpoint':_0x5b6316[_0x2e18ec(0x116)],'report':_0x5b6316[_0x2e18ec(0x133)],'warnings':_0x35c1b6['warnings']});try{if(_0x5b6316[_0x2e18ec(0x152)]){try{_0x3e41ad=JSON[_0x2e18ec(0x113)](await readFile(_0x5b6316['checkpoint'],_0x2e18ec(0x123)));}catch{throw Error(_0x2e18ec(0x14b));}if(!_0x3e41ad||_0x3e41ad[_0x2e18ec(0x141)]!==0x2||typeof _0x3e41ad[_0x2e18ec(0x159)]!=='string'||!_0x3e41ad[_0x2e18ec(0x159)]||canonical(_0x3e41ad['binding'])!==canonical(_0x159915)||!Array[_0x2e18ec(0x125)](_0x3e41ad['batches'])||_0x3e41ad[_0x2e18ec(0x145)][_0x2e18ec(0x14d)]!==_0x2d9171[_0x2e18ec(0x14d)]||new Set(_0x3e41ad[_0x2e18ec(0x145)][_0x2e18ec(0x138)](_0x166787=>_0x166787['taskId']))['size']!==_0x2d9171[_0x2e18ec(0x14d)]||_0x3e41ad[_0x2e18ec(0x145)]['some']((_0x44a6bc,_0x12d79a)=>!validId(_0x44a6bc['taskId'])||_0x44a6bc[_0x2e18ec(0x167)]>0x2**0x34||canonical(_0x44a6bc[_0x2e18ec(0x163)])!==canonical(_0x2d9171[_0x12d79a])||![_0x2e18ec(0x127),_0x2e18ec(0x12a),_0x2e18ec(0x132),_0x2e18ec(0x162)]['includes'](_0x44a6bc[_0x2e18ec(0x14a)])||!Array['isArray'](_0x44a6bc['ids'])||_0x44a6bc['ids'][_0x2e18ec(0x148)](_0x240298=>!validId(_0x240298))||new Set(_0x44a6bc[_0x2e18ec(0x144)])[_0x2e18ec(0x168)]!==_0x44a6bc[_0x2e18ec(0x144)][_0x2e18ec(0x14d)]||_0x44a6bc[_0x2e18ec(0x144)]['length']!==0x0&&_0x44a6bc[_0x2e18ec(0x144)]['length']!==_0x44a6bc[_0x2e18ec(0x163)][_0x2e18ec(0x14d)]||_0x44a6bc['status']==='succeeded'&&_0x44a6bc[_0x2e18ec(0x144)][_0x2e18ec(0x14d)]!==_0x44a6bc['rowIndexes'][_0x2e18ec(0x14d)]||_0x44a6bc['status']==='unsent'&&_0x44a6bc[_0x2e18ec(0x144)]['length']!==0x0))throw Error(_0x2e18ec(0x164));const _0x34378d=_0x3e41ad[_0x2e18ec(0x145)]['flatMap'](_0x25d802=>_0x25d802[_0x2e18ec(0x144)]);if(new Set(_0x34378d)[_0x2e18ec(0x168)]!==_0x34378d['length'])throw Error(_0x2e18ec(0x120));}else{try{await lstat(_0x5b6316[_0x2e18ec(0x116)]);throw Error(_0x2e18ec(0x115));}catch(_0x3de4f5){if(_0x3de4f5[_0x2e18ec(0x124)]!==_0x2e18ec(0x13b))throw _0x3de4f5;}const _0x71ad25=new Set();_0x3e41ad={'version':0x2,'importId':randomUUID(),'binding':_0x159915,'batches':_0x2d9171[_0x2e18ec(0x138)](_0x41dd01=>{const _0x15dd1e=_0x2e18ec;let _0x1ab7fc;do{_0x1ab7fc=Number(BigInt('0x'+randomBytes(0x7)['toString'](_0x15dd1e(0x149)))&(0x1n<<0x34n)-0x1n)+0x1;}while(_0x71ad25[_0x15dd1e(0x15a)](_0x1ab7fc));return _0x71ad25[_0x15dd1e(0x154)](_0x1ab7fc),{'taskId':_0x1ab7fc,'rowIndexes':_0x41dd01,'ids':[],'status':_0x15dd1e(0x127)};})},await saveImportJson(_0x5b6316[_0x2e18ec(0x116)],_0x3e41ad);}await _0x5b6316[_0x2e18ec(0x11f)]?.();const _0x4c4cc0=_0x3e41ad,_0x23ca2b=async(_0x555af0,_0x25694a)=>{const _0x198428=_0x2e18ec;_0x555af0[_0x198428(0x14a)]=_0x198428(0x162),await saveImportJson(_0x5b6316[_0x198428(0x116)],_0x4c4cc0);throw Error(_0x25694a);},_0x5ec143=async _0x58c523=>{const _0x2ac7dc=_0x2e18ec;let _0x516143=await _0x44102d[_0x2ac7dc(0x130)](_0x58c523[_0x2ac7dc(0x167)]);if(!Array['isArray'](_0x516143))throw Error('Invalid\x20import\x20task\x20readback\x20response.');if(_0x58c523[_0x2ac7dc(0x14a)]==='unsent'&&_0x516143[_0x2ac7dc(0x14d)])return _0x23ca2b(_0x58c523,'Import\x20task\x20marker\x20collision;\x20stop\x20without\x20replacing\x20the\x20marker.');if(!_0x516143[_0x2ac7dc(0x14d)]){if(_0x58c523['status']===_0x2ac7dc(0x132)||_0x58c523[_0x2ac7dc(0x144)][_0x2ac7dc(0x14d)])return _0x23ca2b(_0x58c523,'Previously\x20imported\x20records\x20are\x20no\x20longer\x20visible;\x20recovery\x20conflict.');return![];}if(_0x516143[_0x2ac7dc(0x14d)]!==_0x58c523[_0x2ac7dc(0x163)]['length'])return _0x23ca2b(_0x58c523,_0x2ac7dc(0x112));const _0x1caf94=_0x516143[_0x2ac7dc(0x138)](_0x3f72ab=>_0x3f72ab?.['id']);if(_0x1caf94[_0x2ac7dc(0x148)](_0x166216=>!validId(_0x166216)))return _0x23ca2b(_0x58c523,_0x2ac7dc(0x12e));if(new Set(_0x1caf94)['size']!==_0x1caf94[_0x2ac7dc(0x14d)])return _0x23ca2b(_0x58c523,_0x2ac7dc(0x12e));const _0x322917=new Map(_0x516143[_0x2ac7dc(0x138)](_0x5db02d=>[_0x5db02d['id'],_0x5db02d])),_0x1441e8=_0x58c523[_0x2ac7dc(0x144)]['length']?[..._0x58c523[_0x2ac7dc(0x144)]]:[..._0x1caf94][_0x2ac7dc(0x13a)]((_0x3c7f2f,_0x1a09d2)=>_0x3c7f2f-_0x1a09d2);if(_0x1441e8['some'](_0x8fcb76=>!validId(_0x8fcb76))||_0x1441e8[_0x2ac7dc(0x148)]((_0x5b0444,_0x41c97d)=>_0x41c97d>0x0&&_0x5b0444<=_0x1441e8[_0x41c97d-0x1])||_0x1441e8['some'](_0x995f54=>!_0x322917['has'](_0x995f54)))return _0x23ca2b(_0x58c523,_0x2ac7dc(0x12e));_0x516143=_0x1441e8['map'](_0x565251=>_0x322917['get'](_0x565251));const _0x48f51a=new Set(_0x4c4cc0[_0x2ac7dc(0x145)][_0x2ac7dc(0x135)](_0x31c466=>_0x31c466!==_0x58c523)[_0x2ac7dc(0x15b)](_0x4051d9=>_0x4051d9[_0x2ac7dc(0x144)]));if(_0x1441e8[_0x2ac7dc(0x148)](_0x56cb6b=>_0x48f51a[_0x2ac7dc(0x15a)](_0x56cb6b)))return _0x23ca2b(_0x58c523,_0x2ac7dc(0x110));for(let _0x56b0b2=0x0;_0x56b0b2<_0x516143[_0x2ac7dc(0x14d)];_0x56b0b2++){const _0x39ddda=_0x35c1b6[_0x2ac7dc(0x11b)][_0x58c523[_0x2ac7dc(0x163)][_0x56b0b2]][_0x2ac7dc(0x166)];if(Object[_0x2ac7dc(0x128)](_0x39ddda)[_0x2ac7dc(0x148)](_0x1e7442=>!sameImportValue(_0x39ddda[_0x1e7442],_0x516143[_0x56b0b2][_0x1e7442],_0x35c1b6[_0x2ac7dc(0x169)]?.[_0x2ac7dc(0x156)](_0x1e7442)&&!_0x35c1b6[_0x2ac7dc(0x134)]?.[_0x2ac7dc(0x156)](_0x1e7442))))return _0x23ca2b(_0x58c523,_0x2ac7dc(0x160)+_0x35c1b6[_0x2ac7dc(0x11b)][_0x58c523[_0x2ac7dc(0x163)][_0x56b0b2]][_0x2ac7dc(0x129)]+'.');}return _0x58c523[_0x2ac7dc(0x144)]=_0x1441e8,_0x58c523[_0x2ac7dc(0x14a)]=_0x2ac7dc(0x132),await saveImportJson(_0x5b6316[_0x2ac7dc(0x116)],_0x4c4cc0),!![];};if(_0x4c4cc0[_0x2e18ec(0x145)][_0x2e18ec(0x148)](_0x2353fa=>_0x2353fa[_0x2e18ec(0x14a)]===_0x2e18ec(0x162)&&!(_0x5b6316[_0x2e18ec(0x152)]&&_0x5b6316[_0x2e18ec(0x157)]&&_0x35c1b6[_0x2e18ec(0x169)]?.[_0x2e18ec(0x14d)]&&_0x2353fa[_0x2e18ec(0x144)][_0x2e18ec(0x14d)]===_0x2353fa[_0x2e18ec(0x163)][_0x2e18ec(0x14d)])))throw Error(_0x2e18ec(0x12d));if(_0x5b6316[_0x2e18ec(0x152)]){for(const _0x511098 of _0x4c4cc0[_0x2e18ec(0x145)])await _0x5ec143(_0x511098);}for(const _0x3e4f81 of _0x4c4cc0[_0x2e18ec(0x145)]){if(_0x3e4f81[_0x2e18ec(0x14a)]===_0x2e18ec(0x132))continue;if(!_0x5b6316[_0x2e18ec(0x152)])await _0x5ec143(_0x3e4f81);_0x3e4f81[_0x2e18ec(0x14a)]=_0x2e18ec(0x12a),await saveImportJson(_0x5b6316[_0x2e18ec(0x116)],_0x4c4cc0),_0x54f4cc++;const _0x1ee5fd=_0x3e4f81['rowIndexes'][_0x2e18ec(0x138)](_0x3711dc=>_0x35c1b6[_0x2e18ec(0x11b)][_0x3711dc][_0x2e18ec(0x166)]),_0xfaad77=Date['now'](),_0x16f90c={'batch':_0x54f4cc,'rowStart':_0x35c1b6[_0x2e18ec(0x11b)][_0x3e4f81[_0x2e18ec(0x163)][0x0]]['rowNumber'],'rowEnd':_0x35c1b6[_0x2e18ec(0x11b)][_0x3e4f81['rowIndexes']['at'](-0x1)][_0x2e18ec(0x129)],'count':_0x1ee5fd['length'],'bytes':_0x43a267(_0x3e4f81[_0x2e18ec(0x163)],_0x3e4f81['taskId']),'elapsedMs':0x0,'status':_0x2e18ec(0x161)};_0x36cbf2[_0x2e18ec(0x11e)](_0x16f90c);try{const _0x394bed=await _0x44102d[_0x2e18ec(0x146)](_0x1ee5fd,_0x3e4f81['taskId']);if(!_0x394bed||_0x394bed[_0x2e18ec(0x13f)]!==_0x1ee5fd[_0x2e18ec(0x14d)]||!Array[_0x2e18ec(0x125)](_0x394bed[_0x2e18ec(0x144)])||_0x394bed[_0x2e18ec(0x144)]['length']!==_0x1ee5fd['length']||_0x394bed[_0x2e18ec(0x144)][_0x2e18ec(0x148)](_0x100142=>!validId(_0x100142))||new Set(_0x394bed[_0x2e18ec(0x144)])[_0x2e18ec(0x168)]!==_0x394bed[_0x2e18ec(0x144)]['length'])throw Error(_0x2e18ec(0x122));_0x3e4f81[_0x2e18ec(0x144)]=_0x394bed[_0x2e18ec(0x144)],await saveImportJson(_0x5b6316[_0x2e18ec(0x116)],_0x4c4cc0);if(!await _0x5ec143(_0x3e4f81))throw Error(_0x2e18ec(0x119));}catch(_0x273097){if(_0x3e4f81[_0x2e18ec(0x14a)]===_0x2e18ec(0x162))throw _0x273097;try{await _0x5ec143(_0x3e4f81);}catch(_0x139da5){if(_0x3e4f81[_0x2e18ec(0x14a)]===_0x2e18ec(0x162))throw _0x139da5;}if(_0x3e4f81[_0x2e18ec(0x14a)]!==_0x2e18ec(0x132))throw Error(_0x2e18ec(0x131));}finally{_0x16f90c[_0x2e18ec(0x121)]=Date[_0x2e18ec(0x14f)]()-_0xfaad77,_0x16f90c[_0x2e18ec(0x14a)]=_0x3e4f81['status']===_0x2e18ec(0x132)?_0x2e18ec(0x132):_0x3e4f81[_0x2e18ec(0x14a)]===_0x2e18ec(0x162)?'conflict':_0x2e18ec(0x161);}}const _0x5864a8={'status':'completed',..._0x595e2d()};return await saveImportJson(_0x5b6316[_0x2e18ec(0x133)],_0x5864a8),_0x5864a8;}catch(_0xde06ec){if(_0x3e41ad)await saveImportJson(_0x5b6316[_0x2e18ec(0x133)],{'status':'incomplete',..._0x595e2d(),'message':_0xde06ec[_0x2e18ec(0x155)]});throw _0xde06ec;}finally{await _0x4e067f();}}
|
|
1
|
+
function a143_0x4952(){const _0x3c0d1c=['report','12077830hkKiMa','4482207yzQRUi','Incomplete\x20readback.','status','warnings','isSafeInteger','31ywEMeY','write','datasetCode','appCode','maxBatchBytes','Previously\x20imported\x20records\x20are\x20no\x20longer\x20visible;\x20recovery\x20conflict.','Excel\x20contains\x20no\x20valid\x20data\x20rows.','unknown','reduce','actorId','Import\x20task\x20marker\x20collision;\x20stop\x20without\x20replacing\x20the\x20marker.','Excel\x20contains\x20invalid\x20rows;\x20no\x20data\x20was\x20written.','831297gffOgj','Import\x20generated\x20ID\x20conflict.','Import\x20generated\x20ID\x20collision.','Auto-ID\x20import\x20items\x20cannot\x20contain\x20a\x20primary\x20key.','isInteger','8rwlqhf','sort','includes','6267933vUNIyO','checkpoint','ids','values','hasOwn','keys','runtimeDomain','count','length','some','reconcileImageConflicts','hex','elapsedMs','taskId','pending','message','parse','schemaFingerprint','strategy','map','20212812mrZfih','Import\x20checkpoint\x20contains\x20duplicate\x20generated\x20IDs.','maxBatchSize','get','rowNumber','Import\x20checkpoint\x20already\x20exists;\x20use\x20--resume.','Import\x20checkpoint\x20does\x20not\x20match\x20the\x20input,\x20target\x20or\x20identity.','completed','mappingHash','version','conflict','Import\x20checkpoint\x20contains\x20a\x20content\x20conflict.','errors','now','5Eqwrsi','Import\x20content\x20conflict\x20at\x20Excel\x20row\x20','batches','batchSize','rowIndexes','The\x20auto-ID\x20runner\x20requires\x20the\x20v2\x20task\x20readback\x20contract.','sheet','8dRBzxG','11WeNMjQ','string','emptyRows','3602xOdkKv','The\x20import\x20write\x20outcome\x20is\x20unknown.\x20Resume\x20to\x20reconcile\x20the\x20original\x20task\x20marker\x20before\x20continuing.','readTask','succeeded','onCheckpointReady','rows','resume','size','has','importId','imageFields','Invalid\x20import\x20batch\x20size.','Excel\x20row\x20','4997046dgsauu','isArray','flatMap','utf8','code','schemaVersion','unsent','fileHash','push'];a143_0x4952=function(){return _0x3c0d1c;};return a143_0x4952();}const a143_0x3376fb=a143_0x36db;(function(_0x5c8f95,_0x15e33b){const _0x598489=a143_0x36db,_0x438a98=_0x5c8f95();while(!![]){try{const _0x30f615=parseInt(_0x598489(0xac))/0x1*(parseInt(_0x598489(0x8f))/0x2)+parseInt(_0x598489(0xb8))/0x3*(parseInt(_0x598489(0xbd))/0x4)+-parseInt(_0x598489(0x84))/0x5*(parseInt(_0x598489(0x9c))/0x6)+parseInt(_0x598489(0xc0))/0x7+parseInt(_0x598489(0x8b))/0x8*(parseInt(_0x598489(0xa7))/0x9)+-parseInt(_0x598489(0xa6))/0xa*(-parseInt(_0x598489(0x8c))/0xb)+-parseInt(_0x598489(0xd4))/0xc;if(_0x30f615===_0x15e33b)break;else _0x438a98['push'](_0x438a98['shift']());}catch(_0x49453d){_0x438a98['push'](_0x438a98['shift']());}}}(a143_0x4952,0xa96fc));import{randomBytes,randomUUID}from'node:crypto';function a143_0x36db(_0x3cc604,_0xea4d0){_0x3cc604=_0x3cc604-0x7a;const _0x49521b=a143_0x4952();let _0x36dbe3=_0x49521b[_0x3cc604];return _0x36dbe3;}import{lstat,readFile}from'node:fs/promises';import{acquireLock,assertImportContract,assertImportPaths,canonical,sameImportValue,resolveImportOutputPath,saveImportJson}from'./runner.js';const validId=_0x59dd00=>typeof _0x59dd00==='number'&&Number[a143_0x3376fb(0xab)](_0x59dd00)&&_0x59dd00>0x0;export async function runAutoIdExcelImport(_0x5330a1){const _0x299424=a143_0x3376fb,_0x5db4de={..._0x5330a1,'checkpoint':await resolveImportOutputPath(_0x5330a1[_0x299424(0xc1)]),'report':await resolveImportOutputPath(_0x5330a1[_0x299424(0xa5)])},{manifest:_0x24e4de,contract:_0x19ae1f,api:_0x3ebe19}=_0x5db4de;assertImportContract(_0x19ae1f,_0x5db4de[_0x299424(0xaf)],_0x5db4de[_0x299424(0xae)]);if(_0x19ae1f[_0x299424(0xa1)]!==0x2||!_0x3ebe19[_0x299424(0x91)])throw Error(_0x299424(0x89));if(_0x24e4de[_0x299424(0x82)][_0x299424(0xc8)])throw Error(_0x299424(0xb7));if(!_0x24e4de[_0x299424(0x94)]['length'])throw Error(_0x299424(0xb2));if(!Number[_0x299424(0xbc)](_0x5db4de[_0x299424(0x87)])||_0x5db4de['batchSize']<0x1||_0x5db4de[_0x299424(0x87)]>_0x19ae1f[_0x299424(0xd6)])throw Error(_0x299424(0x9a));assertImportPaths(_0x5db4de[_0x299424(0xc1)],_0x5db4de[_0x299424(0xa5)]);if(_0x24e4de[_0x299424(0x94)][_0x299424(0xc9)](_0x306226=>Object[_0x299424(0xc4)](_0x306226['values'],'id')))throw Error(_0x299424(0xbb));const _0x4a0efb=(_0x41f907,_0x444f8b)=>Buffer['byteLength'](JSON['stringify']({'schemaFingerprint':_0x19ae1f[_0x299424(0xd1)],'taskId':_0x444f8b,'items':_0x41f907[_0x299424(0xd3)](_0x302ab6=>_0x24e4de[_0x299424(0x94)][_0x302ab6][_0x299424(0xc3)])}),_0x299424(0x9f)),_0x447933=[];let _0x232042=[];for(let _0x3237f8=0x0;_0x3237f8<_0x24e4de[_0x299424(0x94)][_0x299424(0xc8)];_0x3237f8++){if(_0x4a0efb([_0x3237f8],0x2**0x34)>_0x19ae1f[_0x299424(0xb0)])throw Error(_0x299424(0x9b)+_0x24e4de[_0x299424(0x94)][_0x3237f8][_0x299424(0x7a)]+'\x20exceeds\x20the\x20import\x20request\x20size\x20limit.');_0x232042[_0x299424(0xc8)]&&(_0x232042[_0x299424(0xc8)]===_0x5db4de[_0x299424(0x87)]||_0x4a0efb([..._0x232042,_0x3237f8],0x2**0x34)>_0x19ae1f[_0x299424(0xb0)])&&(_0x447933[_0x299424(0xa4)](_0x232042),_0x232042=[]),_0x232042['push'](_0x3237f8);}if(_0x232042[_0x299424(0xc8)])_0x447933['push'](_0x232042);const _0x556ed6={'appCode':_0x5db4de[_0x299424(0xaf)],'datasetCode':_0x5db4de[_0x299424(0xae)],'runtimeDomain':_0x5db4de[_0x299424(0xc6)],'actorId':_0x19ae1f[_0x299424(0xb5)],'fileHash':_0x24e4de[_0x299424(0xa3)],'mappingHash':_0x24e4de[_0x299424(0x7e)],'schemaHash':_0x24e4de['schemaHash'],'remoteSchemaHash':_0x19ae1f['schemaFingerprint'],'batchSize':_0x5db4de[_0x299424(0x87)],'maxBatchBytes':_0x19ae1f[_0x299424(0xb0)],'sheet':_0x24e4de[_0x299424(0x8a)],'strategy':_0x19ae1f[_0x299424(0xd2)]},_0x5be83d=await acquireLock(_0x5db4de[_0x299424(0xc1)]);let _0x35d549;const _0x3b1604=Date[_0x299424(0x83)]();let _0x1a8eb8=0x0;const _0x3b3f6e=[],_0x323432=_0x5b25fb=>_0x35d549?.[_0x299424(0x86)]['filter'](_0x39c3a2=>_0x39c3a2[_0x299424(0xa9)]===_0x5b25fb)[_0x299424(0xb4)]((_0x271476,_0x3a09b7)=>_0x271476+_0x3a09b7[_0x299424(0x88)][_0x299424(0xc8)],0x0)??0x0,_0x354c9c=()=>({'importId':_0x35d549?.[_0x299424(0x98)],'sourceRows':_0x24e4de[_0x299424(0x94)][_0x299424(0xc8)],'emptyRows':_0x24e4de[_0x299424(0x8e)][_0x299424(0xc8)],'succeeded':_0x323432(_0x299424(0x92)),'unknown':_0x323432('pending'),'conflicts':_0x323432(_0x299424(0x80)),'notAttempted':_0x323432(_0x299424(0xa2)),'batches':_0x1a8eb8,'batchResults':_0x3b3f6e,'elapsedMs':Date['now']()-_0x3b1604,'checkpoint':_0x5db4de[_0x299424(0xc1)],'report':_0x5db4de[_0x299424(0xa5)],'warnings':_0x24e4de[_0x299424(0xaa)]});try{if(_0x5db4de[_0x299424(0x95)]){try{_0x35d549=JSON[_0x299424(0xd0)](await readFile(_0x5db4de[_0x299424(0xc1)],_0x299424(0x9f)));}catch{throw Error('Cannot\x20read\x20the\x20import\x20checkpoint.');}if(!_0x35d549||_0x35d549[_0x299424(0x7f)]!==0x2||typeof _0x35d549[_0x299424(0x98)]!==_0x299424(0x8d)||!_0x35d549[_0x299424(0x98)]||canonical(_0x35d549['binding'])!==canonical(_0x556ed6)||!Array[_0x299424(0x9d)](_0x35d549[_0x299424(0x86)])||_0x35d549[_0x299424(0x86)][_0x299424(0xc8)]!==_0x447933[_0x299424(0xc8)]||new Set(_0x35d549[_0x299424(0x86)][_0x299424(0xd3)](_0x7c670=>_0x7c670[_0x299424(0xcd)]))[_0x299424(0x96)]!==_0x447933['length']||_0x35d549[_0x299424(0x86)]['some']((_0x2bd325,_0x4d3d28)=>!validId(_0x2bd325[_0x299424(0xcd)])||_0x2bd325[_0x299424(0xcd)]>0x2**0x34||canonical(_0x2bd325['rowIndexes'])!==canonical(_0x447933[_0x4d3d28])||![_0x299424(0xa2),'pending',_0x299424(0x92),_0x299424(0x80)]['includes'](_0x2bd325[_0x299424(0xa9)])||!Array[_0x299424(0x9d)](_0x2bd325[_0x299424(0xc2)])||_0x2bd325[_0x299424(0xc2)][_0x299424(0xc9)](_0x155021=>!validId(_0x155021))||new Set(_0x2bd325['ids'])[_0x299424(0x96)]!==_0x2bd325[_0x299424(0xc2)][_0x299424(0xc8)]||_0x2bd325[_0x299424(0xc2)][_0x299424(0xc8)]!==0x0&&_0x2bd325['ids'][_0x299424(0xc8)]!==_0x2bd325[_0x299424(0x88)]['length']||_0x2bd325[_0x299424(0xa9)]===_0x299424(0x92)&&_0x2bd325[_0x299424(0xc2)][_0x299424(0xc8)]!==_0x2bd325[_0x299424(0x88)][_0x299424(0xc8)]||_0x2bd325['status']===_0x299424(0xa2)&&_0x2bd325[_0x299424(0xc2)][_0x299424(0xc8)]!==0x0))throw Error(_0x299424(0x7c));const _0x297697=_0x35d549[_0x299424(0x86)]['flatMap'](_0x740225=>_0x740225[_0x299424(0xc2)]);if(new Set(_0x297697)['size']!==_0x297697[_0x299424(0xc8)])throw Error(_0x299424(0xd5));}else{try{await lstat(_0x5db4de[_0x299424(0xc1)]);throw Error(_0x299424(0x7b));}catch(_0x4a75ef){if(_0x4a75ef[_0x299424(0xa0)]!=='ENOENT')throw _0x4a75ef;}const _0x56bf5c=new Set();_0x35d549={'version':0x2,'importId':randomUUID(),'binding':_0x556ed6,'batches':_0x447933[_0x299424(0xd3)](_0x3ecdf7=>{const _0x463353=_0x299424;let _0x41e783;do{_0x41e783=Number(BigInt('0x'+randomBytes(0x7)['toString'](_0x463353(0xcb)))&(0x1n<<0x34n)-0x1n)+0x1;}while(_0x56bf5c[_0x463353(0x97)](_0x41e783));return _0x56bf5c['add'](_0x41e783),{'taskId':_0x41e783,'rowIndexes':_0x3ecdf7,'ids':[],'status':_0x463353(0xa2)};})},await saveImportJson(_0x5db4de[_0x299424(0xc1)],_0x35d549);}await _0x5db4de[_0x299424(0x93)]?.();const _0x4651fd=_0x35d549,_0x14b71d=async(_0x2f0a49,_0x24974d)=>{const _0x4506c0=_0x299424;_0x2f0a49[_0x4506c0(0xa9)]=_0x4506c0(0x80),await saveImportJson(_0x5db4de[_0x4506c0(0xc1)],_0x4651fd);throw Error(_0x24974d);},_0x57133e=async _0x4b390a=>{const _0x5f1127=_0x299424;let _0x331b14=await _0x3ebe19['readTask'](_0x4b390a[_0x5f1127(0xcd)]);if(!Array[_0x5f1127(0x9d)](_0x331b14))throw Error('Invalid\x20import\x20task\x20readback\x20response.');if(_0x4b390a['status']==='unsent'&&_0x331b14[_0x5f1127(0xc8)])return _0x14b71d(_0x4b390a,_0x5f1127(0xb6));if(!_0x331b14['length']){if(_0x4b390a[_0x5f1127(0xa9)]==='succeeded'||_0x4b390a[_0x5f1127(0xc2)][_0x5f1127(0xc8)])return _0x14b71d(_0x4b390a,_0x5f1127(0xb1));return![];}if(_0x331b14[_0x5f1127(0xc8)]!==_0x4b390a['rowIndexes'][_0x5f1127(0xc8)])return _0x14b71d(_0x4b390a,'Partial\x20import\x20task\x20readback\x20conflict.');const _0x19f0be=_0x331b14['map'](_0x30d0a7=>_0x30d0a7?.['id']);if(_0x19f0be['some'](_0x32041f=>!validId(_0x32041f)))return _0x14b71d(_0x4b390a,'Import\x20generated\x20ID\x20conflict.');if(new Set(_0x19f0be)['size']!==_0x19f0be['length'])return _0x14b71d(_0x4b390a,_0x5f1127(0xb9));const _0xf0af16=new Map(_0x331b14[_0x5f1127(0xd3)](_0x424386=>[_0x424386['id'],_0x424386])),_0x317cb7=_0x4b390a[_0x5f1127(0xc2)]['length']?[..._0x4b390a[_0x5f1127(0xc2)]]:[..._0x19f0be][_0x5f1127(0xbe)]((_0x5b2a8c,_0x4ab5c4)=>_0x5b2a8c-_0x4ab5c4);if(_0x317cb7[_0x5f1127(0xc9)](_0x4bf5d5=>!validId(_0x4bf5d5))||_0x317cb7[_0x5f1127(0xc9)]((_0x26a8b8,_0x25d5ea)=>_0x25d5ea>0x0&&_0x26a8b8<=_0x317cb7[_0x25d5ea-0x1])||_0x317cb7[_0x5f1127(0xc9)](_0x1b8f9d=>!_0xf0af16[_0x5f1127(0x97)](_0x1b8f9d)))return _0x14b71d(_0x4b390a,_0x5f1127(0xb9));_0x331b14=_0x317cb7[_0x5f1127(0xd3)](_0x14b10a=>_0xf0af16[_0x5f1127(0xd7)](_0x14b10a));const _0x36f4f8=new Set(_0x4651fd[_0x5f1127(0x86)]['filter'](_0xfc8428=>_0xfc8428!==_0x4b390a)[_0x5f1127(0x9e)](_0x23543d=>_0x23543d[_0x5f1127(0xc2)]));if(_0x317cb7[_0x5f1127(0xc9)](_0x36db64=>_0x36f4f8[_0x5f1127(0x97)](_0x36db64)))return _0x14b71d(_0x4b390a,_0x5f1127(0xba));for(let _0x37a1c7=0x0;_0x37a1c7<_0x331b14[_0x5f1127(0xc8)];_0x37a1c7++){const _0x2b8148=_0x24e4de[_0x5f1127(0x94)][_0x4b390a[_0x5f1127(0x88)][_0x37a1c7]][_0x5f1127(0xc3)];if(Object[_0x5f1127(0xc5)](_0x2b8148)[_0x5f1127(0xc9)](_0x5637c3=>!sameImportValue(_0x2b8148[_0x5637c3],_0x331b14[_0x37a1c7][_0x5637c3],_0x24e4de[_0x5f1127(0x99)]?.[_0x5f1127(0xbf)](_0x5637c3)&&!_0x24e4de['uploadFields']?.['includes'](_0x5637c3))))return _0x14b71d(_0x4b390a,_0x5f1127(0x85)+_0x24e4de[_0x5f1127(0x94)][_0x4b390a['rowIndexes'][_0x37a1c7]]['rowNumber']+'.');}return _0x4b390a[_0x5f1127(0xc2)]=_0x317cb7,_0x4b390a[_0x5f1127(0xa9)]=_0x5f1127(0x92),await saveImportJson(_0x5db4de['checkpoint'],_0x4651fd),!![];};if(_0x4651fd[_0x299424(0x86)][_0x299424(0xc9)](_0x52a820=>_0x52a820['status']===_0x299424(0x80)&&!(_0x5db4de[_0x299424(0x95)]&&_0x5db4de[_0x299424(0xca)]&&_0x24e4de[_0x299424(0x99)]?.[_0x299424(0xc8)]&&_0x52a820[_0x299424(0xc2)][_0x299424(0xc8)]===_0x52a820[_0x299424(0x88)][_0x299424(0xc8)])))throw Error(_0x299424(0x81));if(_0x5db4de[_0x299424(0x95)]){for(const _0x3f3b39 of _0x4651fd[_0x299424(0x86)])await _0x57133e(_0x3f3b39);}for(const _0x59064b of _0x4651fd[_0x299424(0x86)]){if(_0x59064b[_0x299424(0xa9)]===_0x299424(0x92))continue;if(!_0x5db4de[_0x299424(0x95)])await _0x57133e(_0x59064b);_0x59064b['status']=_0x299424(0xce),await saveImportJson(_0x5db4de[_0x299424(0xc1)],_0x4651fd),_0x1a8eb8++;const _0x471caa=_0x59064b['rowIndexes'][_0x299424(0xd3)](_0x503769=>_0x24e4de[_0x299424(0x94)][_0x503769][_0x299424(0xc3)]),_0x498cb4=Date[_0x299424(0x83)](),_0xc5f630={'batch':_0x1a8eb8,'rowStart':_0x24e4de['rows'][_0x59064b[_0x299424(0x88)][0x0]][_0x299424(0x7a)],'rowEnd':_0x24e4de['rows'][_0x59064b[_0x299424(0x88)]['at'](-0x1)]['rowNumber'],'count':_0x471caa['length'],'bytes':_0x4a0efb(_0x59064b[_0x299424(0x88)],_0x59064b['taskId']),'elapsedMs':0x0,'status':'unknown'};_0x3b3f6e[_0x299424(0xa4)](_0xc5f630);try{const _0x43a25b=await _0x3ebe19[_0x299424(0xad)](_0x471caa,_0x59064b[_0x299424(0xcd)]);if(!_0x43a25b||_0x43a25b[_0x299424(0xc7)]!==_0x471caa[_0x299424(0xc8)]||!Array[_0x299424(0x9d)](_0x43a25b[_0x299424(0xc2)])||_0x43a25b[_0x299424(0xc2)][_0x299424(0xc8)]!==_0x471caa[_0x299424(0xc8)]||_0x43a25b[_0x299424(0xc2)]['some'](_0xf4cbd4=>!validId(_0xf4cbd4))||new Set(_0x43a25b[_0x299424(0xc2)])['size']!==_0x43a25b[_0x299424(0xc2)][_0x299424(0xc8)])throw Error('Invalid\x20write\x20result.');_0x59064b['ids']=_0x43a25b[_0x299424(0xc2)],await saveImportJson(_0x5db4de[_0x299424(0xc1)],_0x4651fd);if(!await _0x57133e(_0x59064b))throw Error(_0x299424(0xa8));}catch(_0x12918f){if(_0x59064b[_0x299424(0xa9)]===_0x299424(0x80))throw _0x12918f;try{await _0x57133e(_0x59064b);}catch(_0xd7e60c){if(_0x59064b[_0x299424(0xa9)]===_0x299424(0x80))throw _0xd7e60c;}if(_0x59064b[_0x299424(0xa9)]!=='succeeded')throw Error(_0x299424(0x90));}finally{_0xc5f630[_0x299424(0xcc)]=Date[_0x299424(0x83)]()-_0x498cb4,_0xc5f630['status']=_0x59064b['status']===_0x299424(0x92)?_0x299424(0x92):_0x59064b[_0x299424(0xa9)]===_0x299424(0x80)?_0x299424(0x80):_0x299424(0xb3);}}const _0x41768e={'status':_0x299424(0x7d),..._0x354c9c()};return await saveImportJson(_0x5db4de['report'],_0x41768e),_0x41768e;}catch(_0x1ec3f9){if(_0x35d549)await saveImportJson(_0x5db4de['report'],{'status':'incomplete',..._0x354c9c(),'message':_0x1ec3f9[_0x299424(0xcf)]});throw _0x1ec3f9;}finally{await _0x5be83d();}}
|